Sumeet Jindal
Sumeet Jindal

Reputation: 902

How to setup transformation matrices which takes world coords in meters (for augmented reality)

I am doing a augmented reality app with Kinect. want to overlay augmented 3d objects on the color camera output.

I know how to setup the projection matrix but don't know how to convert the bone coordinates (which are in meters) to world coordinates.

camera info focal length in pixels = 531.15 (not sure what exactly it means) fovX = 62


direct3d matrix 
m_matrix[0] = (2 * 531.15f / 640.0f ); 
m_matrix[5] = (2 * 531.15f / 480.0f ); 
m_matrix[10] = -1.0f; 
m_matrix[11] = -1.0f ; 
m_matrix[14] = -1;

Upvotes: 2

Views: 385

Answers (1)

Andrei Stanescu
Andrei Stanescu

Reputation: 6383

I've had the same problem, but in the end I took another approach. Instead of converting the bone coordinates I created a projection matrix where 1 world unit = 1 meter. Also, you will need to sync the RGB image to the depth image.

You can find more details and one solution at my SO question here: Projection and View matrices to match the Kinect RGB camera perspective

Hope this helps

Upvotes: 2

Related Questions