MATLAB: Length of the curve in the image

curve length in the imageImage Processing Toolbox

Dear All;
I have curve with random shape , i want to measure it length in the image , is there any way to do it

Best Answer

http://www.mathworks.com/help/images/ref/bwdistgeodesic.html Let the mask be true only at the "end" of the curve, seed only at the "beginning" of the curve, BW is the curve, then the geodesic would be the shortest "distance" through the curve to get to the end.
http://www.mathworks.com/help/images/ref/bwtraceboundary.html and take number of rows in returned matrix