3
$\begingroup$

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

1

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

2

where

3

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:

4

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

$\endgroup$
1
  • $\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
    Commented Nov 15, 2016 at 22:00

1 Answer 1

1
$\begingroup$

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.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .