double BlobGetHullArea::operator()(Blob &blob) { CvSeq *convexHull; double area; convexHull = blob.GetConvexHull(); if( convexHull ) area = fabs(cvContourArea(convexHull)); else return 0; cvClearSeq(convexHull); return area; }
double BlobGetHullPerimeter::operator()(Blob &blob) { CvSeq *convexHull; double perimeter; convexHull = blob.GetConvexHull(); if( convexHull ) perimeter = fabs(cvArcLength(convexHull,CV_WHOLE_SEQ,1)); else return 0; cvClearSeq(convexHull); return perimeter; }