50 #include <visp/vpRGBa.h>
51 #include <visp/vpColor.h>
52 #include <visp/vpDebug.h>
53 #include <visp/vpException.h>
100 R = (
unsigned char)v[0];
101 G = (
unsigned char)v[1];
102 B = (
unsigned char)v[2];
103 A = (
unsigned char)v[3];
153 n[0] = (double)
R - (
double)v.
R;
154 n[1] = (double)
G - (
double)v.
G;
155 n[2] = (double)
B - (
double)v.
B;
156 n[3] = (double)
A - (
double)v.
A;
170 n.
R =
static_cast<unsigned char>(
R + v.
R );
171 n.
G =
static_cast<unsigned char>(
G + v.
G );
172 n.
B =
static_cast<unsigned char>(
B + v.
B );
173 n.
A =
static_cast<unsigned char>(
A + v.
A );
244 double gray1 = 0.2126*
R+0.7152*
G+0.0722*
B;
245 double gray2 = 0.2126*v.
R+0.7152*v.
G+0.0722*v.
B;
247 return (gray1 < gray2);
253 double gray1 = 0.2126*
R+0.7152*
G+0.0722*
B;
254 double gray2 = 0.2126*v.
R+0.7152*v.
G+0.0722*v.
B;
256 return (gray1 > gray2);
unsigned char B
Blue component.
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.
vpColVector operator*(const double &x, const vpColVector &B)
multiplication by a scalar Ci = x*Bi
bool operator>(const vpRGBa &v) const
bool operator==(const vpRGBa &v)
unsigned char A
Additionnal component.
vpRGBa & operator=(const unsigned char &v)
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)