I am seeing this term in every image processing object recognition tutorial, but no one explains what this is. They only explain how to find convexity defects but what is a convexity defect?

Thank you.


In simple words, convexity defect is a cavity in an object (blob, contour) segmented out from an image. That means an area that do not belong to the object but located inside of its outer boundary -convex hull (read documentation of cv::convexHull function for details).

The image below shows it better than million of words. Areas between fingers (all marked with arrows) in this schematics of a hand contour are the convexity defects.

Convexity defects example

You can find the defects using OpenCV's function cv::convexityDefects.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.