-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Closed
Labels
Description
System information (version)
- OpenCV => 3.4.3
- Operating System / Platform => MacOS 10.12.6
- Compiler => Python 3.7.0
Detailed description
The tutorial Detection of ArUco Markers doesn't work with the supplied image. (See this Stack Overflow question).
Steps to reproduce
Run this program with the supplied image. It rejects all marker candidates. I tried an equivalent C++ program and had the same result. I tried the same program with a different image using the aruco.DICT_4X4_50 dictionary and it worked fine. I don't know if the problem is with the 6X6 dictionary or that the source image doesn't have enough resolution to work with the 6x6 dictionary.
import numpy as np
import cv2
import cv2.aruco as aruco
image = cv2.imread("52814747.png")
aruco_dict = aruco.Dictionary_get(aruco.DICT_6X6_250)
parameters = aruco.DetectorParameters_create()
corners, ids, rejectedImgPoints = aruco.detectMarkers(
image, aruco_dict, parameters=parameters)
print(corners, ids, rejectedImgPoints)
aruco.drawDetectedMarkers(image, corners, ids)
aruco.drawDetectedMarkers(image, rejectedImgPoints, borderColor=(100, 0, 240))
cv2.imshow('so52814747', image)
cv2.waitKey(0)
cv2.destroyAllWindows() vmandke, berak, jyrgenlaks, walchko, abetusk and 4 more