50 #include <visp/vpRGBa.h>
51 #include <visp/vpColor.h>
52 #include <visp/vpDebug.h>
53 #include <visp/vpException.h>
98 R = (
unsigned char)v[0];
99 G = (
unsigned char)v[1];
100 B = (
unsigned char)v[2];
101 A = (
unsigned char)v[3];
150 n[0] = (double)
R - (
double)v.
R;
151 n[1] = (double)
G - (
double)v.
G;
152 n[2] = (double)
B - (
double)v.
B;
153 n[3] = (double)
A - (
double)v.
A;
167 n.
R =
static_cast<unsigned char>(
R + v.
R );
168 n.
G =
static_cast<unsigned char>(
G + v.
G );
169 n.
B =
static_cast<unsigned char>(
B + v.
B );
170 n.
A =
static_cast<unsigned char>(
A + v.
A );
241 double gray1 = 0.2126*
R+0.7152*
G+0.0722*
B;
242 double gray2 = 0.2126*v.
R+0.7152*v.
G+0.0722*v.
B;
244 return (gray1 < gray2);
250 double gray1 = 0.2126*
R+0.7152*
G+0.0722*
B;
251 double gray2 = 0.2126*v.
R+0.7152*v.
G+0.0722*v.
B;
253 return (gray1 > gray2);
unsigned char B
Blue component.
VISP_EXPORT vpImagePoint operator*(const vpImagePoint &ip1, const double scale)
vpRGBa operator+(const vpRGBa &v) const
error that can be emited by ViSP classes.
unsigned char G
Green component.
Class that defines a RGB 32 bits structure.
bool operator>(const vpRGBa &v) const
bool operator==(const vpRGBa &v)
void operator=(const unsigned char &v)
unsigned char A
Additionnal component.
Class that provides a data structure for the column vectors as well as a set of operations on these v...
bool operator<(const vpRGBa &v) const
unsigned char R
Red component.
vpColVector operator*(const float &v) const
unsigned int getRows() const
Return the number of rows of the matrix.
vpColVector operator-(const vpRGBa &v) const
bool operator!=(const vpRGBa &v)