How to find maximum and minimum coordinates of a binary Image?
Show older comments
I have a color image, I converted it to black and white and removed noises. Now I want to find the Xmax, Ymax, Xmin, Ymin (maximum and minimum coordinates)of the white object in my Image so that I can draw a rectangle border around the Object. How can I achieve this. Please guide me!
Here is my image.
Accepted Answer
More Answers (1)
Walter Roberson
on 24 Mar 2013
bb = regionprops(YourImage, 'BoundingBox');
rectangle( 'Position', bb.Boundingbox );
Categories
Find more on Display Image in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!