MATLAB: Get the coordinates of a curve

bwboundariescontourImage Processing Toolbox

I have a binary figure. I'd like to find the contour of the bright part. I used h=contour(mat,[x,x]); However, I do not need MATLAB to plot h. I just need the value of h. Is there a proper parameter of contour or another matlab function?

Best Answer

You can use contourc to do the contour calculations without displaying any contour.
I would suggest to you that regionprops() would likely be more appropriate than contour(). contour() on a binary image is just going to look like a morophological filtering of the binary image.
Related Question