CvMemStorage* storage = cvCreateMemStorage(0);
CvSeq *contours=cvCreateSeq(CV_SEQ_ELTYPE_POINT, sizeof(CvSeq), sizeof(CvPoint), storage);
cvClearMemStorage(storage);
cvClearSeq(contours);
int numContours = cvFindContours(img_Binarize, storage, &contours, sizeof(CvContour), CV_RETR_EXTERNAL, CV_CHAIN_APPROX_NONE, cvPoint(0,0));
CvSize Testsize;
Testsize.height = img_Binarize->height;
Testsize.width = img_Binarize->width;
IplImage* img_ContourTest = cvCreateImage(cvGetSize(img_Binarize), IPL_DEPTH_8U, 3);
CvSeq* copySeq = contours;
for( ; contours != 0; contours = contours->h_next )
{
cvDrawContours( img_ContourTest, contours, CV_RGB(255,255,0) , CV_RGB(255,255,0) , -1, 2, 8 ,cvPoint(0,0));
}
'[ Topics ] > OpenCV' 카테고리의 다른 글
cvCreateFileCapture returns null error and make CvvImage manally (DrawToHDC()) (0) | 2012.05.06 |
---|---|
cvFindContours() 함수 (0) | 2012.02.13 |
나의 구세주 : cvPointPolygonTest() (0) | 2012.02.09 |
OpenCV에서 영상위에 글자 출력 (0) | 2010.07.29 |
OpenCV 의 Cam Shift 알고리즘 (0) | 2010.03.16 |