43 #include <visp3/core/vpColor.h>
44 #include <visp3/core/vpDebug.h>
45 #include <visp3/core/vpException.h>
46 #include <visp3/core/vpRGBf.h>
72 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
78 this->
R = std::move(v.R);
79 this->
G = std::move(v.G);
80 this->
B = std::move(v.B);
112 if (std::fabs(
R - v.
R) > std::numeric_limits<float>::epsilon())
114 if (std::fabs(
G - v.
G) > std::numeric_limits<float>::epsilon())
116 if (std::fabs(
B - v.
B) > std::numeric_limits<float>::epsilon())
128 return (std::fabs(
R - v.
R) > std::numeric_limits<float>::epsilon() ||
129 std::fabs(
G - v.
G) > std::numeric_limits<float>::epsilon() ||
130 std::fabs(
B - v.
B) > std::numeric_limits<float>::epsilon());
141 n[0] = (double)
R - (
double)v.
R;
142 n[1] = (double)
G - (
double)v.
G;
143 n[2] = (double)
B - (
double)v.
B;
220 double gray1 = 0.2126 *
R + 0.7152 *
G + 0.0722 *
B;
221 double gray2 = 0.2126 * v.
R + 0.7152 * v.
G + 0.0722 * v.
B;
223 return (gray1 < gray2);
228 double gray1 = 0.2126 *
R + 0.7152 *
G + 0.0722 *
B;
229 double gray2 = 0.2126 * v.
R + 0.7152 * v.
G + 0.0722 * v.
B;
231 return (gray1 > gray2);
259 os <<
"(" << rgb.
R <<
"," << rgb.
G <<
"," << rgb.
B <<
")";
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 emitted by ViSP classes.
@ dimensionError
Bad dimension.
VISP_EXPORT vpImagePoint operator*(const vpImagePoint &ip1, double scale)
vpColVector operator*(float v) const
vpRGBf & operator=(float v)
vpColVector operator-(const vpRGBf &v) const
bool operator>(const vpRGBf &v) const
bool operator==(const vpRGBf &v) const
vpRGBf operator+(const vpRGBf &v) const
bool operator<(const vpRGBf &v) const
bool operator!=(const vpRGBf &v) const