Edge Detection Example

29 views
Skip to first unread message

Brody Smith

unread,
Aug 19, 2015, 6:36:50 PM8/19/15
to JFeatureLib
Hello,
I am trying to use the JFeatureLib but I am having trouble using the edgeDetector classes and can't find any examples of use.

File f = new File("someimage.jpg");
        final ColorProcessor image = new ColorProcessor(ImageIO.read(f));
        
        //Haralick descriptor = new Haralick();
        LaplaceFilter descriptor = new LaplaceFilter();
        descriptor.addPropertyChangeListener(new PropertyChangeListener(){

            @Override
            public void propertyChange(PropertyChangeEvent evt) {
                Progress progress = (Progress)evt.getNewValue();
                
                System.out.println(progress.getMessage() + " " + progress.getProgress());
                if(progress.getMessage().equals("finished")){
                    //What to do here?
                }
            }
        });
        
        descriptor.run(image);

I am not sure what to do when the image is done processing, how do I view and or interpret the results?

Thanks,
Brody Smith

Franz Graf

unread,
Aug 23, 2015, 6:05:25 AM8/23/15
to jfeat...@googlegroups.com
Hey Brody,

what exactly are you trying to do?

Just extracting features?
In this case: have you had a look at the examples?
https://github.com/locked-fg/JFeatureLib-Demo/blob/master/src/main/java/de/lmu/dbs/ifi/jfeaturelib/examples/HaralickDemo.java

Well if you listen for the events, you could just add
descriptor.getFeatures() to obtain the extracted values.

Does this help you?
Regards
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.



--
Dr. Franz Graf
Website: http://www.Locked.de
Google+: https://plus.google.com/u/0/107945158062341260943
Xing: https://www.xing.com/profile/Franz_Graf4
Reply all
Reply to author
Forward
0 new messages