Lion Kuo
Lion Kuo

Reputation: 239

Transformation matrix from 2D to 3D in opencv

I have some 2D points set (X,Y) corresponding to a 3D points set (X,Y,Z). 2D points were captured from camera and 3D points were the real coordinate according to world base. I want to find the transformation matrix between them, that is to say, how to convert other 2D points to 3D points.

I have try getPespectiveTransform function, but it didnt work in this problem.

How can I write a regression to find this transform matrix ?

Upvotes: 1

Views: 2819

Answers (1)

Lincoln Bowen
Lincoln Bowen

Reputation: 33

You can use solvePnP of OpenCV, it gives you rotation and translation matrix. In this answer you can see in more detail: Camera position in world coordinate from cv::solvePnP

Upvotes: 2

Related Questions