In Blender I can render an animation by a camera with specific camera intrinsic settings:


Say I generate images of size 640x480, then the intrinsic matrix K becomes




and similar with beta for sensor height and image height. uc,vc are center points of the image.

Now, from blender I can get the camera Rotation-Translation matrix RT which basically describes the cameras trajectory and rotation within the synthetic world.

Now, I can map from image coordinates to world coordinates back and forth:


The issue here is, that I get an projection error that is quite large. That means, if I project the left-upper corner u = 0, v = 0 to world coordinates, then x_world is close to the true destination but not quite. If I manipulate the focal length in K then I can adjust the projection a little bit in a positive way but this seems hacky.

Has anyone ideas or thoughts on this? Thanks

  • $\begingroup$ "close but not quite" is not very descriptive. It it's small enough - could be just a floating point arithmetic problem. What is the reprojection error in pixels? You should have it very close to zero, if not, there is a problem with the way you project/backproject. If it is fine, you need to give more details on how exactly you compute external matrix, depth and how you check that your left corner is not where it should be. $\endgroup$
    – Noidea
    Nov 15 '16 at 22:00

The formula for alpha stated is incorrect. If you set it to (focal length)*(image width)/(sensor width) it will work.

Note that focal length and sensor width are in mm, so they can't both be in the numerator, just due to units issues.


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.