Main MRPT website > C++ reference for MRPT 1.9.9
color_maps.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 #ifndef color_maps_H
11 #define color_maps_H
12 
13 namespace mrpt
14 {
15 namespace utils
16 {
17 /** \addtogroup color_maps Color map functions (in #include
18  * <mrpt/utils/color_maps.h>)
19  * \ingroup mrpt_base_grp
20  * @{ */
21 
22 /** Transform HSV color components to RGB, all of them in the range [0,1] \sa
23  * rgb2hsv */
24 void hsv2rgb(float h, float s, float v, float& r, float& g, float& b);
25 
26 /** Transform RGB color components to HSV, all of them in the range [0,1] \sa
27  * hsv2rgb */
28 void rgb2hsv(float r, float g, float b, float& h, float& s, float& v);
29 
30 /** Different colormaps for use in mrpt::utils::colormap() */
32 {
35  /** [New in MRPT 1.5.0] */
37 };
38 
39 /** Transform a float number in the range [0,1] into RGB components. Different
40  * colormaps are available. */
41 void colormap(
42  const TColormap& color_map, const float color_index, float& r, float& g,
43  float& b);
44 
45 /** Computes the RGB color components (range [0,1]) for the corresponding color
46  * index in the range [0,1] using the MATLAB 'jet' colormap. \sa colormap */
47 void jet2rgb(const float color_index, float& r, float& g, float& b);
48 
49 /** Computes the RGB color components (range [0,1]) for the corresponding color
50  * index in the range [0,1] using the MATLAB 'hot' colormap. \sa colormap */
51 void hot2rgb(const float color_index, float& r, float& g, float& b);
52 
53 /** @} */
54 }
55 }
56 
57 #endif
TColormap
Different colormaps for use in mrpt::utils::colormap()
Definition: color_maps.h:31
[New in MRPT 1.5.0]
Definition: color_maps.h:36
void 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.
Definition: color_maps.cpp:115
GLdouble s
Definition: glext.h:3676
GLubyte g
Definition: glext.h:6279
GLubyte GLubyte b
Definition: glext.h:6279
const GLdouble * v
Definition: glext.h:3678
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
GLdouble GLdouble GLdouble r
Definition: glext.h:3705
void 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...
Definition: color_maps.cpp:206
void 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...
Definition: color_maps.cpp:140
void 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].
Definition: color_maps.cpp:22
void 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].
Definition: color_maps.cpp:74



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019