仿真相机内参如何给出

有给出,实际上我们可以根据水平视场horizontal_fov来计算出来的,参考以下两个介绍:
http://playerstage.sourceforge.net/wiki/GazeboProblemResolutionGuide
https://answers.ros.org/question/12658/how-to-change-gazebo-gui-focal-lengthfov/
即可以通过以下公式得到焦距:
flength = (width/2)/tan(hfov/2)

https://www.it610.com/article/1279857134850293760.htm

 

example

horizontal_fov="1.3962634"

image_width="752"

image_height="480"


D: [0.0, 0.0, 0.0, 0.0, 0.0]
K: [448.1008985853343, 0.0, 376.5, 0.0, 448.1008985853343, 240.5, 0.0, 0.0, 1.0]
R: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
P: [448.1008985853343, 0.0, 376.5, -0.0, 0.0, 448.1008985853343, 240.5, 0.0, 0.0, 0.0, 1.0, 0.0]
>>> 752/2/tan(1.3962634/2)
448.09935154137804
>>> 
optical centers(cx cy)一般约等于 0.5 *(width, height)

https://docs.opencv.org/3.4.3/dc/dbb/tutorial_py_calibration.html

 仿真相机内参如何给出_第1张图片

你可能感兴趣的:(ROS,机器人,三维空间)