-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Ambiguity problem in the detection of the ArUco marker when it is parallel to the camera plane #3190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@DanielBilbao12, сould you attach the non-modified input data (PNG or mp4)? |
Hi @AleksandrPanov! I attach you the unmodified input data: https://drive.google.com/file/d/1-3yyTk0BvmliMr_G9VdO0wE7Gxn2SXP4/view?usp=sharing The poses are as follows [Tx,Ty,Tz,Rx,Ry,Rz]: [0,0,200,0,0,0] On the other hand comment that I have used another aruco marker from the 7x7 dictionary to decrease the symmetry, as you rightly comment. In this way I have managed to reduce that error but I still have problems when the marker and the camera are placed in parallel. The camera parameters after calibration are as follows (you will need them to evaluate the code with my video): CamMatrix: [[1118.846489526876, 0, 642.13826506868666614], Distortion: [0.122868686868603639595952883, -0.13111188888888525525525596969656075, 0.0126375757594545366666687672, 0.007012017878787878946412315, -0.14426110656565656531235]] Thanks in advance, if you need any extra info let me know! |
@DanielBilbao12, thx for a detailed description of your issue. Also you can use In PR #3174, due to the change in the order of objectPoints, the direction of the axes will change. Do you think this is the right change? |
Thanks for your quick response @AleksandrPanov. In order to use I'm not sure how to use this resource of the Aruco boards to create my own board. Besides, I have not found any example in python about it. Thanks in advanced! |
You should take a look at this paper. The PnP solution of a planar target observed perpendicular to the camera optical axis has an inherent ambiguity. |
System information (version)
Detailed description
I am developing a vision system based on ArUco visual markers. The ArUco library used is "cv2.aruco.DICT_4x4_50" and the marker I have used is 2 cm on each side.
I have made the calibration using a 3.6 cm board for each square, obtaining results that I consider satisfactory.
The problem appeared when I started to validate the results provided by the vision system. To perform the validation, a UR10e collaborative robot has been used, in which the ArUco marker has been strategically placed on the tool connected to it. In this way, the robot tool is positioned in a known spatial position and, using a Logitech C525 camera, the marker is located and its position and orientation with respect to the camera is calculated (actually the position of the tool is calculated, for this the reference system is transferred from the center of the aruco to the center of the tool using homogeneous transformation matrices).
The problem I have is that when the tool and its marker are placed just in front of the camera, i.e. without any rotation in X or Y, I seem to have an ambiguity problem because the vision system returns a rotation value in Y, as you can see in the following example:
[X,Y,Z,Rx,Ry,Rz] Real= [0mm, 0mm, 250mm, 0deg, 0deg, 0deg, 20deg]
[X,Y,Z,Rx,Ry,Rz] of the vision system= [-0.26mm, 0.58mm, 254.2mm, 0.64deg, -7.9deg, 19.23deg]
Example Images Here


At first I assumed it was an offset error introduced when defining the camera reference system, but when I rotate the Y, the result I get is correct, as in the following example:
[X,Y,Z,Rx,Ry,Rz] Real= [0mm, 0mm, 250mm, 0deg, 30deg, 20deg]
[X,Y,Z,Rx,Ry,Rz] of the vision system= [-0.088mm, 0.31mm, 255.64mm, 2.05deg, 28.3deg, 19.45deg]
Example Images Here


In short, how can I solve the ambiguity problem for cases where my ArUco is in front of the camera, without any X or Y rotation? Is it really an ambiguity problem for using a single small marker or is there some other problem?
Steps to reproduce
The following is the code of the class used for the detection of the tool containing the ArUco marker. The program is executed and the results of the vision system are displayed by console until the user stops the program with CTRL+C:
Using this code, you could instantiate the class and test its performance for detect an ArUco marker.
Notes
If you need more detailed information, please do not hesitate to ask for it.
The text was updated successfully, but these errors were encountered: