Contour Analysis with ImageJ

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Contour Analysis with ImageJ

Ксения Белорусцева
Hello!

I'm just started with ImageJ and I need to compare two images without it's color properties. I guess it should be comparing of it's contours. How can I do this with ImageJ? 
Samlpe  function of OpenCV is called cvMatchShapes(...). It uses info about downlink areas of image. So, how can I get info about contours by ImageJ?
Thanks! 
Reply | Threaded
Open this post in threaded view
|

Re: Contour Analysis with ImageJ

Gabriel Landini
On Sunday 15 Apr 2012 07:40:21 Ксения Белорусцева wrote:
> I'm just started with ImageJ and I need to compare two images without it's
> color properties. I guess it should be comparing of it's contours. How can
> I do this with ImageJ?  Samlpe  function of OpenCV is called
> cvMatchShapes(...). It uses info about downlink areas of image. So, how can
> I get info about contours by ImageJ?

Hi I do not think that this has been implemented in IJ, but looks interesting.
Dimiter Prodanov implemented image moments some time ago, so his plugin might
provide some starting point:

http://rsbweb.nih.gov/ij/plugins/image-moments.html

Have a look here
http://opencv.willowgarage.com/documentation/c/structural_analysis_and_shape_descriptors.html

It appears that you need to get:
1. the shape moments and normalise them
2, compute the 7 Hu invariants from those, and
3. use one of 3 shown methods to get the shape match.

I think this should be doable as a plugin that expects 2 images as input (with
only 1 object each).Then:
 
4. Users could then implement a procedure to extract objects from images that
contain multiple objects so they can be submitted in pairs at a time (let's
say using the XS YS coordinates and binary reconstruction to extract an object
at a time from each image to compare them. Maybe there is a better/faster way
of doing this by encoding the shapes as ROIs and passing those instead, but
ROIs are not the exact representation of a pixel pattern.

Hope this helps.
Cheers
Gabriel