Hello,
i have a picture where i can easily find contours in. And i am also able to put a minAreaRect around it and display its width and height.
Now im wondering whether i can also calculate the height of the contour at different positions. Maybe i can even calculate height (y-direction) for every pixel in x-direction and display the minimum and maximum height?
So far i havent found a solution, this topic has good ideas but i cant come to a solution: opencv - Contour width measurement along its entire lendth - Stack Overflow
My contours are even easier i guess, its always oval shaped.
example: this is what i do at the moment without problems
example: this is what i would like to have
So far i havent found a way to solve the problem. I looked into DistanceTransform but i dont know how to use it so i can calculate height at different positions. The contours are ALWAYS oval shaped and have similar ratio. The x length is always greater than y length and its horizontally aligned.