How to crop away convexity defects?
This approach works only on points. You don’t need to create masks for this. The main idea is: Find defects on contour If I find at least two defects, find the two closest defects Remove from the contour the points between the two closest defects Restart from 1 on the new contour I get the … Read more