42#include <visp3/core/vpColor.h>
43#include <visp3/core/vpDebug.h>
44#include <visp3/core/vpException.h>
45#include <visp3/core/vpRGBa.h>
73#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
79 this->
R = std::move(v.R);
80 this->
G = std::move(v.G);
81 this->
B = std::move(v.B);
82 this->
A = std::move(v.A);
102 R = (
unsigned char)v[0];
103 G = (
unsigned char)v[1];
104 B = (
unsigned char)v[2];
105 A = (
unsigned char)v[3];
116 return R == v.
R &&
G == v.
G &&
B == v.
B &&
A == v.
A;
133 n[0] = (double)
R - (
double)v.
R;
134 n[1] = (double)
G - (
double)v.
G;
135 n[2] = (double)
B - (
double)v.
B;
136 n[3] = (double)
A - (
double)v.
A;
149 n.
R =
static_cast<unsigned char>(
R + v.
R);
150 n.
G =
static_cast<unsigned char>(
G + v.
G);
151 n.
B =
static_cast<unsigned char>(
B + v.
B);
152 n.
A =
static_cast<unsigned char>(
A + v.
A);
218 double gray1 = 0.2126 *
R + 0.7152 *
G + 0.0722 *
B;
219 double gray2 = 0.2126 * v.
R + 0.7152 * v.
G + 0.0722 * v.
B;
221 return (gray1 < gray2);
226 double gray1 = 0.2126 *
R + 0.7152 *
G + 0.0722 *
B;
227 double gray2 = 0.2126 * v.
R + 0.7152 * v.
G + 0.0722 * v.
B;
229 return (gray1 > gray2);
256VISP_EXPORT std::ostream &operator<<(std::ostream &os,
const vpRGBa &rgba)
258 os <<
"(" << (int)rgba.
R <<
"," << (
int)rgba.
G <<
"," << (int)rgba.
B <<
"," << (
int)rgba.
A <<
")";
unsigned int getRows() const
Implementation of column vector and the associated operations.
error that can be emitted by ViSP classes.
@ dimensionError
Bad dimension.
vpColVector operator-(const vpRGBa &v) const
unsigned char B
Blue component.
unsigned char R
Red component.
bool operator<(const vpRGBa &v) const
friend VISP_EXPORT vpRGBa operator*(const double &x, const vpRGBa &rgb)
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
bool operator!=(const vpRGBa &v) const
bool operator==(const vpRGBa &v) const
vpColVector operator*(const double &x, const vpColVector &v)