46 #include <visp3/core/vpRGBa.h>
47 #include <visp3/core/vpColor.h>
48 #include <visp3/core/vpDebug.h>
49 #include <visp3/core/vpException.h>
80 #ifdef VISP_HAVE_CPP11_COMPATIBILITY
87 this->
R = std::move(v.R);
88 this->
G = std::move(v.G);
89 this->
B = std::move(v.B);
90 this->
A = std::move(v.A);
111 R = (
unsigned char)v[0];
112 G = (
unsigned char)v[1];
113 B = (
unsigned char)v[2];
114 A = (
unsigned char)v[3];
143 return (
R != v.
R ||
G != v.
G ||
B != v.
B ||
A != v.
A);
155 n[0] = (double)
R - (
double)v.
R;
156 n[1] = (double)
G - (
double)v.
G;
157 n[2] = (double)
B - (
double)v.
B;
158 n[3] = (double)
A - (
double)v.
A;
172 n.
R =
static_cast<unsigned char>(
R + v.
R );
173 n.
G =
static_cast<unsigned char>(
G + v.
G );
174 n.
B =
static_cast<unsigned char>(
B + v.
B );
175 n.
A =
static_cast<unsigned char>(
A + v.
A );
246 double gray1 = 0.2126*
R+0.7152*
G+0.0722*
B;
247 double gray2 = 0.2126*v.
R+0.7152*v.
G+0.0722*v.
B;
249 return (gray1 < gray2);
255 double gray1 = 0.2126*
R+0.7152*
G+0.0722*
B;
256 double gray2 = 0.2126*v.
R+0.7152*v.
G+0.0722*v.
B;
258 return (gray1 > gray2);
290 os <<
"(" << (int)rgba.
R <<
"," << (
int)rgba.
G <<
"," << (int)rgba.
B <<
"," << (
int)rgba.
A <<
")";
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.
bool operator>(const vpRGBa &v) const
bool operator==(const vpRGBa &v)
unsigned char A
Additionnal component.
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)
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)