#include "vil_colour_space.h"
#include <vcl_cstdlib.h>
#include <vcl_algorithm.h>
#include <vcl_cmath.h>
Go to the source code of this file.
Defines | |
#define | inst(T) |
Functions | |
template<class T > | |
void | vil_colour_space_RGB_to_YIQ (T const in[3], T out[3]) |
Linear transformation from RGB to YIQ colour spaces. | |
template<class T > | |
void | vil_colour_space_YIQ_to_RGB (T const in[3], T out[3]) |
Linear transformation from YIQ to RGB colour spaces. | |
template<class T > | |
void | vil_colour_space_RGB_to_HSV (T r, T g, T b, T *h, T *s, T *v) |
Transform from RGB to HSV colour spaces. | |
template<class T > | |
void | vil_colour_space_HSV_to_RGB (T h, T s, T v, T *r, T *g, T *b) |
Transform from HSV to RGB colour space. | |
template<class T > | |
void | vil_colour_space_RGB_to_YUV (T const in[3], T out[3]) |
Linear transformation from RGB to YUV colour spaces. | |
template<class T > | |
void | vil_colour_space_YUV_to_RGB (T const in[3], T out[3]) |
Linear transformation from YUV to RGB colour spaces. | |
template<class T > | |
void | vil_colour_space_RGB_to_YPbPr_601 (T const RGB[3], T YPbPr[3]) |
Transformation from analog RGB to analog YPbPr colour spaces. | |
template<class T > | |
void | vil_colour_space_YPbPr_601_to_RGB (T const YPbPr[3], T RGB[3]) |
Transformation from analog YPbPr to RGB colour spaces. | |
void | vil_colour_space_RGB_to_YCbCr_601 (const unsigned char RGB[3], unsigned char YCbCr[3]) |
Transformation from 8 bit RGB to 8 bit YCbCr colour spaces. | |
void | vil_colour_space_YCbCr_601_to_RGB (const unsigned char YCbCr[3], unsigned char RGB[3]) |
Transformation from 8 bit YCbCr to 8 bit RGB colour spaces. | |
inst (double) | |
inst (float) |
Definition in file vil_colour_space.cxx.
#define inst | ( | T | ) |
template void vil_colour_space_RGB_to_YIQ(T const [3], T [3]); \ template void vil_colour_space_YIQ_to_RGB(T const [3], T [3]); \ template void vil_colour_space_RGB_to_HSV(T, T, T, T *, T *, T *); \ template void vil_colour_space_HSV_to_RGB(T, T, T, T *, T *, T *); \ template void vil_colour_space_RGB_to_YUV(T const [3], T [3]); \ template void vil_colour_space_YUV_to_RGB(T const [3], T [3]); \ template void vil_colour_space_RGB_to_YPbPr_601(T const RGB[3], T YPbPr[3]); \ template void vil_colour_space_YPbPr_601_to_RGB(T const YPbPr[3], T RGB[3])
Definition at line 240 of file vil_colour_space.cxx.
inst | ( | double | ) |
inst | ( | float | ) |
void vil_colour_space_HSV_to_RGB | ( | T | h, |
T | s, | ||
T | v, | ||
T * | r, | ||
T * | g, | ||
T * | b | ||
) |
Transform from HSV to RGB colour space.
The input HSV values will lie in the ranges: H : [0, 360) (an angle, in bloody degrees) S : [0, 1] V : [0, 255]
The output RGB values will lie in [0, 255]
[HSV is also known as HSB]
Definition at line 76 of file vil_colour_space.cxx.
void vil_colour_space_RGB_to_HSV | ( | T | r, |
T | g, | ||
T | b, | ||
T * | h, | ||
T * | s, | ||
T * | v | ||
) |
Transform from RGB to HSV colour spaces.
green --- yellow // / \ / \ // cyan --- white ---- red // \ / \ / // blue --- magenta // //
Definition at line 41 of file vil_colour_space.cxx.
void vil_colour_space_RGB_to_YCbCr_601 | ( | const unsigned char | RGB[3], |
unsigned char | YCbCr[3] | ||
) |
Transformation from 8 bit RGB to 8 bit YCbCr colour spaces.
The input and out value lie in the ranges:
Definition at line 211 of file vil_colour_space.cxx.
void vil_colour_space_RGB_to_YIQ | ( | T const | in[3], |
T | out[3] | ||
) |
Linear transformation from RGB to YIQ colour spaces.
Definition at line 15 of file vil_colour_space.cxx.
void vil_colour_space_RGB_to_YPbPr_601 | ( | T const | RGB[3], |
T | YPbPr[3] | ||
) |
Transformation from analog RGB to analog YPbPr colour spaces.
The input and out value lie in the ranges:
Definition at line 174 of file vil_colour_space.cxx.
void vil_colour_space_RGB_to_YUV | ( | T const | in[3], |
T | out[3] | ||
) |
Linear transformation from RGB to YUV colour spaces.
Definition at line 144 of file vil_colour_space.cxx.
void vil_colour_space_YCbCr_601_to_RGB | ( | const unsigned char | YCbCr[3], |
unsigned char | RGB[3] | ||
) |
Transformation from 8 bit YCbCr to 8 bit RGB colour spaces.
The input and out value lie in the ranges:
Definition at line 227 of file vil_colour_space.cxx.
void vil_colour_space_YIQ_to_RGB | ( | T const | in[3], |
T | out[3] | ||
) |
Linear transformation from YIQ to RGB colour spaces.
Definition at line 23 of file vil_colour_space.cxx.
void vil_colour_space_YPbPr_601_to_RGB | ( | T const | YPbPr[3], |
T | RGB[3] | ||
) |
Transformation from analog YPbPr to RGB colour spaces.
The input and out value lie in the ranges:
Definition at line 192 of file vil_colour_space.cxx.
void vil_colour_space_YUV_to_RGB | ( | T const | in[3], |
T | out[3] | ||
) |
Linear transformation from YUV to RGB colour spaces.
Definition at line 153 of file vil_colour_space.cxx.