Main MRPT website > C++ reference for MRPT 1.9.9
Enumerations | Functions
Color map functions (in #include

Detailed Description

<mrpt/img/color_maps.h>)

Enumerations

enum  mrpt::img::TColormap { mrpt::img::cmNONE = -1, mrpt::img::cmGRAYSCALE = 0, mrpt::img::cmJET, mrpt::img::cmHOT }
 Different colormaps for use in mrpt::img::colormap() More...
 

Functions

void mrpt::img::hsv2rgb (float h, float s, float v, float &r, float &g, float &b)
 Transform HSV color components to RGB, all of them in the range [0,1]. More...
 
void mrpt::img::rgb2hsv (float r, float g, float b, float &h, float &s, float &v)
 Transform RGB color components to HSV, all of them in the range [0,1]. More...
 
void mrpt::img::colormap (const TColormap &color_map, const float color_index, float &r, float &g, float &b)
 Transform a float number in the range [0,1] into RGB components. More...
 
void mrpt::img::jet2rgb (const float color_index, float &r, float &g, float &b)
 Computes the RGB color components (range [0,1]) for the corresponding color index in the range [0,1] using the MATLAB 'jet' colormap. More...
 
void mrpt::img::hot2rgb (const float color_index, float &r, float &g, float &b)
 Computes the RGB color components (range [0,1]) for the corresponding color index in the range [0,1] using the MATLAB 'hot' colormap. More...
 

Enumeration Type Documentation

◆ TColormap

enum mrpt::img::TColormap

Different colormaps for use in mrpt::img::colormap()

Enumerator
cmNONE 
cmGRAYSCALE 

Undefined colormap [New in MRPT 2.0].

cmJET 
cmHOT 

[New in MRPT 1.5.0]

Definition at line 31 of file color_maps.h.

Function Documentation

◆ colormap()

void mrpt::img::colormap ( const TColormap color_map,
const float  color_index,
float &  r,
float &  g,
float &  b 
)

◆ hot2rgb()

void mrpt::img::hot2rgb ( const float  color_index,
float &  r,
float &  g,
float &  b 
)

Computes the RGB color components (range [0,1]) for the corresponding color index in the range [0,1] using the MATLAB 'hot' colormap.

See also
colormap

Definition at line 204 of file color_maps.cpp.

References mrpt::math::interpolate().

Referenced by mrpt::img::colormap().

◆ hsv2rgb()

void mrpt::img::hsv2rgb ( float  h,
float  s,
float  v,
float &  r,
float &  g,
float &  b 
)

Transform HSV color components to RGB, all of them in the range [0,1].

See also
rgb2hsv

Definition at line 22 of file color_maps.cpp.

References min.

◆ jet2rgb()

void mrpt::img::jet2rgb ( const float  color_index,
float &  r,
float &  g,
float &  b 
)

◆ rgb2hsv()

void mrpt::img::rgb2hsv ( float  r,
float  g,
float  b,
float &  h,
float &  s,
float &  v 
)

Transform RGB color components to HSV, all of them in the range [0,1].

See also
hsv2rgb

Definition at line 73 of file color_maps.cpp.

References mrpt::max3(), min, and mrpt::min3().




Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST