Ask Your Question

Revision history [back]

There are the different (Hu-)moments:

http://docs.opencv.org/modules/imgproc/doc/structural_analysis_and_shape_descriptors.html?highlight=moments#structural-analysis-and-shape-descriptors

You could easily compute your compactness via cv::arcLength (perimeter) and cv::contourArea