Why are the coordinates of each crack not steady
I am trying to get the coordinates to keep still but when measure the x distance from the reference point (0,0) to the centroid of the crack (or contour) it would decrease as it is moving from left to right. I tried using a while loop counter but no luck. The coordinate calculations of the crack are correct but I can't understand why it decreases as it moves from left to right.
One possibility is that it has something to do with your code - which you don't show
.... or the image, also absent ;(