46 #include <visp3/core/vpColor.h> 47 #include <visp3/core/vpDebug.h> 48 #include <visp3/core/vpException.h> 49 #include <visp3/core/vpRGBa.h> 77 #ifdef VISP_HAVE_CPP11_COMPATIBILITY 83 this->
R = std::move(v.R);
84 this->
G = std::move(v.G);
85 this->
B = std::move(v.B);
86 this->
A = std::move(v.A);
106 R = (
unsigned char)v[0];
107 G = (
unsigned char)v[1];
108 B = (
unsigned char)v[2];
109 A = (
unsigned char)v[3];
146 n[0] = (double)
R - (
double)v.
R;
147 n[1] = (double)
G - (
double)v.
G;
148 n[2] = (double)
B - (
double)v.
B;
149 n[3] = (double)
A - (
double)v.
A;
162 n.
R =
static_cast<unsigned char>(
R + v.
R);
163 n.
G =
static_cast<unsigned char>(
G + v.
G);
164 n.
B =
static_cast<unsigned char>(
B + v.
B);
165 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);
239 double gray1 = 0.2126 *
R + 0.7152 *
G + 0.0722 *
B;
240 double gray2 = 0.2126 * v.
R + 0.7152 * v.
G + 0.0722 * v.
B;
242 return (gray1 > gray2);
271 os <<
"(" << (int)rgba.
R <<
"," << (
int)rgba.
G <<
"," << (int)rgba.
B <<
"," << (
int)rgba.
A <<
")";
unsigned char B
Blue component.
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)
friend VISP_EXPORT std::ostream & operator<<(std::ostream &os, const vpRGBa &rgba)
unsigned char A
Additionnal component.
unsigned int getRows() const
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)