Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Afaik findContours gives you a list of contours, i.e. if you know that it gave exactly one contour, compare originalContours[0] w. drawContours[0], otherwise you can compare each possible combination, e.g.

for i in range(len(orginalContours)):
  for k in range(len(drawnContours)):
    print cv2.matchShapes(drawnContours[k],orginalContours[i],cv2.cv.CV_CONTOURS_MATCH_I1, 0.0)