Main MRPT website
>
C++ reference
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
mrpt
utils
color_maps.h
Go to the documentation of this file.
1
/* +---------------------------------------------------------------------------+
2
| The Mobile Robot Programming Toolkit (MRPT) C++ library |
3
| |
4
| http://www.mrpt.org/ |
5
| |
6
| Copyright (C) 2005-2012 University of Malaga |
7
| |
8
| This software was written by the Machine Perception and Intelligent |
9
| Robotics Lab, University of Malaga (Spain). |
10
| Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> |
11
| |
12
| This file is part of the MRPT project. |
13
| |
14
| MRPT is free software: you can redistribute it and/or modify |
15
| it under the terms of the GNU General Public License as published by |
16
| the Free Software Foundation, either version 3 of the License, or |
17
| (at your option) any later version. |
18
| |
19
| MRPT is distributed in the hope that it will be useful, |
20
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
21
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22
| GNU General Public License for more details. |
23
| |
24
| You should have received a copy of the GNU General Public License |
25
| along with MRPT. If not, see <http://www.gnu.org/licenses/>. |
26
| |
27
+---------------------------------------------------------------------------+ */
28
29
#ifndef color_maps_H
30
#define color_maps_H
31
32
#include <
mrpt/utils/utils_defs.h
>
33
34
namespace
mrpt
35
{
36
namespace
utils
37
{
38
/** Transform HSV color components to RGB, all of them in the range [0,1]
39
* \sa rgb2hsv
40
*/
41
void
BASE_IMPEXP
hsv2rgb
(
42
float
h,
43
float
s,
44
float
v,
45
float
&r,
46
float
&g,
47
float
&b);
48
49
/** Transform RGB color components to HSV, all of them in the range [0,1]
50
* \sa hsv2rgb
51
*/
52
void
BASE_IMPEXP
rgb2hsv
(
53
float
r,
54
float
g,
55
float
b,
56
float
&h,
57
float
&s,
58
float
&v );
59
60
/** Different colormaps
61
* \sa mrpt::vision::colormap
62
*/
63
enum
TColormap
64
{
65
cmGRAYSCALE
= 0,
66
cmJET
67
};
68
69
/** Transform a float number in the range [0,1] into RGB components. Different colormaps are available.
70
*/
71
void
BASE_IMPEXP
colormap
(
72
const
TColormap
&color_map,
73
const
float
color_index,
74
float
&r,
75
float
&g,
76
float
&b);
77
78
/** Computes the RGB color components (range [0,1]) for the corresponding color index in the range [0,1] using the MATLAB 'jet' colormap.
79
* \sa colormap
80
*/
81
void
BASE_IMPEXP
jet2rgb
(
82
const
float
color_index,
83
float
&r,
84
float
&g,
85
float
&b);
86
}
87
}
88
89
90
#endif
Page generated by
Doxygen 1.8.3
for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013