Main MRPT website > C++ reference for MRPT 1.4.0
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-2016, 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
14
15namespace mrpt
16{
17 namespace utils
18 {
19 /** \addtogroup color_maps Color map functions (in #include <mrpt/utils/color_maps.h>)
20 * \ingroup mrpt_base_grp
21 * @{ */
22
23 /** Transform HSV color components to RGB, all of them in the range [0,1]
24 * \sa rgb2hsv
25 */
27 float h,
28 float s,
29 float v,
30 float &r,
31 float &g,
32 float &b);
33
34 /** Transform RGB color components to HSV, all of them in the range [0,1]
35 * \sa hsv2rgb
36 */
38 float r,
39 float g,
40 float b,
41 float &h,
42 float &s,
43 float &v );
44
45 /** Different colormaps
46 * \sa mrpt::vision::colormap
47 */
49 {
51 cmJET
52 };
53
54 /** Transform a float number in the range [0,1] into RGB components. Different colormaps are available.
55 */
57 const TColormap &color_map,
58 const float color_index,
59 float &r,
60 float &g,
61 float &b);
62
63 /** Computes the RGB color components (range [0,1]) for the corresponding color index in the range [0,1] using the MATLAB 'jet' colormap.
64 * \sa colormap
65 */
67 const float color_index,
68 float &r,
69 float &g,
70 float &b);
71 /** @} */
72 }
73}
74
75
76#endif
void BASE_IMPEXP 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,...
void BASE_IMPEXP 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].
void BASE_IMPEXP 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.
void BASE_IMPEXP 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].
TColormap
Different colormaps.
Definition: color_maps.h:49
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.



Page generated by Doxygen 1.9.6 for MRPT 1.4.0 SVN: at Fri Jan 20 00:13:14 UTC 2023