I attach a segmented image done in Matlab and an excel graph related to that image (and other images in series).
What Matlab does is to count (sum()) the pixels in every column from top to bottom until the first red pixel of the mask and proceed to the next column do the same scanning.
Thus, you will be able to see in the excel graph the shape of the contour (mask) of different images. You will also, be able to see, various spikes attached to the curves.
By noticing, the image, the contour is seamless with no spikes.
Can you tell the source of those spikes? How did they appear? What is the reason that caused them?
Can they be eliminated somehow and keep a clear curve in the excel graph.
P.S; The excel graph is created by exporting the pixel values measured by the sum() command to different cells and create the plots in the excel.