I have a 2d image of a 3D model in the image editor, and I have the camera's intrinsic matrix and extrinsic matrix. Now I want to know the 3D model's position in the world space so that it can match the camera view to get the 2D image. With the 2D image, the intrinsic and extrinsic matrices, how can I do in Python script? Thanks.

I know these answers for reference. 3x4 camera matrix from blender camera

How to find image coordinates of the rendered vertex?

For more detail and below is just an example,

x = K[R|T]X: now I have K, R and T.

K = [[1513.0999755859375, 0, 955.6556998193264], [0, 1524.1999276039132, 575.7680010795593], [0, 0, 1]]

I have the 2D image in rendered view, so I can get the pixel coordinate of some points with the mouse pointing at. I want to find how to set the 3D model 's position in world space. Then through the camera view, I can get the same image as my 2D image. Thanks.

enter image description here

What I want to do is kinda like this: Why does my rendered object appear too big compared to object taken with real camera?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.