MATLAB: How to Find the min and max coordinates of an object in an image

bounding boxImage Processing Toolboxmin max coordinates

How to find the minX,minY,maxX,maxY of an object in a binary image

Best Answer

[I,J]=find(yourImage);
minIJ=min([I,J],[],1);
maxIJ=max([I,J],[],1);