Ask Your Question

Revision history [back]

ArUco markers detected slightly too small

I've found that ArUco will detect markers as slightly smaller than they actually are unless I crank up the contrast on the image beforehand. Does anyone have a suggestion for a better way to solve this problem? If I have multiple markers and some are in shadowy areas of the image, I'm worried that cranking up the contrast will just make the darker markers disappear entirely.

Here's the relevant code (python 3.7):

aruco_dict = aruco.Dictionary_get(aruco.DICT_4X4_250)
file = "test_images/flat1_contrast.jpg"
frame = cv2.imread(file, cv2.IMREAD_COLOR)
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
parameters =  aruco.DetectorParameters_create()
parameters.cornerRefinementMethod = aruco.CORNER_REFINE_SUBPIX
corners, ids, rejectedImgPoints = aruco.detectMarkers(frame, aruco_dict, parameters=parameters)
frame_markers = aruco.drawDetectedMarkers(frame.copy(), corners, ids)

link to example images: https://imgur.com/a/RngEIra

Thanks!