在使用opencv库的时候,有时候因为opencv版本问题,导致产生了一下问题:
cv.circle(img, (pts1[0][0], pts1[0][1]), 5, (0,0,255), cv.FILLED)
cv2.error: OpenCV(4.5.2) error: (-5:Bad argument) in function ‘circle’
Overload resolution failed:
- Can’t parse ‘center’. Sequence item with index 0 has a wrong type
- Can’t parse ‘center’. Sequence item with index 0 has a wrong type
因为是数据不是整形导致的,将里面的数据强行转换成整数就能解决了。
详细参考:
https://stackoverflow.com/questions/67851320/cant-parse-center-sequence-item-with-index-0-has-a-wrong-type
https://stackoverflow.com/questions/68874634/cv2-error-opencv4-5-3-error-bad-argument-overload-resolution-failed-in-cv