Visual Servoing Platform
version 3.3.0 under development (2020-02-17)
|
#include <visp3/core/vpRGBa.h>
Public Types | |
enum | AlphaDefault { alpha_default = 255 } |
Public Member Functions | |
vpRGBa () | |
vpRGBa (const unsigned char &r, const unsigned char &g, const unsigned char &b, const unsigned char &a=0) | |
vpRGBa (const unsigned char &v) | |
vpRGBa (const vpRGBa &v) | |
vpRGBa (const vpColVector &v) | |
vpRGBa & | operator= (const unsigned char &v) |
vpRGBa & | operator= (const vpRGBa &v) |
vpRGBa & | operator= (const vpRGBa &&v) |
vpRGBa & | operator= (const vpColVector &v) |
bool | operator== (const vpRGBa &v) |
bool | operator!= (const vpRGBa &v) |
vpColVector | operator- (const vpRGBa &v) const |
vpRGBa | operator+ (const vpRGBa &v) const |
vpColVector | operator- (const vpColVector &v) const |
vpColVector | operator+ (const vpColVector &v) const |
vpColVector | operator* (const float &v) const |
vpColVector | operator* (const double &v) const |
bool | operator< (const vpRGBa &v) const |
bool | operator> (const vpRGBa &v) const |
Public Attributes | |
unsigned char | R |
unsigned char | G |
unsigned char | B |
unsigned char | A |
Friends | |
VISP_EXPORT std::ostream & | operator<< (std::ostream &os, const vpRGBa &rgba) |
VISP_EXPORT vpRGBa | operator* (const double &x, const vpRGBa &rgb) |
Class that defines a RGBa 32 bits structure that is used to build color images. RGBa stands for red green blue alpha color space.
The alpha channel is normally used as an opacity channel. If a pixel has a value of 0 in its alpha channel, it is fully transparent, whereas a value of 255 in the alpha channel gives a fully opaque pixel.
By default the alpha channel is set to vpRGBa::alpha_default.
enum vpRGBa::AlphaDefault |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Create a RGBa value from a 4 dimension column vector.
R=v[0] G=v[1] B=v[2] A=v[3]
Definition at line 119 of file vpRGBa.h.
References operator*().
bool vpRGBa::operator!= | ( | const vpRGBa & | v | ) |
Compare two color pixels.
Definition at line 136 of file vpRGBa.cpp.
Referenced by vpColor::~vpColor().
vpColVector vpRGBa::operator* | ( | const float & | v | ) | const |
vpColVector vpRGBa::operator* | ( | const double & | v | ) | const |
vpColVector vpRGBa::operator+ | ( | const vpColVector & | v | ) | const |
vpColVector vpRGBa::operator- | ( | const vpRGBa & | v | ) | const |
vpColVector vpRGBa::operator- | ( | const vpColVector & | v | ) | const |
bool vpRGBa::operator< | ( | const vpRGBa & | v | ) | const |
Definition at line 229 of file vpRGBa.cpp.
vpRGBa & vpRGBa::operator= | ( | const unsigned char & | v | ) |
vpRGBa & vpRGBa::operator= | ( | const vpColVector & | v | ) |
Cast a vpColVector in a vpRGBa
v | : Input vector. v[0], v[1], v[2], v[3] are to make into relation with respectively R, G, B and A. |
vpException::dimensionError | : If v is not a 4 four dimention vector. |
Definition at line 100 of file vpRGBa.cpp.
References A, B, vpException::dimensionError, G, vpArray2D< Type >::getRows(), R, and vpERROR_TRACE.
bool vpRGBa::operator== | ( | const vpRGBa & | v | ) |
Compare two RGBa values.
Definition at line 118 of file vpRGBa.cpp.
Referenced by vpColor::~vpColor().
bool vpRGBa::operator> | ( | const vpRGBa & | v | ) | const |
Definition at line 237 of file vpRGBa.cpp.
Definition at line 245 of file vpRGBa.cpp.
|
friend |
Writes the RGBA values to the stream os, and returns a reference to the stream. The coordinates are separated by a comma.
The following code prints the intensity of the pixel in the middle of the image:
Definition at line 269 of file vpRGBa.cpp.
unsigned char vpRGBa::A |
Additionnal component.
Definition at line 151 of file vpRGBa.h.
Referenced by vp::adjust(), vpImageConvert::convert(), vpImageConvert::createDepthHistogram(), vpDisplayX::displayImage(), vpDisplayX::displayImageROI(), vp::gammaCorrection(), vpDisplayX::getImage(), vpImageTools::imageDifference(), vpImageTools::imageDifferenceAbsolute(), vpImageConvert::merge(), operator!=(), operator*(), operator+(), operator-(), operator=(), operator==(), and vp::stretchContrast().
unsigned char vpRGBa::B |
Blue component.
Definition at line 150 of file vpRGBa.h.
Referenced by vp::adjust(), vpDisplayX::clearDisplay(), vpImageConvert::convert(), vpImageConvert::createDepthHistogram(), vpDisplayGTK::displayCharString(), vpDisplayX::displayCharString(), vpDisplayOpenCV::displayCharString(), vpDisplayGTK::displayCircle(), vpDisplayX::displayCircle(), vpDisplayOpenCV::displayCircle(), vpDisplayGTK::displayDotLine(), vpDisplayX::displayDotLine(), vpDisplayX::displayImage(), vpDisplayOpenCV::displayImage(), vpDisplayX::displayImageROI(), vpDisplayOpenCV::displayImageROI(), vpDisplayGTK::displayLine(), vpDisplayX::displayLine(), vpDisplayOpenCV::displayLine(), vpDisplayGTK::displayPoint(), vpDisplayX::displayPoint(), vpDisplayOpenCV::displayPoint(), vpDisplayGTK::displayRectangle(), vpDisplayX::displayRectangle(), vpDisplayOpenCV::displayRectangle(), vpImageDraw::drawCircle(), vp::drawContours(), vpImageDraw::drawLine(), vpImageDraw::drawPolygon(), vpImageDraw::drawRectangle(), vp::gammaCorrection(), vpDisplayX::getImage(), vpImageSimulator::getImage(), vpImageTools::imageDifference(), vpImageTools::imageDifferenceAbsolute(), vpDisplayX::init(), vpDisplayOpenCV::init(), vpImageConvert::merge(), operator!=(), operator*(), operator+(), operator-(), operator<(), operator=(), operator==(), operator>(), vp::stretchContrast(), vp::unsharpMask(), vpImageTools::warpLinear(), and vpImageIo::writePPM().
unsigned char vpRGBa::G |
Green component.
Definition at line 149 of file vpRGBa.h.
Referenced by vp::adjust(), vpDisplayX::clearDisplay(), vpImageConvert::convert(), vpImageConvert::createDepthHistogram(), vpDisplayGTK::displayCharString(), vpDisplayX::displayCharString(), vpDisplayOpenCV::displayCharString(), vpDisplayGTK::displayCircle(), vpDisplayX::displayCircle(), vpDisplayOpenCV::displayCircle(), vpDisplayGTK::displayDotLine(), vpDisplayX::displayDotLine(), vpDisplayX::displayImage(), vpDisplayOpenCV::displayImage(), vpDisplayX::displayImageROI(), vpDisplayOpenCV::displayImageROI(), vpDisplayGTK::displayLine(), vpDisplayX::displayLine(), vpDisplayOpenCV::displayLine(), vpDisplayGTK::displayPoint(), vpDisplayX::displayPoint(), vpDisplayOpenCV::displayPoint(), vpDisplayGTK::displayRectangle(), vpDisplayX::displayRectangle(), vpDisplayOpenCV::displayRectangle(), vpImageDraw::drawCircle(), vp::drawContours(), vpImageDraw::drawLine(), vpImageDraw::drawPolygon(), vpImageDraw::drawRectangle(), vp::gammaCorrection(), vpDisplayX::getImage(), vpImageSimulator::getImage(), vpImageTools::imageDifference(), vpImageTools::imageDifferenceAbsolute(), vpDisplayX::init(), vpDisplayOpenCV::init(), vpImageConvert::merge(), operator!=(), operator*(), operator+(), operator-(), operator<(), operator=(), operator==(), operator>(), vp::stretchContrast(), vp::unsharpMask(), vpImageTools::warpLinear(), and vpImageIo::writePPM().
unsigned char vpRGBa::R |
Red component.
Definition at line 148 of file vpRGBa.h.
Referenced by vp::adjust(), vpDisplayX::clearDisplay(), vpImageConvert::convert(), vpImageConvert::createDepthHistogram(), vpDisplayGTK::displayCharString(), vpDisplayX::displayCharString(), vpDisplayOpenCV::displayCharString(), vpDisplayGTK::displayCircle(), vpDisplayX::displayCircle(), vpDisplayOpenCV::displayCircle(), vpDisplayGTK::displayDotLine(), vpDisplayX::displayDotLine(), vpDisplayX::displayImage(), vpDisplayOpenCV::displayImage(), vpDisplayX::displayImageROI(), vpDisplayOpenCV::displayImageROI(), vpDisplayGTK::displayLine(), vpDisplayX::displayLine(), vpDisplayOpenCV::displayLine(), vpDisplayGTK::displayPoint(), vpDisplayX::displayPoint(), vpDisplayOpenCV::displayPoint(), vpDisplayGTK::displayRectangle(), vpDisplayX::displayRectangle(), vpDisplayOpenCV::displayRectangle(), vpImageDraw::drawCircle(), vp::drawContours(), vpImageDraw::drawLine(), vpImageDraw::drawPolygon(), vpImageDraw::drawRectangle(), vp::gammaCorrection(), vpDisplayX::getImage(), vpImageSimulator::getImage(), vpImageTools::imageDifference(), vpImageTools::imageDifferenceAbsolute(), vpDisplayX::init(), vpDisplayOpenCV::init(), vpImageConvert::merge(), operator!=(), operator*(), operator+(), operator-(), operator<(), operator=(), operator==(), operator>(), vp::stretchContrast(), vp::unsharpMask(), vpImageTools::warpLinear(), and vpImageIo::writePPM().