locked-fg / JFeatureLib

Free Java library for image features and point/region detectors used in ComputerVision
38 stars 14 forks source link

NoClassDefFoundError: at/lux/imageanalysis/VisualDescriptor #34

Closed Divyam53 closed 7 years ago

Divyam53 commented 7 years ago

I am beginner at jfeaturelib and i want to use Gabor Filter and i am getting "NoClassDefFoundError: at/lux/imageanalysis/VisualDescriptor" error

my code- package TextureFeature;

import java.io.File; import java.io.IOException; import java.net.URISyntaxException; import java.util.List;

import javax.imageio.ImageIO;

import de.lmu.ifi.dbs.jfeaturelib.features.Gabor; import de.lmu.ifi.dbs.jfeaturelib.features.Haralick; import de.lmu.ifi.dbs.utilities.Arrays2; import ij.process.ColorProcessor;

class GaborFilter { public static void main(String[] args) throws IOException, URISyntaxException { // load the image String path="C:\Users\D\Downloads\CBIR\images\first.jpg"; File stream =new File(path); //InputStream stream = HaralickDemo.class.getClassLoader().getResourceAsStream("test.jpg"); ColorProcessor image = new ColorProcessor(ImageIO.read(stream));

    // initialize the descriptor
    Gabor descriptor =new Gabor();
    //Haralick descriptor = new Haralick();

    // run the descriptor and extract the features
    descriptor.run(image);

    // obtain the features
    List<double[]> features = descriptor.getFeatures();

    // print the features to system out
    for (double[] feature : features) {
        System.out.println(Arrays2.join(feature, ", ", "%.5f"));
    }
}

}

locked-fg commented 7 years ago

Hi, sorry delay due to vacation. Well obviously the at.* package cannot be found. It's hard to day what's going wrong. Have you set up your project using maven? Then this should not happen. If you haven't mavenized the project, the JARs cannot be found in the classpath.

Divyam53 commented 7 years ago

I have mavenized my project, still I am getting this error

Divyam53 commented 7 years ago

can u please send me the code of, 'gabor filter'

locked-fg commented 7 years ago

Please refer to the Lire project itself: http://www.itec.uni-klu.ac.at/~mlux/lire-release/ https://github.com/dermotte/lire JFeatureLib just includes Lire.

locked-fg commented 7 years ago

Closing as not directly related to JFeatureLib