[英]Calculating 3D world point
I am beginner in OpenCV and I want to find 3D point from 2D (projected on image) and known two out of three world coordinates of a point. 我是OpenCV的初学者,我想从2D(投影在图像上)找到3D点,并且知道点中三个世界坐标中的两个。
Problem variant #1 Known: X, Y Unknown: Z 问题变体#1已知:X,Y未知:Z
Problem variant #2 Known: X, Z Unknown: Y 问题变体#2已知:X,Z未知:Y
Problem variant #3 Known: Y, Z Unknown: X 问题变体#3已知:Y,Z未知:X
How can I find third unknown coordinate? 如何找到第三个未知坐标? Is it possible?
可能吗?
Yes it is possible. 对的,这是可能的。 Consider the simple case of absent nonlinear distortion.
考虑缺少非线性失真的简单情况。 Let Ki be the inverse of the camera matrix, and camera center at the world origin (ie no rotation nor translation).
令Ki为相机矩阵的倒数,以及世界原点的相机中心(即无旋转或平移)。 Let p=(u, v, 1) be the homogeneous pixel coordinate.
设p =(u,v,1)为均匀像素坐标。 Then the ray through the pixel is:
然后通过像素的光线是:
s * P = Ki * p
where s > 0
is an unknown scale. 其中
s > 0
是未知的比例。 But s * P = [X, Y, Z]
, so if you know any one of X, Y or Z you can solve for s
and find the missing coordinates. 但是
s * P = [X, Y, Z]
,所以如果你知道X,Y或Z中的任何一个,你可以求解s
并找到缺失的坐标。
For non-zero roto-translation, replace Ki with the inverse of the projection matrix. 对于非零旋转平移,将Ki替换为投影矩阵的倒数。 For non-zero distortion, replace the simple multiplication by Ki with the complete reprojection equation.
对于非零失真,将Ki替换为完全重投影方程的简单乘法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.