When using the detectBoard function the aruco codes are recognized but the charuco corners are returned as none type.
I am using opencv 4.8.1. My code looks like this:
dictionary = cv2.aruco.getPredefinedDictionary(cv2.aruco.DICT_4X4_50)
board = cv2.aruco.CharucoBoard((10,7),0.0297,0.0218,dictionary)
detector = cv2.aruco.CharucoDetector(board)
img = cv2.imread("/path/to/img")
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
charuco_corners, charuco_ids, marker_corners, marker_ids = detector.detectBoard(gray)
print(type(charuco_corners)) # NoneType
print(type(charuco_ids)) # NoneType
marker_img = cv2.aruco.drawDetectedMarkers(img, marker_corners, marker_ids)
cv2.imwrite('markers.png', marker_img)
Am I missing something?
I can also upload the input image if required. As I am a new user I cannot do it in one post.