OpenCV aruco,Z 轴绘制不正确 [英] OpenCV aruco, Z-axis doesn't draw properly

查看:101
本文介绍了OpenCV aruco,Z 轴绘制不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 aruco 模块中的 drawAxis 函数有问题.Z 轴翻转和一般不是 90 度(X 和 Y 工作正常).

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).

问题由屏幕说明:翻转轴

我尝试更换相机,检测另一个标记并进行多次重新校准(我尝试了不同的照片配置,在 15 到 100 之间)

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

当我打印旋转矢量 (rvec) 时,我注意到角度 0 和 1 (x, y?) 的波动很小,但角度 2 (z?) 通常是恒定的:rvec 打印

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

哪里有问题?如果 X 和 Y 轴工作正常,代码应该正确吗?rvec_2 是常数是正常的吗?或者也许是我校准的错?

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!

推荐答案

我找到了解决方案:我的错误是使用标准校准棋盘图案:校准板坏

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

我的灵魂是 charuco 板(charuco 生成器的源代码):https://github.com/opencv/opencv_contrib/blob/master/modules/aruco/samples/calibrate_camera_charuco.cpp

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

这篇关于OpenCV aruco,Z 轴绘制不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆