Lines Matching defs:hull
231 union { CvContour* c; CvSeq* s; } hull;
238 hull.s = 0;
298 "The hull matrix should be continuous and have a single row or a single column" );
301 CV_ERROR( CV_StsBadSize, "The hull matrix size might be not enough to fit the hull" );
306 "The hull matrix must have the same type as input or 32sC1 (integers)" );
397 /* gather upper part of convex hull to output */
452 the bottom part of the convex hull is the mirrored top part
496 hull.s = hullseq;
497 hull.c->rect = cvBoundingRect( ptseq,
510 return hull.s;
530 /* is orientation of hull different from contour one */
536 CvSeq *ptseq = (CvSeq*)array, *hull = (CvSeq*)hullarray;
561 if( CV_IS_SEQ( hull ))
563 int hulltype = CV_SEQ_ELTYPE( hull );
566 "Convex hull must represented as a sequence "
569 storage = hull->storage;
573 CvMat* mat = (CvMat*)hull;
575 if( !CV_IS_MAT( hull ))
576 CV_ERROR(CV_StsBadArg, "Convex hull is neither sequence nor matrix");
584 CV_ERROR( CV_StsBadSize, "Convex hull is larger than the point sequence" );
586 CV_CALL( hull = cvMakeSeqHeaderForArray(
592 is_index = CV_SEQ_ELTYPE(hull) == CV_SEQ_ELTYPE_INDEX;
600 if( ptseq->total < 4 || hull->total < 3)
603 // "point seq size must be >= 4, convex hull size must be >= 3" );
607 /* recognize co-orientation of ptseq and its hull */
614 CvPoint* pos = *CV_SEQ_ELEM( hull, CvPoint*, 0 );
617 pos = *CV_SEQ_ELEM( hull, CvPoint*, 1 );
620 pos = *CV_SEQ_ELEM( hull, CvPoint*, 2 );
625 index1 = *CV_SEQ_ELEM( hull, int, 0 );
626 index2 = *CV_SEQ_ELEM( hull, int, 1 );
627 index3 = *CV_SEQ_ELEM( hull, int, 2 );
638 cvStartReadSeq( hull, &hull_reader, rev_orientation );
653 /* cycle through ptseq and hull with computing defects */
654 for( i = 0; i < hull->total; i++ )
680 /* go through ptseq to achieve next hull point */
689 /* compute distance from current point to hull edge */
713 CV_PREV_SEQ_ELEM( hull->elem_size, hull_reader );
717 CV_NEXT_SEQ_ELEM( hull->elem_size, hull_reader );