Scaling intrinsic matrix between two image resolutions

asked 2019-08-08 07:07:05 -0600

liam1135 gravatar image

I have two camera images A (480x640) and B (1080x1920). A & B represent the same image, just different resolutions.

I have the intrinsic matrix for image A and run solvePnP on this image to calculate a pose for the camera. I then send this pose to Unity for display. The background image in unity is image B and my marker is close but always off centre.

To my knowledge the intrinsic values for the two camera images aren't quite the same and this is why my marker is off from a translation perspective. If I manually offset the principle point I can correct the issue by hand and position the marker perfectly.

How can I modify the intrinsic values to know that the output of solvePnP will result in pose suited for display on image B.

edit retag flag offensive close merge delete

Comments

If I am not wrong, you simply scale the focal length and the optical center proportionally to the resolution change. In your case, however, you also change the aspect ratio, so I am not sure if you should scale fx, cx and fy, cy independently?

Witek gravatar imageWitek ( 2019-08-08 13:35:48 -0600 )edit