The error points is not a numerical tuple is being output.
# Converting image to a binary image
# ( black and white only image).
blur = cv2.GaussianBlur(img,(5,5),0)
_, threshold = cv2.threshold(blur, 0, 255, cv2.THRESH_BINARY+cv2.THRESH_OTSU)
contours, hierarchy = cv2.findContours(threshold, cv2.RETR_TREE, cv2.CHAIN_APPROX_NONE)
print(contours)
minArea = cv2.minAreaRect(contours)
The contours are:
(array([[[747, 305]],
[[746, 306]],
[[745, 306]],
[[744, 307]],
[[743, 308]],
[[743, 309]],
[[744, 310]],
[[744, 311]],
[[744, 312]],
[[744, 313]],
[[757, 306]],
[[756, 306]],
[[755, 306]],
[[754, 306]],
[[753, 306]],
[[752, 305]],
[[751, 305]],
[[750, 305]],
[[749, 305]],
[[748, 305]]], dtype=int32),)
Overload resolution failed:
- points is not a numerical tuple
- Expected Ptr<cv::UMat> for argument 'points'
Is there anything obvious I'm doing wrong?