DLR-RM / 3DObjectTracking

Algorithms and Publications on 3D Object Tracking
MIT License
624 stars 121 forks source link

Could you tell me how to derive these formulas #45

Closed HMCCMH closed 1 year ago

HMCCMH commented 1 year ago

This Projection Matrix formula is different from the general OpenGL Projection Matrix. The z-axis values seem to be the negatives of the original values.

What's more, could you tell me how to get the formula?

Thanks!

manuel-stoiber commented 1 year ago

In our work, we use the common definition that the camera coordinate frame is right-handed and the x-axis points right, the y-axis downwards, and the z-axis away from the camera. This differs from the OpenGL definition, where the z-axis points towards the camera and the y-axis upwards. In addition, OpenGL uses the bottom left corner as (0,0), while OpenCV uses the top left corner. This results in the perceived differences in the projection matrix.

r_u is the maximum distance from the center of a sphere to the outer point of that sphere in image space along the u-axis. The sphere is thereby projected into the image and perspective projection is considered given that the sphere is located at x, y, z, and has a radius r in 3D space.