2

Can some one help me in which order cvFindContours function will find the contours in an image. I have an image which has only 0 to 9 numbers. That means image contains "0123456789" characters. I am trying to find out contours using cvFindContours function, but it is giving contours in different order each time. I there any way to find out the contours in the order. I mean based on pixel position of the contour in the image.

I am using cvFindContours as shown below

cvFindContours( frame, storage, &pContour, sizeof(CvContour),CV_RETR_EXTERNAL, CV_CHAIN_APPROX_SIMPLE, cvPoint(0, 0) );

pContourLow=cvApproxPoly(pContour, sizeof(CvContour), storage,CV_POLY_APPROX_DP,1,1);

Actually cvApproxPoly is returning number of contours correctly as i wanted. It is giving me 10 outer contours as my image has 0 to 9 characters in image.

I know that with our image its quite tough to understand but I am not able to upload the image.

Any help is appriciated

Ander Biguri
  • 35,140
  • 11
  • 74
  • 120
Steve Mark
  • 477
  • 1
  • 4
  • 3

0 Answers0