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-2018, 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 #pragma once
10 
12 
13 namespace mrpt
14 {
15 namespace img
16 {
17 /** \addtogroup color_maps Color map functions (in #include
18  * <mrpt/img/color_maps.h>)
19  * \ingroup mrpt_img_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::img::colormap() */
32 {
33  cmNONE = -1, /** Undefined colormap [New in MRPT 2.0] */
36  /** [New in MRPT 1.5.0] */
38 };
39 
40 /** Transform a float number in the range [0,1] into RGB components. Different
41  * colormaps are available. */
42 void colormap(
43  const TColormap& color_map, const float color_index, float& r, float& g,
44  float& b);
45 
46 /** Computes the RGB color components (range [0,1]) for the corresponding color
47  * index in the range [0,1] using the MATLAB 'jet' colormap. \sa colormap */
48 void jet2rgb(const float color_index, float& r, float& g, float& b);
49 
50 /** Computes the RGB color components (range [0,1]) for the corresponding color
51  * index in the range [0,1] using the MATLAB 'hot' colormap. \sa colormap */
52 void hot2rgb(const float color_index, float& r, float& g, float& b);
53 
54 /** @} */
55 } // namespace img
56 } // namespace mrpt
57 
mrpt::img::TColormap
TColormap
Different colormaps for use in mrpt::img::colormap()
Definition: color_maps.h:31
MRPT_ENUM_TYPE_END
#define MRPT_ENUM_TYPE_END()
Definition: TEnumType.h:74
s
GLdouble s
Definition: glext.h:3676
mrpt::img::colormap
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:113
mrpt::img::cmHOT
@ cmHOT
[New in MRPT 1.5.0]
Definition: color_maps.h:37
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
g
GLubyte g
Definition: glext.h:6279
MRPT_ENUM_TYPE_BEGIN
#define MRPT_ENUM_TYPE_BEGIN(_ENUM_TYPE_WITH_NS)
Definition: TEnumType.h:58
mrpt::img::hot2rgb
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:204
mrpt::img::cmNONE
@ cmNONE
Definition: color_maps.h:33
mrpt::img::jet2rgb
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:138
v
const GLdouble * v
Definition: glext.h:3678
r
GLdouble GLdouble GLdouble r
Definition: glext.h:3705
mrpt::img
Definition: CCanvas.h:17
b
GLubyte GLubyte b
Definition: glext.h:6279
TEnumType.h
mrpt::img::hsv2rgb
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
mrpt::img::rgb2hsv
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:73
mrpt::img::cmGRAYSCALE
@ cmGRAYSCALE
Undefined colormap [New in MRPT 2.0].
Definition: color_maps.h:34
img
GLint GLvoid * img
Definition: glext.h:3763
mrpt::img::cmJET
@ cmJET
Definition: color_maps.h:35
MRPT_FILL_ENUM_MEMBER
MRPT_FILL_ENUM_MEMBER(mrpt::img, cmNONE)



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