Hi Mao,
you need the
CameraInfo message published by openni to get calibration parameters (e.g., focal length). Create a
PinholeCameraModel from the CameraInfo, then you can use
projectPixelTo3dRay:
cv::Point3d image_geometry::PinholeCameraModel::projectPixelTo3dRay ( const cv::Point2d & uv_rect ) const
To get actual 3D point from the camera, multiply the returned 3D vector by the depth value.
cheers,
Mathieu