Convert kinect RGB and depth values to XYZ coordinates

4.7k views Asked by At

I'm looking for an easy way to Convert kinect RGB and depth values to XYZ coordinates using MATLAB. My goal is a function with an input of: RGB and depth values of each point taking by Kinect camera, and output of: x,y and z values of each point.

[RGB, depth] = RGB_D2XYZ(XYZ)

Thanks, Ben

1

There are 1 answers

1
Vuwox On BEST ANSWER

You can have a look to this great article. They have a function call DepthToCloud.m. You just need to be sure to pass Image center and top-left corner.

They are using Kinect too, so you don't really need to change a lot of parameter.

The article can be found here

EDIT

You can use mexopencv or OpenCV Matlab wrapper, to capture image and to do calibration. After OpenCV have a great function call reporjectImageTo3D. But this function need matrix Q. It's the projection matrix. Have a look to OpenCV documentation if you want to do by this way. Else depthToCloud is really good too.