Followed the procedure to get SIFT features but getting empty .csv

22 views
Skip to first unread message

visha...@gmail.com

unread,
Apr 21, 2016, 9:13:16 AM4/21/16
to JFeatureLib

I want to extract SIFT values 
I have
JFeatureLib-1.6.4-jar-with-dependencies.jar
Downloaded the sift binary
have book.pgm
kept the jar and sift binary in C:\Program Files\Java\jdk1.8.0_25\bin 
and kept book.pgm as in source folder
Also edited the properties of jar and set path to C:/Program Files/Java/jdk1.8.0_25/bin/sift.exe
I have also checked the permissions

I am running following command 
C:\Program Files\Java\jdk1.8.0_25\bin>java -jar JFeatureLib-1.6.4-jar-with-dependencies.jar -D Sift -d D:\images\ -o D:\output.csv

I am not getting any error but output.csv is empty.. does not show any output.

Please help on this.
Am I missing something?
Waiting for your response...

Franz Graf

unread,
Apr 23, 2016, 5:24:53 AM4/23/16
to jfeat...@googlegroups.com
Hi,

in the first github-issue mail that I received, you also posted a stacktrace. I cannot see it now on github anymore.
There the exception was "java.io.IOException: Sift Binary not executable: C:Program FilesJavajdk1.8.0_25b
insift.exe"

Pleae 
- unpack the jfeaturelib.properties and 
- set the SIFT binary path in the properties file.
- retry.

Good Luck!
Franz


--
You received this message because you are subscribed to the Google Groups "JFeatureLib" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jfeaturelib...@googlegroups.com.
To post to this group, send email to jfeat...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

visha...@gmail.com

unread,
Apr 23, 2016, 6:43:43 AM4/23/16
to JFeatureLib
Hi,

Thanks for the reply. 
I had resolved the binary not executable issue after posting the issue. So I updated the question.


Now I am not getting any error. '.csv' get generated but does not show any output.
Initially it worked fine for CEDD features. But problem with the SIFT.
I will try all one more time carefully anw will let you know..

 Thanks.

Franz Graf

unread,
Apr 23, 2016, 6:49:36 AM4/23/16
to jfeat...@googlegroups.com
HI,

ah I see.
Have you tried converting your image to PGM (for ex. with IrfanView) and process it with Sift directly? So you can check if it's an issue with your image+Sift or with JFeatureLib+Sift.

Good Luck!
Franz

--
You received this message because you are subscribed to the Google Groups "JFeatureLib" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jfeaturelib...@googlegroups.com.
To post to this group, send email to jfeat...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

visha...@gmail.com

unread,
Apr 23, 2016, 7:56:27 AM4/23/16
to JFeatureLib


Hi,
 
Thanks for replying..
 
Yes I have the images in PGM format.
I have tried all steps again.
Nothing has happened.
I cant figuring it out that the command I had given worked with CEDD and the problem was only with SIFT but now its not even working with CEDD.
cmd is not showing any error
I also have noticed one thing that even after  removing the sift.exe (or siftWin32.exe) from the classpath, cmd is not showing any error.


I have
JFeatureLib-1.6.4-jar-with-dependencies.jar
Downloaded the sift binary

have images in .pgm form.


kept the jar and sift binary in C:\Program Files\Java\jdk1.8.0_25\bin 
and kept book.pgm as in source folder
Also edited the properties of jar and set path to C:/Program Files/Java/jdk1.8.0_25/bin/sift.exe
I have also checked the permissions

I am running following command 
C:\Program Files\Java\jdk1.8.0_25\bin>java -jar JFeatureLib-1.6.4-jar-with-dependencies.jar -D Sift -d D:\images\ -o D:\output.csv


I am not getting any error but output.csv is empty.. does not show any output.

I do not have any idea what to do now.

 

visha...@gmail.com

unread,
Apr 23, 2016, 8:12:20 AM4/23/16
to JFeatureLib
Hi,

I have tried SIFT+image
using following command


C:\Program Files\Java\jdk1.8.0_25\bin>siftWin32 -display <D:\book.pgm >result.pgm

getting the output as
Finding keypoints...
882 keypoints found.
PGM file output.

But I want the keypoints as an output

and also tried the

sift <book.pgm >book.key 

Its working.
How to read this key file.
My aim is to learn a Dictionary using SIFT descriptors
 

Franz Graf

unread,
Apr 23, 2016, 9:07:22 AM4/23/16
to jfeat...@googlegroups.com
Hi,

have you checked if a .log file was written?

Franz

--
You received this message because you are subscribed to the Google Groups "JFeatureLib" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jfeaturelib...@googlegroups.com.
To post to this group, send email to jfeat...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

visha...@gmail.com

unread,
Apr 23, 2016, 9:23:31 AM4/23/16
to JFeatureLib
Hi,
Yes I have checked the .log file.
There is on log in a file. It is empty. 

Vishal Ezen

unread,
Apr 26, 2016, 8:30:47 AM4/26/16
to JFeatureLib

Hi Franz,
 
I have used the surf demo provided at https://github.com/locked-fg/JFeatureLib-Demo
to get the idea of getting SIFT features. I got some code from your previous discussions and after some editing
the code worked fine.
Thanks..
code is
 
 public class SiftTest {

    public static void main(String[] args) throws FileNotFoundException, IOException {

        BufferedImage img = ImageIO.read(new FileInputStream("D:\\images\\book.jpg"));
        ImageProcessor ip = new ColorProcessor(img);
        ip = ip.convertToByte(false);
        Sift sift = new Sift(new File("C:\\siftWin32.exe"));
        sift.run(ip);
        
        List<double[]> result = sift.getFeatures();
        System.out.println(result.size() + " features extracted...");
}
}

Thank you so much.
I want to use SIFT features to construct a dictionary (bag of words) and then sparse code each data vector using this dictionary.After this, using the indices in the dictionary for each active basis in the sparse code I have to construct hash code for each data vector.


Can you please suggest anything for this. or how can I use JFeatureLib in this case?...
Thanks for your help.

    Franz Graf

    unread,
    Apr 26, 2016, 12:23:45 PM4/26/16
    to jfeat...@googlegroups.com
    Hi,

    hm strange!
    Thanks a lot for posting the solution. can you copy over the code snippet to the github issue and close it?
    That would be grat.

    Regarding the question about BoW: that's definitely no more the area of JFeatureLib. JFeatureLib is just about extraction.
    But sorry, I can't help any further with that. That's not my special field.

    Good luck!
    Franz


    --
    You received this message because you are subscribed to the Google Groups "JFeatureLib" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to jfeaturelib...@googlegroups.com.
    To post to this group, send email to jfeat...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    Vishal Ezen

    unread,
    Apr 27, 2016, 1:29:56 AM4/27/16
    to JFeatureLib
    Hi,
    Thank you so much for your great help!
    The work you have done and the way you are helping the developers is much appreciable...
    Thanks once again.. 

    Franz Graf

    unread,
    Apr 27, 2016, 4:22:23 AM4/27/16
    to jfeat...@googlegroups.com
    Thanks a million for the Feedback.
    That's the feedback that keeps me maintaining the project :-)

    Franz

    --
    You received this message because you are subscribed to the Google Groups "JFeatureLib" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to jfeaturelib...@googlegroups.com.
    To post to this group, send email to jfeat...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    Reply all
    Reply to author
    Forward
    0 new messages