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.