Template Function backend::convertPointCloudToDepthMap¶
Function Documentation¶
-
template<typename
PointCloudType
>
boolbackend
::
convertPointCloudToDepthMap
(const PointCloudType &point_cloud_C, const aslam::Camera &camera, const bool use_openni_format, const bool create_range_image, cv::Mat *depth_map, cv::Mat *image)¶ Converts a point cloud to a depth map + optionally an intensity image.
- Parameters
[in] point_cloud_C
: Point cloud in camera coordinate frame, which is x-right, z-front, y-down[in] camera
: Camera model of the desired depth map[in] use_openni_format
: If enabled, the depth map will be in the OpenNI format ()[mm], uint16_t), otherwise in floating point format [m].[in] create_range_image
: If enabled, the depth map will not contain the Z coordinate of the 3D point but the actual ray length from the camera center to the 3D point. NOTE This is required for cameras of type Camera3DLidar![out] depth_map
: OpenCV depth map, will be set to either CV_32FC1 (depth in m) or CV_U16C1 (depth in mm)[out] image
: OpenCV intensity image, will be set to CV_8UC1 or CV_8UC3, depending on the availablility of intensity vs color.It will be unallocated if no intensity or color is available.