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));
  }

Posted by Tommy™
,