Isolate a portion of an edge-detected image

3 views (last 30 days)
N.B.
N.B. on 7 May 2013
Hi,
In the image below, I am looking to isolate the middle of the three ellipses in the top row. What is the best way of isolating the middle ellipse without specifically selecting it?
Thanks!

Answers (1)

Image Analyst
Image Analyst on 7 May 2013
I'm not sure which are the three you're interested in. Plus, I'm not sure that the edge detection method you used is the best method. Can we see the original grayscale image? Unless I see the original I can't know what you did is optimal. Maybe chan vese segmentation would be better, or maybe some other method - who knows. As it is, you don't have obvious enough ellipses to identify.
  2 Comments
N.B.
N.B. on 7 May 2013
Edited: Image Analyst on 7 May 2013
I'm trying to take isolate the middle bean in the top row, and then take some measurements of it. I have about 40 of these images that I am looking to place into a loop.
Image Analyst
Image Analyst on 7 May 2013
Edited: Image Analyst on 7 May 2013
That is so easy. Why complicate it with messy broken edge detection when run of the mill thresholding will work? First of all, get rid of that metal plate - that just complicates the image unnecessarily. Use a uniform background like a sheet of paper. Then simply threshold and find blobs as in my BlobsDemo tutorial: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862. You may need to examine the Euler number to distinguish the nut from the beans, or better yet, like the plate, just don't put it in there in the first place. Then you can get all kinds of measurements from your beans. For even more accurate detection, take a "blank shot" of the background and divide your image by that, then threshold at a value of between 0.9 and 1.1 or so. Look at the std dev of the blobs to determine if a bean is outside side up or interior side up. Your next step is to download my image segmentation tutorial and apply it to your image instead of the demo. Let me know how it goes.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!