Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches
vpColor Class Reference

#include <vpColor.h>

Inheritance diagram for vpColor:

Public Types

enum  vpColorIdentifier {
  id_black = 0 , id_white , id_lightGray , id_gray ,
  id_darkGray , id_lightRed , id_red , id_darkRed ,
  id_lightGreen , id_green , id_darkGreen , id_lightBlue ,
  id_blue , id_darkBlue , id_yellow , id_cyan ,
  id_orange , id_purple , id_unknown
}
enum  AlphaDefault { alpha_default = 255 }

Public Member Functions

 vpColor ()
 vpColor (const vpColor &)=default
virtual ~vpColor ()=default
 vpColor (unsigned char r, unsigned char g, unsigned char b, vpColor::vpColorIdentifier cid=vpColor::id_unknown)
 vpColor (unsigned char r, unsigned char g, unsigned char b, unsigned char alpha, vpColor::vpColorIdentifier cid=vpColor::id_unknown)
 vpColor (const vpColor &color, unsigned char alpha)
vpColoroperator= (const vpColor &)=default
void setColor (unsigned char r, unsigned char g, unsigned char b, unsigned char a=vpRGBa::alpha_default)
template<typename T, bool useFullScale, typename U = float>
std::enable_if< std::is_same< U, float >::value &&std::is_same< T, unsignedchar >::value, vpRGBa & >::type buildFrom (const vpHSV< T, useFullScale > &other)
template<typename T, bool useFullScale>
std::enable_if< std::is_floating_point< T >::value, vpRGBa & >::type buildFrom (const vpHSV< T, useFullScale > &hsv)
bool operator== (const vpRGBa &v) const
bool operator!= (const vpRGBa &v) const
vpColVector operator- (const vpRGBa &v) const
vpColVector operator- (const vpColVector &v) const
vpRGBa operator+ (const vpRGBa &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

Static Public Member Functions

static vpColor getColor (const unsigned int &i)

Public Attributes

vpColorIdentifier id
unsigned char R
unsigned char G
unsigned char B
unsigned char A

Static Public Attributes

static const vpColor black = vpColor(0, 0, 0, id_black)
static const vpColor white = vpColor(255, 255, 255, id_white)
static const vpColor lightGray = vpColor(192, 192, 192, id_lightGray)
static const vpColor gray = vpColor(128, 128, 128, id_gray)
static const vpColor darkGray = vpColor(64, 64, 64, id_darkGray)
static const vpColor lightRed = vpColor(255, 140, 140, id_lightRed)
static const vpColor red = vpColor(255, 0, 0, id_red)
static const vpColor darkRed = vpColor(128, 0, 0, id_darkRed)
static const vpColor lightGreen = vpColor(140, 255, 140, id_lightGreen)
static const vpColor green = vpColor(0, 255, 0, id_green)
static const vpColor darkGreen = vpColor(0, 128, 0, id_darkGreen)
static const vpColor lightBlue = vpColor(140, 140, 255, id_lightBlue)
static const vpColor blue = vpColor(0, 0, 255, id_blue)
static const vpColor darkBlue = vpColor(0, 0, 128, id_darkBlue)
static const vpColor yellow = vpColor(255, 255, 0, id_yellow)
static const vpColor cyan = vpColor(0, 255, 255, id_cyan)
static const vpColor orange = vpColor(255, 165, 0, id_orange)
static const vpColor purple = vpColor(128, 0, 128, id_purple)
static const vpColor none = vpColor(0, 0, 0, id_unknown)
static const unsigned int nbColors = 18
static const vpColor allColors []
static constexpr unsigned char nbChannels = 4

Friends

VISP_EXPORT bool operator== (const vpColor &c1, const vpColor &c2)
VISP_EXPORT bool operator!= (const vpColor &c1, const vpColor &c2)

Detailed Description

Class to define RGB colors available for display functionalities.

Warning
Since ViSP 3.3.1 or higher we introduce the alpha channel support for color transparency. This feature is for the moment only supported using vpDisplayOpenCV. To use transparency you may set an additional alpha parameter. When the value is 255, there is no transparency. A value equal to 0 means that the color is completely transparent. The following examples show how to introduce transparency:

An identifier vpColor::vpColorIdentifier is associated to each color. This identifier is useful to determine if a color is predefined or specified by it R,G,B values. In that last case, the identifier is always set to vpColor::id_unknown.

The example below shows how to display geometric features in a display overlay using predefined colors (here the blue color to draw a circle) and a specific brown color (used to draw a rectangle).

#include <visp3/gui/vpDisplayD3D.h>
#include <visp3/gui/vpDisplayGDI.h>
#include <visp3/gui/vpDisplayGTK.h>
#include <visp3/gui/vpDisplayOpenCV.h>
#include <visp3/gui/vpDisplayX.h>
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
int main()
{
vpImage<unsigned char> I(240, 320); // Create a black grey level image
// Depending on the detected third party libraries, we instantiate here the
// first video device which is available
#if defined(VISP_HAVE_X11)
d = new vpDisplayX;
#elif defined(VISP_HAVE_GTK)
d = new vpDisplayGTK;
#elif defined(VISP_HAVE_GDI)
d = new vpDisplayGDI;
#elif defined(VISP_HAVE_D3D9)
d = new vpDisplayD3D;
#elif defined(HAVE_OPENCV_HIGHGUI)
d = new vpDisplayOpenCV;
#endif
// Initialize the display with the image I. Display and image are
// now link together.
#ifdef VISP_HAVE_DISPLAY
d->init(I);
#endif
// Set the display background with image I content
// Draw a filled circle with the predefined blue color
vpDisplay::displayCircle(I, 100, 200, 30, vpColor::blue, true);
// Creation of a new brown color with its RGB values
vpColor color(128, 100, 50);
// Draw a brown rectangle in the display overlay (foreground)
vpDisplay::displayRectangle(I, 10, 10, 100, 20, color, true);
// Flush the foreground and background display
delete d;
}
static const vpColor blue
Definition vpColor.h:204
Display for windows using Direct3D 3rd party. Thus to enable this class Direct3D should be installed....
Display for windows using GDI (available on any windows 32 platform).
The vpDisplayGTK allows to display image using the GTK 3rd party library. Thus to enable this class G...
The vpDisplayOpenCV allows to display image using the OpenCV library. Thus to enable this class OpenC...
Use the X11 console to display images on unix-like OS. Thus to enable this class X11 should be instal...
Definition vpDisplayX.h:135
Class that defines generic functionalities for display.
Definition vpDisplay.h:171
static void displayCircle(const vpImage< unsigned char > &I, const vpImageCircle &circle, const vpColor &color, bool fill=false, unsigned int thickness=1)
static void display(const vpImage< unsigned char > &I)
static void flush(const vpImage< unsigned char > &I)
static void displayRectangle(const vpImage< unsigned char > &I, const vpImagePoint &topLeft, unsigned int width, unsigned int height, const vpColor &color, bool fill=false, unsigned int thickness=1)
Definition of the vpImage class member functions.
Definition vpImage.h:131
Examples
SickLDMRS-Process.cpp, catchParticleFilter.cpp, displayOpenCV.cpp, servoViper850Point2DArtVelocity-jointAvoidance-basic.cpp, servoViper850Point2DArtVelocity-jointAvoidance-gpa.cpp, servoViper850Point2DArtVelocity-jointAvoidance-large.cpp, testGenericTracker.cpp, tutorial-draw-circle.cpp, tutorial-megapose-live-single-object-tracking.cpp, tutorial-munkres-assignment.cpp, tutorial-pf-curve-fitting-all.cpp, and tutorial-pf-curve-fitting-pf.cpp.

Definition at line 156 of file vpColor.h.

Member Enumeration Documentation

◆ AlphaDefault

enum vpRGBa::AlphaDefault
inherited
Enumerator
alpha_default 

Definition at line 76 of file vpRGBa.h.

◆ vpColorIdentifier

Predefined colors identifier.

Enumerator
id_black 

Identifier associated to the predefined vpColor::black color.

id_white 

Identifier associated to the predefined vpColor::white color.

id_lightGray 

Identifier associated to the predefined vpColor::lightGray color.

id_gray 

Identifier associated to the predefined vpColor::gray color.

id_darkGray 

Identifier associated to the predefined pColor::darkGray color.

id_lightRed 

Identifier associated to the predefined vpColor::lightRed color.

id_red 

Identifier associated to the predefined vpColor::red color.

id_darkRed 

Identifier associated to the predefined vpColor::darkRed color.

id_lightGreen 

Identifier associated to the predefined vpColor::lightGreen color.

id_green 

Identifier associated to the predefined vpColor::green color.

id_darkGreen 

Identifier associated to the predefined vpColor::darkGreen color.

id_lightBlue 

Identifier associated to the predefined vpColor::lightBlue color.

id_blue 

Identifier associated to the predefined vpColor::blue color.

id_darkBlue 

Identifier associated to the predefined vpColor::darkBlue color.

id_yellow 

Identifier associated to the predefined vpColor::yellow color.

id_cyan 

Identifier associated to the predefined vpColor::cyan color.

id_orange 

Identifier associated to the predefined vpColor::orange color.

id_purple 

Identifier associated to the predefined vpColor::purple color.

id_unknown 

Identifier associated with unknown colors. By unknown, we mean that it is not a predefined colour. This identifier can also be used to find out the number of predefined colours

Definition at line 160 of file vpColor.h.

Constructor & Destructor Documentation

◆ vpColor() [1/5]

vpColor::vpColor ( )
inline

Default constructor. All the colors components are set to zero.

The color identifier is set to vpColor::id_unknown to indicate that this color is not a predefined one.

Definition at line 222 of file vpColor.h.

References id, id_unknown, and vpRGBa::vpRGBa().

Referenced by getColor(), operator!=, operator=(), operator==, vpColor(), vpColor(), and ~vpColor().

◆ vpColor() [2/5]

vpColor::vpColor ( const vpColor & )
default

Default destructor.

References vpColor().

◆ ~vpColor()

virtual vpColor::~vpColor ( )
virtualdefault

References vpColor().

◆ vpColor() [3/5]

vpColor::vpColor ( unsigned char r,
unsigned char g,
unsigned char b,
vpColor::vpColorIdentifier cid = vpColor::id_unknown )
inline

Construct a color from its RGB values.

Parameters
r: Red component.
g: Green component.
b: Blue component.
cid: The color identifier to indicate if this color is or not a predefined one.

Definition at line 241 of file vpColor.h.

References id, id_unknown, and vpRGBa::vpRGBa().

◆ vpColor() [4/5]

vpColor::vpColor ( unsigned char r,
unsigned char g,
unsigned char b,
unsigned char alpha,
vpColor::vpColorIdentifier cid = vpColor::id_unknown )
inline

Construct a color from its RGB values and alpha channel.

Parameters
r: Red component.
g: Green component.
b: Blue component.
alpha: Alpha channel for transparency.
cid: The color identifier to indicate if this color is or not a predefined one.

Definition at line 256 of file vpColor.h.

References id, id_unknown, and vpRGBa::vpRGBa().

◆ vpColor() [5/5]

vpColor::vpColor ( const vpColor & color,
unsigned char alpha )
inline

Construct a color with an alpha channel.

Parameters
color: RGB color.
alpha: Alpha channel for transparency.

Definition at line 266 of file vpColor.h.

References vpRGBa::B, vpRGBa::G, id, vpRGBa::R, vpColor(), and vpRGBa::vpRGBa().

Member Function Documentation

◆ buildFrom() [1/2]

template<typename T, bool useFullScale>
std::enable_if< std::is_floating_point< T >::value, vpRGBa & >::type vpRGBa::buildFrom ( const vpHSV< T, useFullScale > & hsv)
inlineinherited

Build a vpRGBa object from a vpHSV<double> or vpHSV<float> object.

Template Parameters
TThe type of the channels of the vpHSV pixels.
useFullScaleTrue if vpHSV uses unsigned char and the full range [0; 255], false if vpHSV uses unsigned char and the limited range [0; 180].
std::enable_if<std::is_floating_point<T>::value,int>::typeEnable the method only if T is a floating point number. The "int" is here because we cannot use a floating point type, otherwise we get "{float/double} is not a valid type for a template non-type parameter".
Parameters
[in]hsvThe vpHSV from which we want to build our object.
Returns
vpRGBa& The current object after conversion.

Definition at line 197 of file vpRGBa.h.

References A, alpha_default, B, vpMath::equal(), G, vpHSV< T, useFullScale >::H, R, vpMath::round(), vpHSV< T, useFullScale >::S, and vpHSV< T, useFullScale >::V.

◆ buildFrom() [2/2]

template<typename T, bool useFullScale, typename U = float>
std::enable_if< std::is_same< U, float >::value &&std::is_same< T, unsignedchar >::value, vpRGBa & >::type vpRGBa::buildFrom ( const vpHSV< T, useFullScale > & other)
inlineinherited

Build a vpRGBa object from a vpHSV<unsigned char> object.

Template Parameters
TThe type of the channels of the vpHSV pixels.
useFullScaleTrue if vpHSV uses unsigned char and the full range [0; 255], false if vpHSV uses unsigned char and the limited range [0; 180].
typeEnable the method only if T is unsigned char.
Parameters
[in]otherThe vpHSV from which we want to build our object.
Returns
vpRGBa& The current object after conversion.

Definition at line 176 of file vpRGBa.h.

References buildFrom().

Referenced by buildFrom(), and vpRGBa().

◆ getColor()

◆ operator!=()

bool vpRGBa::operator!= ( const vpRGBa & v) const
inherited

Compare two color pixels.

Returns
true if the images are different, false if they are the same.

Definition at line 132 of file vpRGBa.cpp.

References A, B, G, R, and vpRGBa().

◆ operator*() [1/2]

vpColVector vpRGBa::operator* ( const double & v) const
inherited

Multiplication operator : v * "this".

Parameters
v: Value to multiply.
Returns
v * "this"

Definition at line 231 of file vpRGBa.cpp.

References A, B, G, and R.

◆ operator*() [2/2]

vpColVector vpRGBa::operator* ( const float & v) const
inherited

Multiplication operator : v * "this".

Parameters
v: Value to multiply.
Returns
v * "this"

Definition at line 212 of file vpRGBa.cpp.

References A, B, G, and R.

Referenced by operator*.

◆ operator+() [1/2]

vpColVector vpRGBa::operator+ ( const vpColVector & v) const
inherited

Addition operator : "this" + v.

Parameters
v: Color to add to the current object "this".
Returns
"this" + v

Definition at line 193 of file vpRGBa.cpp.

References A, B, G, and R.

◆ operator+() [2/2]

vpRGBa vpRGBa::operator+ ( const vpRGBa & v) const
inherited

Addition operator : "this" + v.

Parameters
v: Color to add to the current object "this".
Returns
"this" + v
Warning
in case of overflow : e.g. 128+128 returns 0 for all 4 channels

Definition at line 159 of file vpRGBa.cpp.

References A, B, G, R, and vpRGBa().

◆ operator-() [1/2]

vpColVector vpRGBa::operator- ( const vpColVector & v) const
inherited

subtraction operator : "this" - v.

Parameters
v: Color to subtract to the current object "this".
Returns
"this" - v

Definition at line 174 of file vpRGBa.cpp.

References A, B, G, and R.

◆ operator-() [2/2]

vpColVector vpRGBa::operator- ( const vpRGBa & v) const
inherited

subtraction operator : "this" - v.

Parameters
v: Color to subtract to the current object "this".
Returns
"this" - v

Definition at line 139 of file vpRGBa.cpp.

References A, B, G, R, and vpRGBa().

◆ operator<()

bool vpRGBa::operator< ( const vpRGBa & v) const
inherited

Definition at line 245 of file vpRGBa.cpp.

References B, G, R, and vpRGBa().

◆ operator=()

vpColor & vpColor::operator= ( const vpColor & )
default

References vpColor().

◆ operator==()

bool vpRGBa::operator== ( const vpRGBa & v) const
inherited

Compare two RGBa values.

Returns
true if the values are the same, false otherwise.

Definition at line 123 of file vpRGBa.cpp.

References A, B, G, R, and vpRGBa().

◆ operator>()

bool vpRGBa::operator> ( const vpRGBa & v) const
inherited

Definition at line 253 of file vpRGBa.cpp.

References B, G, R, and vpRGBa().

◆ setColor()

void vpColor::setColor ( unsigned char r,
unsigned char g,
unsigned char b,
unsigned char a = vpRGBa::alpha_default )
inline

Set a color from its RGB values.

Parameters
r: Red component.
g: Green component.
b: Blue component.
a: Alpha component for transparency.

The color identifier is set to vpColor::id_unknown to indicate that this color is not a predefined one.

Definition at line 285 of file vpColor.h.

References vpRGBa::A, vpRGBa::alpha_default, vpRGBa::B, vpRGBa::G, id_unknown, and vpRGBa::R.

◆ operator!=

VISP_EXPORT bool operator!= ( const vpColor & c1,
const vpColor & c2 )
friend

Compare two colors.

Return true if the R,G,B components are different.

Parameters
c1: First color to compare.
c2: Second color to compare.

Definition at line 142 of file vpColor.cpp.

References vpRGBa::B, vpRGBa::G, operator!=, vpRGBa::R, and vpColor().

Referenced by operator!=.

◆ operator==

VISP_EXPORT bool operator== ( const vpColor & c1,
const vpColor & c2 )
friend

Compare two colors.

Return true if the R,G,B components are the same.

Parameters
c1: First color to compare.
c2: Second color to compare.

Definition at line 128 of file vpColor.cpp.

References vpRGBa::B, vpRGBa::G, operator==, vpRGBa::R, and vpColor().

Referenced by operator==.

Member Data Documentation

◆ A

◆ allColors

vpColor const vpColor::allColors
static
Initial value:
static const vpColor white
Definition vpColor.h:193
static const vpColor red
Definition vpColor.h:198
static const vpColor darkGray
Definition vpColor.h:196
static const vpColor cyan
Definition vpColor.h:207
static const vpColor orange
Definition vpColor.h:208
static const vpColor darkRed
Definition vpColor.h:199
static const vpColor lightGray
Definition vpColor.h:194
static const vpColor lightBlue
Definition vpColor.h:203
static const vpColor darkGreen
Definition vpColor.h:202
static const vpColor darkBlue
Definition vpColor.h:205
static const vpColor purple
Definition vpColor.h:209
static const vpColor yellow
Definition vpColor.h:206
static const vpColor lightRed
Definition vpColor.h:197
static const vpColor black
Definition vpColor.h:192
static const vpColor green
Definition vpColor.h:201
static const vpColor gray
Definition vpColor.h:195

Definition at line 100 of file vpColor.h.

Referenced by getColor().

◆ B

◆ black

◆ blue

vpColor const vpColor::blue = vpColor(0, 0, 255, id_blue)
static

Predefined dark blue color with B= 128 and R=G=0 and identifier vpColor::id_darkBlue.

Examples
SickLDMRS-Process.cpp, catchParticleFilter.cpp, displayD3D.cpp, displayGTK.cpp, displayOpenCV.cpp, displayX.cpp, displayXMulti.cpp, manDisplay.cpp, manGeometricFeatures.cpp, pf-nonlinear-complex-example.cpp, pf-nonlinear-example.cpp, servoAfma6Ellipse2DCamVelocity.cpp, servoAfma6FourPoints2DArtVelocity.cpp, servoAfma6FourPoints2DCamVelocityLs_cur.cpp, servoAfma6FourPoints2DCamVelocityLs_cur_integrator.cpp, servoAfma6FourPoints2DCamVelocityLs_des.cpp, servoAfma6Point2DArtVelocity.cpp, servoAfma6Point2DCamVelocity.cpp, servoAfma6Points2DCamVelocityEyeToHand.cpp, servoAfma6Segment2DCamVelocity.cpp, servoMomentImage.cpp, servoMomentPoints.cpp, servoMomentPolygon.cpp, servoViper650FourPoints2DArtVelocityLs_cur.cpp, servoViper650FourPoints2DCamVelocityLs_cur-SR300.cpp, servoViper650FourPoints2DCamVelocityLs_cur.cpp, servoViper650Point2DCamVelocity.cpp, servoViper850FourPoints2DArtVelocityLs_cur.cpp, servoViper850FourPoints2DArtVelocityLs_des.cpp, servoViper850FourPoints2DCamVelocityLs_cur.cpp, servoViper850FourPointsKinect.cpp, servoViper850Point2DArtVelocity-jointAvoidance-basic.cpp, servoViper850Point2DArtVelocity-jointAvoidance-gpa.cpp, servoViper850Point2DArtVelocity-jointAvoidance-large.cpp, servoViper850Point2DArtVelocity.cpp, servoViper850Point2DCamVelocity.cpp, servoViper850Point2DCamVelocityKalman.cpp, sonarPioneerReader.cpp, testDisplayScaled.cpp, testDisplays.cpp, testForceTorqueAti.cpp, testGenericTracker.cpp, testImageDraw.cpp, testOccipitalStructure_Core_imu.cpp, testPolygon.cpp, trackDot.cpp, trackDot2.cpp, trackDot2WithAutoDetection.cpp, tutorial-apriltag-detector-live.cpp, tutorial-apriltag-detector.cpp, tutorial-barcode-detector-live.cpp, tutorial-barcode-detector.cpp, tutorial-circle-hough.cpp, tutorial-draw-circle.cpp, tutorial-ibvs-4pts-wireframe-robot-afma6.cpp, tutorial-ibvs-4pts-wireframe-robot-viper.cpp, tutorial-matching-keypoint-homography.cpp, tutorial-mb-generic-tracker-full.cpp, tutorial-munkres-assignment.cpp, tutorial-pf.cpp, tutorial-pose-from-planar-object.cpp, tutorial-pose-from-qrcode-image.cpp, tutorial-ukf.cpp, and wireframeSimulator.cpp.

Definition at line 204 of file vpColor.h.

Referenced by vpMbDepthNormalTracker::display(), vpMbDepthNormalTracker::display(), vpMeSite::display(), vpMeSite::display(), vpProjectionDisplay::displayCamera(), vpMbtFaceDepthNormal::displayFeature(), vpMbtFaceDepthNormal::displayFeature(), vpMbEdgeTracker::displayFeaturesOnImage(), vpMbEdgeTracker::displayFeaturesOnImage(), vpImageDraw::drawFrame(), vpTemplateTrackerZone::initClick(), vpMeLine::plugHoles(), vpMeLine::sample(), vpDot2::searchDotsInArea(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), and vpDot2::trackAndDisplay().

◆ cyan

◆ darkBlue

vpColor const vpColor::darkBlue = vpColor(0, 0, 128, id_darkBlue)
static

Predefined yellow color with R=G=255 and B=0 and identifier vpColor::id_yellow.

Definition at line 205 of file vpColor.h.

◆ darkGray

vpColor const vpColor::darkGray = vpColor(64, 64, 64, id_darkGray)
static

Predefined light red color with R= 255 and G=B=140 and identifier vpColor::id_lightRed.

Definition at line 196 of file vpColor.h.

◆ darkGreen

vpColor const vpColor::darkGreen = vpColor(0, 128, 0, id_darkGreen)
static

Predefined light blue color with B= 255 and R=G=140 and identifier vpColor::id_lightBlue.

Examples
testImageDraw.cpp.

Definition at line 202 of file vpColor.h.

◆ darkRed

vpColor const vpColor::darkRed = vpColor(128, 0, 0, id_darkRed)
static

Predefined light green color with G= 255 and R=B=140 and identifier vpColor::id_lightGreen.

Examples
mbtEdgeKltTracking.cpp, mbtEdgeTracking.cpp, mbtGenericTracking.cpp, mbtGenericTrackingDepth.cpp, mbtGenericTrackingDepthOnly.cpp, mbtKltTracking.cpp, and testImageDraw.cpp.

Definition at line 199 of file vpColor.h.

◆ G

◆ gray

vpColor const vpColor::gray = vpColor(128, 128, 128, id_gray)
static

Predefined dark gray color with R=G=B=192 and identifier vpColor::id_darkGray.

Examples
tutorial-pf-curve-fitting-all.cpp, and tutorial-pf-curve-fitting-lms.cpp.

Definition at line 195 of file vpColor.h.

◆ green

vpColor const vpColor::green = vpColor(0, 255, 0, id_green)
static

Predefined dark green color with G= 128 and R=B=0 and identifier vpColor::id_darkGreen.

Examples
BSpline.cpp, SickLDMRS-Process.cpp, displayD3D.cpp, displayGTK.cpp, displayOpenCV.cpp, displayX.cpp, displayXMulti.cpp, grabRealSense2_T265.cpp, manDisplay.cpp, mbot-apriltag-2D-half-vs.cpp, mbot-apriltag-ibvs.cpp, plot2d.cpp, plot3d.cpp, servoAfma62DhalfCamVelocity.cpp, servoAfma6AprilTagIBVS.cpp, servoAfma6AprilTagPBVS.cpp, servoAfma6Cylinder2DCamVelocity.cpp, servoAfma6Cylinder2DCamVelocitySecondaryTask.cpp, servoAfma6Ellipse2DCamVelocity.cpp, servoAfma6Line2DCamVelocity.cpp, servoAfma6Points2DCamVelocityEyeToHand.cpp, servoAfma6Segment2DCamVelocity.cpp, servoAfma6SquareLines2DCamVelocity.cpp, servoAfma6TwoLines2DCamVelocity.cpp, servoBebop2.cpp, servoFlirPtuIBVS.cpp, servoFrankaIBVS-EyeToHand-Lcur_cVe_eJe.cpp, servoFrankaIBVS-EyeToHand-Lcur_cVf_fVe_eJe.cpp, servoFrankaIBVS-EyeToHand-Ldes_cVf_fVe_eJe.cpp, servoFrankaIBVS.cpp, servoFrankaPBVS.cpp, servoMomentImage.cpp, servoMomentPoints.cpp, servoMomentPolygon.cpp, servoPixhawkDroneIBVS.cpp, servoSimuFourPoints2DCamVelocityDisplay.cpp, servoSimuFourPoints2DPolarCamVelocityDisplay.cpp, servoUniversalRobotsIBVS.cpp, servoUniversalRobotsPBVS.cpp, servoViper650FourPoints2DArtVelocityLs_cur.cpp, servoViper650FourPoints2DCamVelocityLs_cur-SR300.cpp, servoViper650FourPoints2DCamVelocityLs_cur.cpp, servoViper650Point2DCamVelocity.cpp, servoViper850FourPoints2DArtVelocityLs_cur.cpp, servoViper850FourPoints2DArtVelocityLs_des.cpp, servoViper850FourPoints2DCamVelocityLs_cur.cpp, servoViper850FourPointsKinect.cpp, servoViper850Point2DArtVelocity-jointAvoidance-basic.cpp, servoViper850Point2DArtVelocity-jointAvoidance-gpa.cpp, servoViper850Point2DArtVelocity-jointAvoidance-large.cpp, servoViper850Point2DArtVelocity.cpp, servoViper850Point2DCamVelocity.cpp, servoViper850Point2DCamVelocityKalman.cpp, sonarPioneerReader.cpp, templateTracker.cpp, testDisplayScaled.cpp, testDisplays.cpp, testFeatureSegment.cpp, testGenericTracker.cpp, testImageDraw.cpp, testKeyPoint-2.cpp, testKeyPoint-3.cpp, testKeyPoint-4.cpp, testNurbs.cpp, testOccipitalStructure_Core_imu.cpp, testPolygon.cpp, testRealSense2_D435_align.cpp, testRealSense2_T265_images_odometry.cpp, testRealSense2_T265_images_odometry_async.cpp, testRealSense2_T265_odometry.cpp, trackDot2.cpp, trackDot2WithAutoDetection.cpp, trackMeCircle.cpp, trackMeEllipse.cpp, trackMeLine.cpp, trackMeNurbs.cpp, tutorial-apriltag-detector-live-T265-realsense.cpp, tutorial-apriltag-detector.cpp, tutorial-barcode-detector-live.cpp, tutorial-barcode-detector.cpp, tutorial-brightness-adjustment.cpp, tutorial-contour.cpp, tutorial-detection-object-mbt2-deprecated.cpp, tutorial-detection-object-mbt2.cpp, tutorial-face-detector-live-threaded.cpp, tutorial-face-detector-live.cpp, tutorial-face-detector.cpp, tutorial-ibvs-4pts-display.cpp, tutorial-ibvs-4pts-image-tracking.cpp, tutorial-ibvs-4pts-ogre-tracking.cpp, tutorial-ibvs-4pts-wireframe-camera.cpp, tutorial-ibvs-4pts-wireframe-robot-afma6.cpp, tutorial-ibvs-4pts-wireframe-robot-viper.cpp, tutorial-klt-tracker-live.cpp, tutorial-klt-tracker.cpp, tutorial-matching-keypoint-SIFT.cpp, tutorial-matching-keypoint-homography.cpp, tutorial-matching-keypoint.cpp, tutorial-mb-generic-tracker-full.cpp, tutorial-mb-generic-tracker-live.cpp, tutorial-megapose-live-single-object-tracking.cpp, tutorial-munkres-assignment.cpp, tutorial-panda3d-renderer.cpp, tutorial-pf.cpp, tutorial-pose-from-planar-object.cpp, tutorial-video-recorder.cpp, visp-calibrate-camera.cpp, and wireframeSimulator.cpp.

Definition at line 201 of file vpColor.h.

Referenced by vpBasicFeature::display(), vpBasicFeature::display(), vpBasicKeyPoint::display(), vpFeatureLuminanceMapping::display(), vpFeatureLuminanceMapping::display(), vpForwardProjection::display(), vpForwardProjection::display(), vpKeyPoint::display(), vpKeyPoint::display(), vpMeSite::display(), vpMeSite::display(), vpProjectionDisplay::display(), vpRBSilhouetteCCDTracker::display(), vpProjectionDisplay::displayCamera(), vpMbEdgeTracker::displayFeaturesOnImage(), vpMbEdgeTracker::displayFeaturesOnImage(), vpMeLine::displayLine(), vpMeLine::displayLine(), vpMeLine::displayLine(), vpMeLine::displayLine(), vpKeyPoint::displayMatching(), vpKeyPoint::displayMatching(), vpRBTracker::displaySilhouette(), vpImageDraw::drawFrame(), vpMbTracker::initClick(), vpMbTracker::initClick(), vpMeNurbs::initTracking(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), vpMeSite::track(), vpDot2::trackAndDisplay(), vpMeSite::trackMultipleHypotheses(), vpSimulatorAfma6::updateArticularPosition(), and vpSimulatorViper850::updateArticularPosition().

◆ id

vpColorIdentifier vpColor::id

Color identifier to indicate if a color is predefined or set by the user using its RGB values.

Definition at line 187 of file vpColor.h.

Referenced by vpColor(), vpColor(), vpColor(), and vpColor().

◆ lightBlue

vpColor const vpColor::lightBlue = vpColor(140, 140, 255, id_lightBlue)
static

Predefined blue color with R=G=0 and B=255 and identifier vpColor::id_blue.

Examples
testPolygon.cpp.

Definition at line 203 of file vpColor.h.

◆ lightGray

vpColor const vpColor::lightGray = vpColor(192, 192, 192, id_lightGray)
static

Predefined gray color with R=G=B=128 and identifier vpColor::id_gray.

Definition at line 194 of file vpColor.h.

◆ lightGreen

vpColor const vpColor::lightGreen = vpColor(140, 255, 140, id_lightGreen)
static

Predefined green color with G=255 and R=B=0 and identifier vpColor::id_green.

Definition at line 200 of file vpColor.h.

◆ lightRed

vpColor const vpColor::lightRed = vpColor(255, 140, 140, id_lightRed)
static

Predefined red color with R=255 and G=B=0 and identifier vpColor::id_red.

Definition at line 197 of file vpColor.h.

◆ nbChannels

unsigned char vpRGBa::nbChannels = 4
staticconstexprinherited

Number of channels a vpRGBa object is made of.

Definition at line 322 of file vpRGBa.h.

◆ nbColors

const unsigned int vpColor::nbColors = 18
static

Array of available colors.

Definition at line 212 of file vpColor.h.

Referenced by getColor().

◆ none

vpColor const vpColor::none = vpColor(0, 0, 0, id_unknown)
static
Examples
catchGenericTrackerDeterminist.cpp, catchRBTDataset.cpp, grabRealSense2_T265.cpp, mbot-apriltag-2D-half-vs.cpp, mbot-apriltag-pbvs.cpp, perfGenericTracker.cpp, poseVirtualVS.cpp, servoAfma6AprilTagPBVS.cpp, servoAfma6MegaposePBVS.cpp, servoFrankaPBVS.cpp, servoSimu4Points.cpp, servoSimuCylinder.cpp, servoSimuSphere.cpp, servoUniversalRobotsPBVS.cpp, testDisplays.cpp, testGenericTracker.cpp, testGenericTrackerDepth.cpp, testImageDraw.cpp, testKeyPoint-2.cpp, testKeyPoint-4.cpp, testRealSense2_T265_images_odometry.cpp, testRealSense2_T265_images_odometry_async.cpp, testRealSense2_T265_odometry.cpp, tutorial-apriltag-detector-live-T265-realsense.cpp, tutorial-apriltag-detector-live-rgbd-realsense.cpp, tutorial-apriltag-detector-live-rgbd-structure-core.cpp, tutorial-apriltag-detector-live.cpp, tutorial-apriltag-detector.cpp, tutorial-detection-object-mbt-deprecated.cpp, tutorial-detection-object-mbt.cpp, tutorial-detection-object-mbt2-deprecated.cpp, tutorial-detection-object-mbt2.cpp, tutorial-draw-frame.cpp, tutorial-mb-edge-tracker.cpp, tutorial-mb-generic-tracker-apriltag-rs2.cpp, tutorial-mb-generic-tracker-apriltag-webcam.cpp, tutorial-mb-generic-tracker-full.cpp, tutorial-mb-generic-tracker-live.cpp, tutorial-mb-generic-tracker-read.cpp, tutorial-mb-generic-tracker-rgbd-blender.cpp, tutorial-mb-generic-tracker-rgbd-realsense-json.cpp, tutorial-mb-generic-tracker-rgbd-realsense.cpp, tutorial-mb-generic-tracker-rgbd-structure-core.cpp, tutorial-mb-generic-tracker-rgbd.cpp, tutorial-mb-generic-tracker-stereo-mono.cpp, tutorial-mb-generic-tracker-stereo.cpp, tutorial-mb-generic-tracker.cpp, tutorial-mb-hybrid-tracker.cpp, tutorial-mb-klt-tracker.cpp, tutorial-mb-tracker-full.cpp, tutorial-mb-tracker.cpp, tutorial-megapose-live-single-object-tracking.cpp, tutorial-pose-from-planar-object.cpp, tutorial-pose-from-points-image.cpp, tutorial-pose-from-points-live.cpp, tutorial-pose-from-points-realsense-T265.cpp, tutorial-pose-from-qrcode-image.cpp, tutorial-rbt-realsense.cpp, tutorial-rbt-sequence.cpp, visp-compute-apriltag-poses.cpp, and visp-compute-chessboard-poses.cpp.

Definition at line 210 of file vpColor.h.

Referenced by vpServoDisplay::display(), vpServoDisplay::display(), vpKeyPoint::displayMatching(), vpKeyPoint::displayMatching(), vpKeyPoint::displayMatching(), vpImageDraw::drawFrame(), vpPose::operator=(), vpDetectorAprilTag::setDisplayTag(), vpSimulatorAfma6::updateArticularPosition(), and vpSimulatorViper850::updateArticularPosition().

◆ orange

◆ purple

◆ R

◆ red

vpColor const vpColor::red = vpColor(255, 0, 0, id_red)
static

Predefined dark red color with R= 128 and G=B=0 and identifier vpColor::id_darkRed.

Examples
AROgre.cpp, AROgreBasic.cpp, BSpline.cpp, SickLDMRS-Process.cpp, catchFont.cpp, catchGenericTrackerDeterminist.cpp, catchParticleFilter.cpp, displayD3D.cpp, displayGTK.cpp, displayOpenCV.cpp, displayX.cpp, displayXMulti.cpp, grabFlyCapture.cpp, grabRealSense2.cpp, grabRealSense2_T265.cpp, grabV4l2MultiCpp11Thread.cpp, keyboardControlBebop2.cpp, manDisplay.cpp, manGeometricFeatures.cpp, mbot-apriltag-2D-half-vs.cpp, mbot-apriltag-ibvs.cpp, mbot-apriltag-pbvs.cpp, mbtEdgeKltTracking.cpp, mbtEdgeTracking.cpp, mbtGenericTracking.cpp, mbtGenericTracking2.cpp, mbtGenericTrackingDepth.cpp, mbtGenericTrackingDepthOnly.cpp, mbtKltTracking.cpp, perfGenericTracker.cpp, pf-nonlinear-complex-example.cpp, pf-nonlinear-example.cpp, plot2d.cpp, plot3d.cpp, poseVirtualVS.cpp, servoAfma62DhalfCamVelocity.cpp, servoAfma6AprilTagIBVS.cpp, servoAfma6AprilTagPBVS.cpp, servoAfma6Cylinder2DCamVelocity.cpp, servoAfma6Cylinder2DCamVelocitySecondaryTask.cpp, servoAfma6Ellipse2DCamVelocity.cpp, servoAfma6FourPoints2DArtVelocity.cpp, servoAfma6FourPoints2DCamVelocityLs_cur.cpp, servoAfma6FourPoints2DCamVelocityLs_cur_integrator.cpp, servoAfma6FourPoints2DCamVelocityLs_des.cpp, servoAfma6Line2DCamVelocity.cpp, servoAfma6MegaposePBVS.cpp, servoAfma6Point2DArtVelocity.cpp, servoAfma6Point2DCamVelocity.cpp, servoAfma6Points2DCamVelocityEyeToHand.cpp, servoAfma6Segment2DCamVelocity.cpp, servoAfma6SquareLines2DCamVelocity.cpp, servoAfma6TwoLines2DCamVelocity.cpp, servoBebop2.cpp, servoBiclopsPoint2DArtVelocity.cpp, servoFlirPtuIBVS.cpp, servoFrankaIBVS-EyeToHand-Lcur_cVe_eJe.cpp, servoFrankaIBVS-EyeToHand-Lcur_cVf_fVe_eJe.cpp, servoFrankaIBVS-EyeToHand-Ldes_cVf_fVe_eJe.cpp, servoFrankaIBVS.cpp, servoFrankaPBVS.cpp, servoMomentImage.cpp, servoMomentPoints.cpp, servoMomentPolygon.cpp, servoPioneerPanSegment3D.cpp, servoPioneerPoint2DDepth.cpp, servoPioneerPoint2DDepthWithoutVpServo.cpp, servoPixhawkDroneIBVS.cpp, servoPololuPtuPoint2DJointVelocity.cpp, servoSimu4Points.cpp, servoSimuCylinder.cpp, servoSimuCylinder2DCamVelocityDisplaySecondaryTask.cpp, servoSimuFourPoints2DPolarCamVelocityDisplay.cpp, servoSimuSphere.cpp, servoSimuSphere2DCamVelocityDisplaySecondaryTask.cpp, servoUniversalRobotsIBVS.cpp, servoUniversalRobotsPBVS.cpp, servoViper650FourPoints2DArtVelocityLs_cur.cpp, servoViper650FourPoints2DCamVelocityLs_cur-SR300.cpp, servoViper650FourPoints2DCamVelocityLs_cur.cpp, servoViper650Point2DCamVelocity.cpp, servoViper850Point2DArtVelocity-jointAvoidance-basic.cpp, servoViper850Point2DArtVelocity-jointAvoidance-gpa.cpp, servoViper850Point2DArtVelocity-jointAvoidance-large.cpp, sonarPioneerReader.cpp, templateTracker.cpp, testContours.cpp, testDisplayPolygonLines.cpp, testDisplayScaled.cpp, testDisplays.cpp, testFeatureSegment.cpp, testForceTorqueAti.cpp, testForceTorqueAtiNetFTSensor.cpp, testForceTorqueIitSensor.cpp, testGenericTracker.cpp, testGenericTrackerDepth.cpp, testImageDraw.cpp, testImageTemplateMatching.cpp, testKeyPoint-2.cpp, testKeyPoint-4.cpp, testKeyPoint-5.cpp, testKeyPoint-6.cpp, testNurbs.cpp, testOccipitalStructure_Core_images.cpp, testOccipitalStructure_Core_imu.cpp, testOccipitalStructure_Core_pcl.cpp, testPolygon.cpp, testRealSense2_D435.cpp, testRealSense2_D435_pcl.cpp, testRealSense2_SR300.cpp, testRealSense2_T265_images.cpp, testRealSense2_T265_images_odometry.cpp, testRealSense2_T265_images_odometry_async.cpp, testRealSense2_T265_odometry.cpp, testRealSense2_T265_undistort.cpp, testTrackDot.cpp, testVirtuoseWithGlove.cpp, trackDot.cpp, trackDot2.cpp, trackDot2WithAutoDetection.cpp, trackKltOpencv.cpp, trackMeEllipse.cpp, trackMeLine.cpp, tutorial-apriltag-detector-live-T265-realsense.cpp, tutorial-apriltag-detector-live-rgbd-realsense.cpp, tutorial-apriltag-detector-live-rgbd-structure-core.cpp, tutorial-apriltag-detector-live.cpp, tutorial-apriltag-detector.cpp, tutorial-autothreshold.cpp, tutorial-barcode-detector-live.cpp, tutorial-barcode-detector.cpp, tutorial-blob-tracker-live.cpp, tutorial-brightness-adjustment.cpp, tutorial-canny-hsv.cpp, tutorial-circle-hough.cpp, tutorial-compare-auto-gamma.cpp, tutorial-connected-components.cpp, tutorial-contour.cpp, tutorial-contrast-sharpening.cpp, tutorial-count-coins.cpp, tutorial-detection-object-mbt-deprecated.cpp, tutorial-detection-object-mbt.cpp, tutorial-detection-object-mbt2-deprecated.cpp, tutorial-detection-object-mbt2.cpp, tutorial-dnn-object-detection-live.cpp, tutorial-draw-circle.cpp, tutorial-draw-cross.cpp, tutorial-draw-line.cpp, tutorial-draw-point.cpp, tutorial-draw-rectangle.cpp, tutorial-draw-text.cpp, tutorial-export-image.cpp, tutorial-face-detector-live-threaded.cpp, tutorial-face-detector-live.cpp, tutorial-face-detector.cpp, tutorial-flir-ptu-ibvs.cpp, tutorial-flood-fill.cpp, tutorial-grabber-1394.cpp, tutorial-grabber-basler-pylon.cpp, tutorial-grabber-bebop2.cpp, tutorial-grabber-flycapture.cpp, tutorial-grabber-ids-ueye.cpp, tutorial-grabber-opencv-threaded.cpp, tutorial-grabber-opencv.cpp, tutorial-grabber-realsense-T265.cpp, tutorial-grabber-realsense.cpp, tutorial-grabber-structure-core.cpp, tutorial-grabber-v4l2-threaded.cpp, tutorial-grabber-v4l2.cpp, tutorial-hsv-range-tuner.cpp, tutorial-hsv-segmentation-pcl-viewer.cpp, tutorial-hsv-segmentation-pcl.cpp, tutorial-hsv-segmentation.cpp, tutorial-ibvs-4pts-display.cpp, tutorial-ibvs-4pts-image-tracking.cpp, tutorial-ibvs-4pts-ogre-tracking.cpp, tutorial-ibvs-4pts-wireframe-robot-afma6.cpp, tutorial-ibvs-4pts-wireframe-robot-viper.cpp, tutorial-image-display-scaled-auto.cpp, tutorial-image-display-scaled-manu.cpp, tutorial-image-display.cpp, tutorial-image-filter.cpp, tutorial-image-viewer.cpp, tutorial-klt-tracker-live.cpp, tutorial-klt-tracker-with-reinit.cpp, tutorial-klt-tracker.cpp, tutorial-matching-keypoint-SIFT.cpp, tutorial-matching-keypoint-homography.cpp, tutorial-mb-edge-tracker.cpp, tutorial-mb-generic-tracker-apriltag-rs2.cpp, tutorial-mb-generic-tracker-apriltag-webcam.cpp, tutorial-mb-generic-tracker-full.cpp, tutorial-mb-generic-tracker-live.cpp, tutorial-mb-generic-tracker-read.cpp, tutorial-mb-generic-tracker-rgbd-blender.cpp, tutorial-mb-generic-tracker-rgbd-realsense-json.cpp, tutorial-mb-generic-tracker-rgbd-realsense.cpp, tutorial-mb-generic-tracker-rgbd-structure-core.cpp, tutorial-mb-generic-tracker-rgbd.cpp, tutorial-mb-generic-tracker-stereo-mono.cpp, tutorial-mb-generic-tracker-stereo.cpp, tutorial-mb-generic-tracker.cpp, tutorial-mb-hybrid-tracker.cpp, tutorial-mb-klt-tracker.cpp, tutorial-mb-tracker-full.cpp, tutorial-mb-tracker.cpp, tutorial-me-ellipse-tracker.cpp, tutorial-me-line-tracker.cpp, tutorial-megapose-live-single-object-tracking.cpp, tutorial-munkres-assignment.cpp, tutorial-npz.cpp, tutorial-panda3d-renderer.cpp, tutorial-pf-curve-fitting-all.cpp, tutorial-pf-curve-fitting-pf.cpp, tutorial-pf.cpp, tutorial-pose-from-points-live.cpp, tutorial-pose-from-points-realsense-T265.cpp, tutorial-pose-from-qrcode-image.cpp, tutorial-rbt-realsense.cpp, tutorial-rbt-sequence.cpp, tutorial-simu-pioneer-continuous-gain-adaptive.cpp, tutorial-simu-pioneer-continuous-gain-constant.cpp, tutorial-simu-pioneer-pan.cpp, tutorial-simu-pioneer.cpp, tutorial-template-tracker.cpp, tutorial-ukf.cpp, tutorial-video-manipulation.cpp, tutorial-video-reader.cpp, tutorial-video-recorder.cpp, tutorial-viewer.cpp, videoReader.cpp, visp-acquire-franka-calib-data.cpp, visp-acquire-universal-robots-calib-data.cpp, visp-calibrate-camera.cpp, visp-compute-apriltag-poses.cpp, visp-compute-chessboard-poses.cpp, visp-read-rs-dataset.cpp, visp-save-rs-dataset.cpp, and wireframeSimulator.cpp.

Definition at line 198 of file vpColor.h.

Referenced by vpMbtDistanceCylinder::computeInteractionMatrixError(), vpColorHistogramMask::display(), vpKeyPoint::display(), vpKeyPoint::display(), vpMbDepthNormalTracker::display(), vpMbDepthNormalTracker::display(), vpMbEdgeKltTracker::display(), vpMbEdgeKltTracker::display(), vpMbKltTracker::display(), vpMbKltTracker::display(), vpMeSite::display(), vpMeSite::display(), vpRBSilhouetteCCDTracker::display(), vpProjectionDisplay::displayCamera(), vpMbtFaceDepthNormal::displayFeature(), vpMbtFaceDepthNormal::displayFeature(), vpMbEdgeTracker::displayFeaturesOnImage(), vpMbEdgeTracker::displayFeaturesOnImage(), vpKeyPoint::displayMatching(), vpKeyPoint::displayMatching(), vpMbtDistanceKltCylinder::displayPrimitive(), vpMbtDistanceKltCylinder::displayPrimitive(), vpMbtDistanceKltPoints::displayPrimitive(), vpMbtDistanceKltPoints::displayPrimitive(), vpImageDraw::drawFrame(), vpWireFrameSimulator::getInternalImage(), vpWireFrameSimulator::getInternalImage(), vpRobotWireFrameSimulator::getInternalView(), vpRobotWireFrameSimulator::getInternalView(), vpMbTracker::initClick(), vpMbTracker::initClick(), vpTemplateTrackerZone::initClick(), vpMeEllipse::initTracking(), vpMeEllipse::initTracking(), vpMeLine::initTracking(), vpMeEllipse::sample(), vpMbDepthDenseTracker::segmentPointCloud(), vpMbDepthDenseTracker::segmentPointCloud(), vpMbDepthDenseTracker::segmentPointCloud(), vpMbDepthNormalTracker::segmentPointCloud(), vpMbDepthNormalTracker::segmentPointCloud(), vpMbDepthNormalTracker::segmentPointCloud(), vpDot2::track(), vpDot::track(), vpMeLine::track(), vpMeSite::track(), vpDot2::trackAndDisplay(), and vpMeSite::trackMultipleHypotheses().

◆ white

◆ yellow