![]() |
Visual Servoing Platform
version 3.3.0
|
#include <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 |
bool vpRGBa::operator!= | ( | const vpRGBa & | v | ) |
Compare two color pixels.
Definition at line 135 of file vpRGBa.cpp.
vpColVector vpRGBa::operator* | ( | const double & | v | ) | const |
Multiplication operator : v * "this".
v | : Value to multiply. |
Definition at line 218 of file vpRGBa.cpp.
vpColVector vpRGBa::operator* | ( | const float & | v | ) | const |
Multiplication operator : v * "this".
v | : Value to multiply. |
Definition at line 203 of file vpRGBa.cpp.
vpColVector vpRGBa::operator+ | ( | const vpColVector & | v | ) | const |
Addition operator : "this" + v.
v | : Color to add to the current object "this". |
Definition at line 188 of file vpRGBa.cpp.
Addition operator : "this" + v.
v | : Color to add to the current object "this". |
Definition at line 158 of file vpRGBa.cpp.
vpColVector vpRGBa::operator- | ( | const vpColVector & | v | ) | const |
Subtraction operator : "this" - v.
v | : Color to subtract to the current object "this". |
Definition at line 173 of file vpRGBa.cpp.
vpColVector vpRGBa::operator- | ( | const vpRGBa & | v | ) | const |
Subtraction operator : "this" - v.
v | : Color to subtract to the current object "this". |
Definition at line 142 of file vpRGBa.cpp.
bool vpRGBa::operator< | ( | const vpRGBa & | v | ) | const |
Definition at line 228 of file vpRGBa.cpp.
vpRGBa & vpRGBa::operator= | ( | const unsigned char & | v | ) |
Copy operator (from an unsigned char value)
v | : Input color ( R = G = B = v ) |
Definition at line 55 of file vpRGBa.cpp.
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 99 of file vpRGBa.cpp.
Move operator.
Definition at line 80 of file vpRGBa.cpp.
Copy operator.
Definition at line 67 of file vpRGBa.cpp.
bool vpRGBa::operator== | ( | const vpRGBa & | v | ) |
Compare two RGBa values.
Definition at line 117 of file vpRGBa.cpp.
bool vpRGBa::operator> | ( | const vpRGBa & | v | ) | const |
Definition at line 236 of file vpRGBa.cpp.
Definition at line 244 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 268 of file vpRGBa.cpp.
unsigned char vpRGBa::A |
Additionnal component.
unsigned char vpRGBa::B |
Blue component.
Definition at line 149 of file vpRGBa.h.
Referenced by operator<(), and operator>().
unsigned char vpRGBa::G |
Green component.
Definition at line 148 of file vpRGBa.h.
Referenced by operator<(), and operator>().
unsigned char vpRGBa::R |
Red component.
Definition at line 147 of file vpRGBa.h.
Referenced by operator<(), and operator>().