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.
What I have:
- calibrated camera (known: matrix of intrinsic parameters, vector of distortion coefficients)
- rotation vector and translation vector
- (u, v) - coordinates of a point on image
- two known world coordinates of a point and one unknown
Problem variant #1 Known: X, Y Unknown: Z
Problem variant #2 Known: X, Z Unknown: Y
Problem variant #3 Known: Y, Z Unknown: X
How can I find third unknown coordinate? Is it possible?
rotation vector
andtranslation vector
are the camera pose, the homogeneous transformation that allows to transform a point in the world coordinate/frame to the camera coordinate/frame.X
,Y
andZ
are expressed in the world coordinate/frame and not in the camera coordinate/frame. Is it correct? – CatreeZ_w
toZ_c
usingrvec
andtvec
, transformu
andv
to the normalized camera frame (x
,y
) using the intrinsic parameters and then multiplyx
ory
by Z. You should getX_c
orY_c
and to getX_w
orY_w
, you would have to multiply by the inverse homogeneous transformation usingrvec
andtvec
. I don't know for #1. – Catree