简体   繁体   English

findEssentialMat (openCV) 中“焦距 = 1.0”的单位是什么?

[英]what is the unit of “focal length = 1.0” in findEssentialMat (openCV)?

Recently I tried to calculate essential matrix by findEssentialMat function in openCV ( https://docs.opencv.org/master/d9/d0c/group__calib3d.html#ga13f7e34de8fa516a686a56af1196247f ) I noticed that the parameter focal length=1.0 and pp=(0,0) by default, but what is the unit of these two values, m/mm/pixels? Recently I tried to calculate essential matrix by findEssentialMat function in openCV ( https://docs.opencv.org/master/d9/d0c/group__calib3d.html#ga13f7e34de8fa516a686a56af1196247f ) I noticed that the parameter focal length=1.0 and pp=(0,0)默认情况下,但是这两个值的单位是什么,m/mm/pixels?

Furthermore, shouldn't the principal point at the image center, ie (h/2,w/2) in pixel coordinates or (0.5,0.5) in normalized coordinates?此外,图像中心的主点不应该是像素坐标中的 (h/2,w/2) 还是归一化坐标中的 (0.5,0.5)?

Micka is already right in his comment. Micka 在他的评论中已经是正确的。 The camera model of OpenCV is eg illustrated here . OpenCV 的相机 model 在这里举例说明。 As you can see the image coordinate system is defined such that the x-axis points to the right and the y-axis points down.如您所见,图像坐标系被定义为 x 轴指向右侧,y 轴指向下方。 The origin is at the image center (where the optical axis z intersects the image plane) and that is why the default value for the principal point is (0px,0px) .原点位于图像中心(光轴 z 与图像平面相交的位置),这就是主点的默认值为(0px,0px)的原因。 This is a standard coordinate system definition in Computer Vision and eg Matlab uses the same.这是计算机视觉中的标准坐标系定义,例如 Matlab 使用相同的定义。

The focal length is set to 1.0 px because if your camera is not calibrated you can still calculate eg the Essential Matrix and the math gets easier.焦距设置为1.0 px ,因为如果您的相机未校准,您仍然可以计算例如基本矩阵,并且数学变得更容易。

If you want to use your camera matrix for a 3D reconstruction you should definitely calibrate your camera or insert appropriate values for focal length (and principal point).如果您想使用您的相机矩阵进行 3D 重建,您绝对应该校准您的相机或插入适当的焦距(和主点)值。 Theoretically, you can convert the pixel system to a metric system if you know the sensor size.理论上,如果您知道传感器尺寸,您可以将像素系统转换为公制系统。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM