Main MRPT website > C++ reference
MRPT logo
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  /** Transform HSV color components to RGB, all of them in the range [0,1]
20  * \sa rgb2hsv
21  */
22  void BASE_IMPEXP hsv2rgb(
23  float h,
24  float s,
25  float v,
26  float &r,
27  float &g,
28  float &b);
29 
30  /** Transform RGB color components to HSV, all of them in the range [0,1]
31  * \sa hsv2rgb
32  */
33  void BASE_IMPEXP rgb2hsv(
34  float r,
35  float g,
36  float b,
37  float &h,
38  float &s,
39  float &v );
40 
41  /** Different colormaps
42  * \sa mrpt::vision::colormap
43  */
44  enum TColormap
45  {
48  };
49 
50  /** Transform a float number in the range [0,1] into RGB components. Different colormaps are available.
51  */
52  void BASE_IMPEXP colormap(
53  const TColormap &color_map,
54  const float color_index,
55  float &r,
56  float &g,
57  float &b);
58 
59  /** Computes the RGB color components (range [0,1]) for the corresponding color index in the range [0,1] using the MATLAB 'jet' colormap.
60  * \sa colormap
61  */
62  void BASE_IMPEXP jet2rgb(
63  const float color_index,
64  float &r,
65  float &g,
66  float &b);
67  }
68 }
69 
70 
71 #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...
TColormap
Different colormaps.
Definition: color_maps.h:44
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 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.0 SVN: at Sun Sep 13 03:55:12 UTC 2015