Function lib3d::colorizeRangeImg(const cv::Mat&, cv::Mat&, const EColorMaps, const bool, const float, const float, const cv::Mat&, const float)
Defined in File visualization.hpp
Function Documentation
-
inline cv::Mat lib3d::colorizeRangeImg(const cv::Mat &iRangeImg, cv::Mat &oScaleImg, const EColorMaps iColorMap = COLORMAP_JET, const bool iInvert = false, const float iMinRange = -1.f, const float iMaxRange = -1.f, 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.
oScaleImg – [out] image showing a scale. This will hold a color scale/legend with markings of the minimum and maximum value.
iColorMap – [in] Color map to use. Default = COLORMAP_JET.
iInvert – [in] If true, invert range. Default = false.
iMinRange – [in] Minimum depth to be assumed. If -1 then min value of iRangeImg is assumed. Default = -1.
iMaxRange – [in] Maximum depth to be assumed. If -1 then max value of iRangeImg is assumed. Default = -1.
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.