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 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
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];
120 return R == v.
R &&
G == v.
G &&
B == v.
B &&
A == v.
A;
137 n[0] = (double)
R - (
double)v.
R;
138 n[1] = (double)
G - (
double)v.
G;
139 n[2] = (double)
B - (
double)v.
B;
140 n[3] = (double)
A - (
double)v.
A;
153 n.
R =
static_cast<unsigned char>(
R + v.
R);
154 n.
G =
static_cast<unsigned char>(
G + v.
G);
155 n.
B =
static_cast<unsigned char>(
B + v.
B);
156 n.
A =
static_cast<unsigned char>(
A + v.
A);
222 double gray1 = 0.2126 *
R + 0.7152 *
G + 0.0722 *
B;
223 double gray2 = 0.2126 * v.
R + 0.7152 * v.
G + 0.0722 * v.
B;
225 return (gray1 < gray2);
230 double gray1 = 0.2126 *
R + 0.7152 *
G + 0.0722 *
B;
231 double gray2 = 0.2126 * v.
R + 0.7152 * v.
G + 0.0722 * v.
B;
233 return (gray1 > gray2);
262 os <<
"(" << (int)rgba.
R <<
"," << (
int)rgba.
G <<
"," << (int)rgba.
B <<
"," << (
int)rgba.
A <<
")";
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)
unsigned int getRows() const
Implementation of column vector and the associated operations.
error that can be emited by ViSP classes.
@ dimensionError
Bad dimension.
VISP_EXPORT vpImagePoint operator*(const vpImagePoint &ip1, double scale)
vpColVector operator-(const vpRGBa &v) const
unsigned char B
Blue component.
unsigned char R
Red component.
bool operator<(const vpRGBa &v) const
vpRGBa & operator=(const unsigned char &v)
vpRGBa operator+(const vpRGBa &v) const
unsigned char G
Green component.
unsigned char A
Additionnal component.
bool operator>(const vpRGBa &v) const
vpColVector operator*(const float &v) const
bool operator!=(const vpRGBa &v) const
bool operator==(const vpRGBa &v) const