Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Error with Contour functions in OpenCV 2.4.3

Almost all the functions related to contours returns an error :

TypeError: points data type = 5 is not supported

This is the code I tried :

first = cv2.inRange(hsv,obj1_min,obj2_max)
contours,hierarchy = cv2.findContours(first,cv2.RETR_LIST,cv2.CHAIN_APPROX_SIMPLE)
cnt = contours[0]
rect = cv2.boundingRect(cnt)

Or try contours.py in /samples/python2 folder.

What is the problem? Is it a bug?

Error with Contour functions in OpenCV 2.4.3

Almost all the functions related to contours returns an error :

TypeError: points data type = 5 is not supported

This is the code I tried :

first = cv2.inRange(hsv,obj1_min,obj2_max)
contours,hierarchy = cv2.findContours(first,cv2.RETR_LIST,cv2.CHAIN_APPROX_SIMPLE)
cnt = contours[0]
rect = cv2.boundingRect(cnt)

Or try contours.py in /samples/python2 folder.

What is the problem? Is it a bug?

UPDATE :

This error occurs when I am using OpenCV 2.4.3.

Same code run fine in OpenCV 2.4.2. So I am using 2.4.2 now.