've just started building a physical camera class for the depth data you get from a Kinect. I have a Vector3 array of [imageWidth, imageHeight] describing the LOCAL positions I get in from the kinect (once I project them back at the FOV of the camera lens etc). I then translate, scale and rotate the whole virtual kinect camera in space.

What I'm looking to do is to extract back again the positions of the kinect camera input but in WORLD space, not LOCAL space (i.e. it's gone through the translation, scale and rotation and gives me a Vector3 for each value of the kinect in WORLD space).

Any ideas?


1 Answer 1


I have never worked with Kinect so I'm not aware if there are any specific details I'm missing, but have you tried creating a regular world matrix and transforming the local position with it? Something like this for example:

Matrix worldMatrix = Matrix.CreateScale(scale) * 
                     Matrix.CreateFromQuaternion(rotation) *

Vector3 worldPosition = Vector3.Transform(localPosition, worldMatrix);

Notes: For the rotation matrix you can also use CreateFromYawPitchRoll or CreateFromAxisAngle depending on your needs. Also, this assumes that scaling and rotation happens around the origin of the current space.


You must log in to answer this question.

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