Function lib3d::colorizeRangeImg(const cv::Mat&, const EColorMaps, const bool, float *, float *, const cv::Mat&, const float)

Function Documentation

inline cv::Mat lib3d::colorizeRangeImg(const cv::Mat &iRangeImg, const EColorMaps iColorMap = COLORMAP_JET, const bool iInvert = false, float *iopMinRange = nullptr, float *iopMaxRange = nullptr, const cv::Mat &iBackgroundImg = cv::Mat(), const float iAlpha = 0.8f)

Method to colorize range image and generate scale image.

Parameters:
  • iRangeImg[in] Range image to colorize. Since lib3d::types::DepthMap and lib3d::types::DisparityMap are a subclass of they can be passed directly to this function.

  • iColorMap[in] Color map to use. Default = COLORMAP_JET.

  • iInvert[in] If true, invert range. Default = false.

  • iopMinRange[inout] Minimum depth to be assumed. If nullptr or value equals -1 then min value of iRangeImg is assumed.

  • iopMaxRange[inout] Maximum depth to be assumed. If nullptr nullptr or value equals -1 then max value of iRangeImg is assumed.

  • iBackgroundImg[in] Image to use as background. Pixels with no depth will be fully transparrent. Pixel with depth will be overlayed with a blending factor of alpha ( \(\alpha = 1\) is opaque).

  • iAlpha[in] Blending factor used for pixel with depth data ( \(\alpha = 1\) is opaque).

Returns:

Colorized range image as in format CV_8UC3. Pixels for which no data is available or for which the data is outside [iMinRange, iMaxRange] are black.