46 #include <visp3/core/vpRGBa.h>
47 #include <visp3/core/vpColor.h>
48 #include <visp3/core/vpDebug.h>
49 #include <visp3/core/vpException.h>
96 R = (
unsigned char)v[0];
97 G = (
unsigned char)v[1];
98 B = (
unsigned char)v[2];
99 A = (
unsigned char)v[3];
128 return (
R != v.
R ||
G != v.
G ||
B != v.
B ||
A != v.
A);
140 n[0] = (double)
R - (
double)v.
R;
141 n[1] = (double)
G - (
double)v.
G;
142 n[2] = (double)
B - (
double)v.
B;
143 n[3] = (double)
A - (
double)v.
A;
157 n.
R =
static_cast<unsigned char>(
R + v.
R );
158 n.
G =
static_cast<unsigned char>(
G + v.
G );
159 n.
B =
static_cast<unsigned char>(
B + v.
B );
160 n.
A =
static_cast<unsigned char>(
A + v.
A );
231 double gray1 = 0.2126*
R+0.7152*
G+0.0722*
B;
232 double gray2 = 0.2126*v.
R+0.7152*v.
G+0.0722*v.
B;
234 return (gray1 < gray2);
240 double gray1 = 0.2126*
R+0.7152*
G+0.0722*
B;
241 double gray2 = 0.2126*v.
R+0.7152*v.
G+0.0722*v.
B;
243 return (gray1 > gray2);
unsigned char B
Blue component.
vpColVector operator*(const double &x, const vpColVector &v)
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)
unsigned char A
Additionnal component.
unsigned int getRows() const
Return the number of rows of the 2D array.
vpRGBa & operator=(const unsigned char &v)
Implementation of column vector and the associated operations.
bool operator<(const vpRGBa &v) const
unsigned char R
Red component.
vpColVector operator*(const float &v) const
vpColVector operator-(const vpRGBa &v) const
bool operator!=(const vpRGBa &v)