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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With