ChangsunLee / lire

Automatically exported from code.google.com/p/lire
Other
0 stars 0 forks source link

LocalBinaryPatterns does not work #19

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
net.semanticmetadata.lire.imageanalysis.LocalBinaryPatterns cannot be used (it 
looks like it has been deactivated)

What steps will reproduce the problem?
1. add lire.jar v0.9.5 to a project
2. use the ParallelExtractor to extract the Local Binary Patterns feature from 
a set of images

What is the expected output? What do you see instead?
The extraction process raises a NullPointerException

What version of the product are you using? On what operating system?
Code running under Intellij Idea 13.0.1 on Windows 7 SP1 64 bit

Please provide any additional information below.
The problem lies in net.semanticmetadata.lire.indexing.tools.ParallelExtractor 
where the LocalBinaryPatterns is not added in the member called "features":

    public static final String[] features = new String[]{
            "net.semanticmetadata.lire.imageanalysis.CEDD",                  // 0
            "net.semanticmetadata.lire.imageanalysis.FCTH",                  // 1
            "net.semanticmetadata.lire.imageanalysis.OpponentHistogram",     // 2
            "net.semanticmetadata.lire.imageanalysis.joint.JointHistogram",        // 3
            "net.semanticmetadata.lire.imageanalysis.AutoColorCorrelogram",  // 4
            "net.semanticmetadata.lire.imageanalysis.ColorLayout",           // 5
            "net.semanticmetadata.lire.imageanalysis.EdgeHistogram",         // 6
            "net.semanticmetadata.lire.imageanalysis.Gabor",                 // 7
            "net.semanticmetadata.lire.imageanalysis.JCD",                   // 8
            "net.semanticmetadata.lire.imageanalysis.JpegCoefficientHistogram",
            "net.semanticmetadata.lire.imageanalysis.ScalableColor",         // 10
            "net.semanticmetadata.lire.imageanalysis.SimpleColorHistogram",  // 11
            "net.semanticmetadata.lire.imageanalysis.Tamura",                // 12
            "net.semanticmetadata.lire.imageanalysis.LuminanceLayout",       // 13
            "net.semanticmetadata.lire.imageanalysis.PHOG",                   // 14
    };

I could fix by just adding 
"net.semanticmetadata.lire.imageanalysis.LocalBinaryPatterns" as additional 
entry.

Original issue reported on code.google.com by alessio....@gmail.com on 20 Apr 2015 at 8:14

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
The same type of fix has to be applied to the member called "featureFieldNames":

    public static final String[] featureFieldNames = new String[]{
            DocumentBuilder.FIELD_NAME_CEDD,                 // 0
            DocumentBuilder.FIELD_NAME_FCTH,                 // 1
            DocumentBuilder.FIELD_NAME_OPPONENT_HISTOGRAM,   // 2
            DocumentBuilder.FIELD_NAME_JOINT_HISTOGRAM,      // 3
            DocumentBuilder.FIELD_NAME_AUTOCOLORCORRELOGRAM, // 4
            DocumentBuilder.FIELD_NAME_COLORLAYOUT,          // 5
            DocumentBuilder.FIELD_NAME_EDGEHISTOGRAM,        // 6
            DocumentBuilder.FIELD_NAME_GABOR,                // 7
            DocumentBuilder.FIELD_NAME_JCD,                  // 8
            DocumentBuilder.FIELD_NAME_JPEGCOEFFS,           // 9
            DocumentBuilder.FIELD_NAME_SCALABLECOLOR,        // 10
            DocumentBuilder.FIELD_NAME_COLORHISTOGRAM,       // 11
            DocumentBuilder.FIELD_NAME_TAMURA,               // 12
            DocumentBuilder.FIELD_NAME_LUMINANCE_LAYOUT,     // 13
            DocumentBuilder.FIELD_NAME_PHOG,                 // 14
        DocumentBuilder.FIELD_NAME_LOCAL_BINARY_PATTERNS,// 15 ********** added **********
    };

Original comment by alessio....@gmail.com on 20 Apr 2015 at 9:17