MATLAB: Calculating perimeter of object!

image processingImage Processing Toolboxmeasuretrace

Hi Folks,
So, I want to calculate the perimeter of an object. I have posted an image to this question. I wrote a short script – which I found on Mathworks – to trace the object of interest with a green trace. I was wondering if I can calculate the perimeter of this object. The perimeter measurement would be acquired first in number of pixels, and then I would convert that number into a physical SI measurement using a value I have written down.
My question is… How would I go about this? Also, would tracing the perimeter of the object, as I have done, help? Or, does tracing just serve to be a visual aid?
Here is the figure. The green is obviously the trace of the perimeter. In advance, thank you for reading through this!

Best Answer

Go back to the mask without the green traced in, and use regionprops() and ask for Perimeter