OpenCV aruco, Z-axis doesn't draw properly

▼魔方 西西 提交于 2021-02-08 10:44:50

问题


I have a problem with function drawAxis in aruco module. Z axis flip and general aren't at 90 degrees (X and Y works fine).

The problem is illustrated by the screen: flip axis

I tried changed camera, detect another markers and do many recalibration (i tried different configuration of photos, between 15 and 100)

When I printed vector of rotation (rvec) I noticed that angle 0 and 1 (x, y?) had small fluctuation, but angle 2 (z?) are in general constant: rvec print

Where could be a problem? If X and Y axis work fine, code should be correct? It's normal that rvec_2 is constant? Or maybe t's my fault with calibration?

Please for any clues! Regards!


回答1:


I found a solution: my mistake was using standard calibration chessboard pattern: bad calibration board

I know that in many tutorials this calibration works fine, but in my case - no

My soultion was charuco board (source code for charuco generator): https://github.com/opencv/opencv_contrib/blob/master/modules/aruco/samples/calibrate_camera_charuco.cpp

When I calibrate my camera using this board everything work fine

Hope this can be usefull for someone, greetings



来源:https://stackoverflow.com/questions/46146492/opencv-aruco-z-axis-doesnt-draw-properly

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!