Enforce minimal curvature
Hello, I have a series of thin lines on an image. The line is guaranteed not to bifurcate and will be a closed loop (The attached image does show the closed loop). The one issue that I am unsure on how to resolve is how to enforce a minimal convex (with respect to the inside of the closed loop White<=> inside Black <=> outside) curvature as well as how to bridge a gap of predetermined valley. Outside curvatures do not need to be restricted at all.
would become something like this:
additionally if there is a deep valley that can be bridged by N-pixels it would bridge the valley. Something like this:
would become something like this:
Thanks
Can you post code? We can help you.