Skip to content Skip to sidebar Skip to footer

Can't Parse 'center'. Sequence Item With Index 0 Has A Wrong Type

I have written the following code in OpenCV in V.S. Code on Mac. I have assigned (pts1) pixel values of certains points in the image (img). But, when I try to circle the points I a

Solution 1:

The problem is just parsing the (x, y) or the (pts1[0][0], pts1[0][1]) to integers you just have to do the following (int(pts1[0][0]), int(pts1[0][1])) in the circle function

Solution 2:

Sol:

cv2.line(img, (**int**(corners_int[0, 0]), **int**(corners_int[0, 1])), (**int**(corners_int[3, 0]), **int**(corners_int[3, 1])), (255, 255, 0), 2)

Post a Comment for "Can't Parse 'center'. Sequence Item With Index 0 Has A Wrong Type"