Finding the location of lines in an image.

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

Finding the location of lines in an image.

Justin McGrath
I have a lot of pictures similar to this one
http://www.life.uiuc.edu/ainsworth/example/2007-05-10__7002.jpg

I have macros and plugins to detect the leaf and measure area if you
draw a selection box around it, but I would like to have a solution
that can take an image and find the leaf without user input.  Last
year I collected thousands and they were done with the macros and
everyone who helped me is sick of it.

I have a plugin that calculates a greeness index and I can threshold
that to segment out most of the unwanted stuff.  From there I've tried
things to get rid of noise and then used find maxima to find my leaf.
However, all the noise on the sides of the images causes problems,
especially since it's mostly green stuff.

I'd like to find the edges of the white square and crop the image
(they sometimes vary a lot from image to image - another problem).
Edge detection finds the edges well, but I don't know how to get any
information about the lines.  A linear Hough transformation seems like
it would work, especially since I could just look for lines at 90
degrees, but I can't find a plugin that implements it. However, I see
posts about one for ImageJ.

Anyone know where I can get a plugin for the Hough transform or do you
know a better solution to crop the unwanted part?  Also, do you know
of some good ways to segment out the leaf of interest?

Thanks for the help.
Justin
Reply | Threaded
Open this post in threaded view
|

Re: Finding the location of lines in an image.

Albert Cardona
>  Also, do you know
> of some good ways to segment out the leaf of interest?


Considering the leaf stands our a lot on the white background, wouldn't
this work:

1) threshold
2) analyze particles
3) keep particles within certain size range and certain circularity measure.

The one particle found is your leaf. Then you have the ROI for the particle.

Albert
Reply | Threaded
Open this post in threaded view
|

Re: Finding the location of lines in an image.

jeanpat
In reply to this post by Justin McGrath
You can find the source code implementing the Hough tranformation for
line detection at http://www.imagingbook.com/fileadmin/de/java2/ch09.zip
I didn't try yet to compile it.

I hope it might help you.

JP Pommier
http://www.bioinformatics.org/DIP4FISH/

Le samedi 12 mai 2007 à 21:52 -0500, Justin McGrath a écrit :

> I have a lot of pictures similar to this one
> http://www.life.uiuc.edu/ainsworth/example/2007-05-10__7002.jpg
>
> I have macros and plugins to detect the leaf and measure area if you
> draw a selection box around it, but I would like to have a solution
> that can take an image and find the leaf without user input.  Last
> year I collected thousands and they were done with the macros and
> everyone who helped me is sick of it.
>
> I have a plugin that calculates a greeness index and I can threshold
> that to segment out most of the unwanted stuff.  From there I've tried
> things to get rid of noise and then used find maxima to find my leaf.
> However, all the noise on the sides of the images causes problems,
> especially since it's mostly green stuff.
>
> I'd like to find the edges of the white square and crop the image
> (they sometimes vary a lot from image to image - another problem).
> Edge detection finds the edges well, but I don't know how to get any
> information about the lines.  A linear Hough transformation seems like
> it would work, especially since I could just look for lines at 90
> degrees, but I can't find a plugin that implements it. However, I see
> posts about one for ImageJ.
>
> Anyone know where I can get a plugin for the Hough transform or do you
> know a better solution to crop the unwanted part?  Also, do you know
> of some good ways to segment out the leaf of interest?
>
> Thanks for the help.
> Justin
>