Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert kinect RGB and depth values to XYZ coordinates

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

like image 882
ben Avatar asked Oct 02 '22 05:10

ben


1 Answers

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.

like image 152
Vuwox Avatar answered Oct 13 '22 09:10

Vuwox