Lines Matching full:hull
201 // gather upper part of convex hull to output
239 // the bottom part of the convex hull is the mirrored top part
257 Mat hull = _hull.getMat();
258 size_t step = !hull.isContinuous() ? hull.step[0] : sizeof(Point);
260 *(Point*)(hull.ptr() + i*step) = data0[hullbuf[i]];
277 Mat hull = _hull.getMat();
278 int hpoints = hull.checkVector(1, CV_32S);
282 const int* hptr = hull.ptr<int>();
285 // 1. recognize co-orientation of the contour and its hull
288 // 2. cycle through points and hull, compute defects
308 // go through points to achieve next hull point
314 // compute distance from current point to hull edge
398 union { CvContour* c; CvSeq* s; } hull;
399 hull.s = 0;
446 "The hull matrix should be continuous and have a single row or a single column" );
449 CV_Error( CV_StsBadSize, "The hull matrix size might be not enough to fit the hull" );
454 "The hull matrix must have the same type as input or 32sC1 (integers)" );
470 return hull.s;
501 hull.s = hullseq;
502 hull.c->rect = cvBoundingRect( ptseq,
507 return hull.s;
522 /* is orientation of hull
528 CvSeq *ptseq = (CvSeq*)array, *hull = (CvSeq*)hullarray;
551 if( CV_IS_SEQ( hull ))
553 int hulltype = CV_SEQ_ELTYPE( hull );
556 "Convex hull must represented as a sequence "
559 storage = hull->storage;
563 CvMat* mat = (CvMat*)hull;
565 if( !CV_IS_MAT( hull ))
566 CV_Error(CV_StsBadArg, "Convex hull is neither sequence nor matrix");
574 CV_Error( CV_StsBadSize, "Convex hull is larger than the point sequence" );
576 hull = cvMakeSeqHeaderForArray(
582 is_index = CV_SEQ_ELTYPE(hull) == CV_SEQ_ELTYPE_INDEX;
589 if( ptseq->total < 4 || hull->total < 3)
592 // "point seq size must be >= 4, convex hull size must be >= 3" );
596 /* recognize co-orientation of ptseq and its hull */
603 CvPoint* pos = *CV_SEQ_ELEM( hull, CvPoint*, 0 );
606 pos = *CV_SEQ_ELEM( hull, CvPoint*, 1 );
609 pos = *CV_SEQ_ELEM( hull, CvPoint*, 2 );
614 index1 = *CV_SEQ_ELEM( hull, int, 0 );
615 index2 = *CV_SEQ_ELEM( hull, int, 1 );
616 index3 = *CV_SEQ_ELEM( hull, int, 2 );
627 cvStartReadSeq( hull, &hull_reader, rev_orientation );
642 /* cycle through ptseq and hull with computing defects */
643 for( i = 0; i < hull->total; i++ )
669 /* go through ptseq to achieve next hull point */
678 /* compute distance from current point to hull edge */
702 CV_PREV_SEQ_ELEM( hull->elem_size, hull_reader );
706 CV_NEXT_SEQ_ELEM( hull->elem_size, hull_reader );