1
votes

I have set of known 3D points in world coordinate system and I know corresponding 2D points in the image. Now for a new 3D coordinate (x, y, z) I need to find the 2D image coordinate (u, v) how can I find that in OpenCV ?? How can I find transformation matrix (camera matrix, rotation, translation) using OpenCV ?

1
use calibrateCamera or solvePnp (inverse interpreted). You'll get R and T to use in projectPoints function. - Micka
In solvePnP(), do we need to give camera matrix as input, in documentation its given as input matrix - danishansari
@Micka what is difference between calibrateCamera() and solvePnP ? - danishansari
try 1 or 0. Btw, best would be to measure the intrinsics with a test pattern, especially if your lens has some notable distortion - Micka

1 Answers

2
votes

First you need to read about Fundamental Matrix , and epipolar geometry and understand how projection of world coordinates to image plane is done.

From the first part of your question it seems you already have this projection matrix. For any new world coordinates just use this matrix.