double BlobGetXYInside::operator()(Blob &blob) { if( blob.GetExternalContour()->GetContourPoints() ) { return cvPointPolygonTest( blob.GetExternalContour()->GetContourPoints(), m_p,0) >= 0; } return 0; }
double BlobGetMaxYatMinX::operator()(Blob &blob) { double result = LONG_MIN; CvSeqReader reader; CvPoint actualPoint; BlobContour::t_PointList externContour; externContour = blob.GetExternalContour()->GetContourPoints(); if( !externContour ) return result; cvStartReadSeq( externContour, &reader); for( int i=0; i< externContour->total; i++) { CV_READ_SEQ_ELEM( actualPoint, reader); if( (actualPoint.x == blob.MinX()) && (actualPoint.y > result) ) { result = actualPoint.y; } } return result; }