|
|
@ -455,7 +455,7 @@ cvConvexHull2( const CvArr* array, void* hull_storage, |
|
|
|
|
|
|
|
|
|
|
|
hullseq = cvMakeSeqHeaderForArray( |
|
|
|
hullseq = cvMakeSeqHeaderForArray( |
|
|
|
CV_SEQ_KIND_CURVE|CV_MAT_TYPE(mat->type)|CV_SEQ_FLAG_CLOSED, |
|
|
|
CV_SEQ_KIND_CURVE|CV_MAT_TYPE(mat->type)|CV_SEQ_FLAG_CLOSED, |
|
|
|
sizeof(contour_header), CV_ELEM_SIZE(mat->type), mat->data.ptr, |
|
|
|
sizeof(hull_header), CV_ELEM_SIZE(mat->type), mat->data.ptr, |
|
|
|
mat->cols + mat->rows - 1, &hull_header, &hullblock ); |
|
|
|
mat->cols + mat->rows - 1, &hull_header, &hullblock ); |
|
|
|
cvClearSeq( hullseq ); |
|
|
|
cvClearSeq( hullseq ); |
|
|
|
} |
|
|
|
} |
|
|
@ -475,6 +475,7 @@ cvConvexHull2( const CvArr* array, void* hull_storage, |
|
|
|
cv::convexHull(cv::cvarrToMat(ptseq, false, false, 0, &_ptbuf), h0, |
|
|
|
cv::convexHull(cv::cvarrToMat(ptseq, false, false, 0, &_ptbuf), h0, |
|
|
|
orientation == CV_CLOCKWISE, CV_MAT_CN(hulltype) == 2); |
|
|
|
orientation == CV_CLOCKWISE, CV_MAT_CN(hulltype) == 2); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( hulltype == CV_SEQ_ELTYPE_PPOINT ) |
|
|
|
if( hulltype == CV_SEQ_ELTYPE_PPOINT ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
const int* idx = h0.ptr<int>(); |
|
|
|
const int* idx = h0.ptr<int>(); |
|
|
|