MATLAB: How to recognize the boundary of an object

boundary of objectimage processingImage Processing Toolbox

Please let me know How to recognize the boundary of an object and determine the object area from that of an image in matlab. Thanks.

Best Answer

Assuming you have already segmented your object into foreground and background (you have a binary image), then try bwboundaries() to get a list of (x,y) coordinates, or bwperim() to get an image of the perimeter.