How to get camera Intrinsics?

How to get camera Intrinsics?

thereisnocool
Observer Observer
375 Views
2 Replies
Message 1 of 3

How to get camera Intrinsics?

thereisnocool
Observer
Observer

I want to convert 3d coordinates to 2d screen coordinates, which is inseparable from the internal and external parameters of the camera. At present, I calculated the external parameters of the camera by camera.transform, and calculated the internal parameters of the camera by the Angle of view, camera focal length (mm) and image resolution, but I finally got the wrong reprojection result. At present, I have confirmed that the external parameters are OK. Maybe there is a problem with the internal parameters. Perhaps the projection center of the virtual camera in 3Ds Max is not in the image center? Or was there a mistake in the way I calculated the focal length? I really don't understand

0 Likes
376 Views
2 Replies
Replies (2)
Message 2 of 3

istan
Advisor
Advisor

search for "getCameraMatrix" on this board

0 Likes
Message 3 of 3

klvnk
Collaborator
Collaborator

there's 3 alternatives depending on how you want the coords.....

 

in mxs it would be

 

fn World2Screen pt =
(
	gw.setTransform(Matrix3 1);
	gw.TransPoint pt /*gw.wTransPoint pt*/ /*gw.hTransPoint pt*/;
)

 

it's basically exactly the same functions in the sdk, also if you need to collect a lot of points screen positions a single call to a single call to setTransform beforehand will suffice.

0 Likes