MATLAB: How to get the boundary points

boundaryImage Processing Toolbox

I have a mask(mask is for an image) which is saved in .mat format. Now, i want to take the boundary of this mask. Is it possible to convert from mask to boundary? Can anyone kindly guide me?

Best Answer

Yes. Use bwboundaries() to get a list of (x,y) coorindates. Use bwperim() if you want an image of the outer boundary.