From: murat on
Hi to everyone,
I have the image of beans below,
http://www.flickr.com/photos/48553451(a)N08/4442334371/

I want to measure length and width for every individual bean. As you see the length is the longest axis that means the distance between two pixels that are furthest to each other on the bean image and the width is the longest axis that cut the length perpendicular.
I did this with ellipsoidal approach, bouncing box etc. but I want to learn that how can i draw the length axis on the image for every bean and measure it immediately.
Is there anyone can help me, please?
Thanks.
From: ImageAnalyst on
murat:
First of all, that's a lousy picture. You really need to improve your
image capture situation. The shadows are inhibiting your ability to
detect where the edges of the beans are. It's always better to fix up
your image acquisition environment, if you can, rather than employ
complicated and sophisticated algorithms to try to fix the bad image
in the analysis software. Fortunately this is easy to do. You just
need to have lights coming in from more angles. For example, use a
ring fluorescent light and put the beans in the center, or use a light
booth that's all white inside, like an integrating sphere.

Second, I'm not sure what the question is. It looks like you're
already finding the major axis and it's perpendicular, at least for
three of them. So to do it for every bean, simply loop over all beans
that were detected and do the same thing you were doing.
-ImageAnalyst
From: ImageAnalyst on
And where are you placing the perpendicular along the major axis?
Half way down? At the point where the bean is widest? If so, what if
several perpendicular positions have the same width?
From: murat on
Dear Image Analyst,
Thank you for your reply. I know that the image is not good (so bad!), and unfortunately I draw that lines with hand not with matlab. If the image is good enough what is the way to draw these lines? For example for binary image? Consider that I have bw image of this with certain borders then how can I draw and measure these lines for all individual bean?
Thank you in advance.
From: murat on
ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <567e5da9-e193-46a2-8a94-24b1e182c3ad(a)u33g2000yqe.googlegroups.com>...
> And where are you placing the perpendicular along the major axis?
> Half way down? At the point where the bean is widest? If so, what if
> several perpendicular positions have the same width?

Yes the perpendicular along the major axis is at the poing where the ben is widest, exactly.. then I can say that if there are more than one longest perpendicular with same width I can take only one of them, because I need the value at the end..
thanks.
 |  Next  |  Last
Pages: 1 2
Prev: Error with accelerator mode
Next: randperm cell array