I want to make bounding box
Show older comments
I want to make a bounding box in the area of the eye in this picture, so I can find the midpoint of the eye area, but I do not know how to make it. I was expecting help from the experienced. thanks in advance.
this is the picture:
href="http://www.freeimagehosting.net/3z35z"<img src="http://www.freeimagehosting.net/t/3z35z.jpg"></a>
Accepted Answer
More Answers (1)
You can use h=IMRECT if you want to draw the bounding box interactively. Then use createMask(h) to get a logical map of the region.
9 Comments
Lidank Abiel
on 10 Dec 2012
Lidank Abiel
on 10 Dec 2012
Matt J
on 10 Dec 2012
I can't read your code. Please use the "{} Code" menu tool to format it.
Lidank Abiel
on 10 Dec 2012
Well, I can't run your code because I don't have eye.jpg, etc..., but the image you posted here indicates that you are already able to segment the region of the eyes into 2 separate black & white regions. REGIONPROPS should work directly on that black and white map.
What exactly is the problem you still have, which the bounding box is supposed to fix? Is it a problem of automating the segmentation? How have you been doing the segmentation of the eyes so far?
Image Analyst
on 10 Dec 2012
I already gave him complete code that finds both the centroids and bounding boxes on his eyes image below in my answer. I haven't heard from him yet either.
Lidank Abiel
on 11 Dec 2012
Image Analyst
on 11 Dec 2012
Just copy, paste, change filename to make it valid, and run. It shouldn't take more than a few seconds to try it.
Categories
Find more on Blue in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!