I have been following this http://docs.opencv.org/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html documentation to use OpenCV. In the formula below, I have successfully calculated both the intrinsic as well as the extrinsic matrices(I have made use of the solvePnP() procedure to obtain these matrices). Since, the object is lying on the ground I have substituted Z = 0. Then, I just removed the third column of the extrinsic matrix and multiplied it with intrinsic matrix to obtain a 3X3 projection matrix. I took it's inverse, and multiplied it by image coordinates i.e. su,sv and s.
然而,世界坐标中的所有点似乎都有 1 毫米或更小偏差,因此我得到的坐标不太准确。有谁知道我可能哪里出错了?
Thanks
相机校准可能总是有些不准确,因为对于 2 个以上的校准图像,您不是从校准图像中获得方程组的一个真实解,而是获得误差最小的解。
同样的情况也发生在CV::solvePnP() http://docs.opencv.org/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html#solvepnp。您可以使用三种方法之一来优化给定方程组的许多可能的解决方案。
我不明白你是如何从CV::solvePnP() http://docs.opencv.org/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html#solvepnp,用于计算物体在相机坐标系中的旋转和平移。
你可以做什么:
- 尝试获得更好的内在参数
- 尝试其他方法像 EPNP 一样求解 PnP http://docs.opencv.org/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html#solvepnp或检查RANSAC版本 http://docs.opencv.org/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html#solvepnpransac
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)