Main MRPT website > C++ reference for MRPT 1.3.2
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-2015, 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 #include <mrpt/base/link_pragmas.h>
14 
15 namespace 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  */
26  void BASE_IMPEXP hsv2rgb(
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  */
37  void BASE_IMPEXP rgb2hsv(
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  */
48  enum TColormap
49  {
52  };
53 
54  /** Transform a float number in the range [0,1] into RGB components. Different colormaps are available.
55  */
56  void BASE_IMPEXP colormap(
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  */
66  void BASE_IMPEXP jet2rgb(
67  const float color_index,
68  float &r,
69  float &g,
70  float &b);
71  /** @} */
72  }
73 }
74 
75 
76 #endif
TColormap
Different colormaps.
Definition: color_maps.h:48
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 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].
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
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].



Page generated by Doxygen 1.8.9.1 for MRPT 1.3.2 SVN:Unversioned directory at Thu Dec 10 00:07:55 UTC 2015