Find depths of hollows in stem section

Hello,
for an automatic plant measurement job, I have to measure the depths of the hollows represented by these blue crosses.
I managed to detect the bumps (red crosses) and the hollows (blue crosses).
To calculate the depth of a hollow you must first draw the “tangent” to the outline of the stem section (the scanned piece of plant)
passing through the two points farthest from the contour and not too far from the trough.
I know it’s not precise as an explanation but I think that if I could express myself more precisely I would have found the
solution on my own.
You can’t take the bumps because as you see in the example, the segment would go through the stem section.
I also tried to take the perpendicular to the segment going through the center of the section and the hollow, perpendicular tangent to the contour but that doesn’t work either.
This problem is not trivial and that is why I come to you.
Best regards

have a look at convexityDefects():

https://docs.opencv.org/4.x/d3/dc0/group__imgproc__shape.html#gada4437098113fd8683c932e0567f47ba

I succeeded by convexHull and a little code
res