Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches
vpColorGetter< ID > Class Template Reference

#include <vpColorGetter.h>

Public Member Functions

ArithmeticType & get (vpHSV< ArithmeticType, useFullScale > &hsv)
ArithmeticType & get (vpHSV< ArithmeticType, useFullScale > &hsv)
ArithmeticType & get (vpHSV< ArithmeticType, useFullScale > &hsv)
const ArithmeticType & get (const vpHSV< ArithmeticType, useFullScale > &hsv)
const ArithmeticType & get (const vpHSV< ArithmeticType, useFullScale > &hsv)
const ArithmeticType & get (const vpHSV< ArithmeticType, useFullScale > &hsv)
unsigned char & get (vpRGBa &rgba)
unsigned char & get (vpRGBa &rgba)
unsigned char & get (vpRGBa &rgba)
unsigned char & get (vpRGBa &rgba)
const unsigned char & get (const vpRGBa &rgba)
const unsigned char & get (const vpRGBa &rgba)
const unsigned char & get (const vpRGBa &rgba)
const unsigned char & get (const vpRGBa &rgba)

Static Public Member Functions

template<typename ArithmeticType, bool useFullScale>
static ArithmeticType & get (vpHSV< ArithmeticType, useFullScale > &col)
template<typename ArithmeticType, bool useFullScale>
static const ArithmeticType & get (const vpHSV< ArithmeticType, useFullScale > &col)
static unsigned char & get (vpRGBa &col)
static const unsigned char & get (const vpRGBa &col)

Detailed Description

template<int ID>
class vpColorGetter< ID >

Helper class that permits to get a channel of a color type by its index instead of its name.

Template Parameters
IDThe index of the channel.

Definition at line 48 of file vpColorGetter.h.

Member Function Documentation

◆ get() [1/18]

template<int ID>
template<typename ArithmeticType, bool useFullScale>
const ArithmeticType & vpColorGetter< ID >::get ( const vpHSV< ArithmeticType, useFullScale > & col)
static

Getter for a channel of a HSV pixel.

Template Parameters
ArithmeticTypeThe encoding type of a channel.
useFullScaleWhen using unsigned charn, either true if the Hue channel uses the full range of unsigned char or false if it uses a limited range.
Parameters
[in]colThe pixel we want to get a channel value.
Returns
ArithmeticType& The channel value.

◆ get() [2/18]

const ArithmeticType & vpColorGetter< 2 >::get ( const vpHSV< ArithmeticType, useFullScale > & hsv)
inline

Definition at line 132 of file vpColorGetter.h.

References vpHSV< T, useFullScale >::V.

◆ get() [3/18]

const ArithmeticType & vpColorGetter< 1 >::get ( const vpHSV< ArithmeticType, useFullScale > & hsv)
inline

Definition at line 125 of file vpColorGetter.h.

References vpHSV< T, useFullScale >::S.

◆ get() [4/18]

const ArithmeticType & vpColorGetter< 0 >::get ( const vpHSV< ArithmeticType, useFullScale > & hsv)
inline

Definition at line 118 of file vpColorGetter.h.

References vpHSV< T, useFullScale >::H.

◆ get() [5/18]

template<int ID>
const unsigned char & vpColorGetter< ID >::get ( const vpRGBa & col)
static

Getter for a vpRGBA pixel.

Parameters
[in]colThe pixel.
Returns
const unsigned char& The value of the desired channel.

◆ get() [6/18]

const unsigned char & vpColorGetter< 3 >::get ( const vpRGBa & rgba)
inline

Definition at line 181 of file vpColorGetter.h.

References vpRGBa::A.

◆ get() [7/18]

const unsigned char & vpColorGetter< 2 >::get ( const vpRGBa & rgba)
inline

Definition at line 175 of file vpColorGetter.h.

References vpRGBa::B.

◆ get() [8/18]

const unsigned char & vpColorGetter< 1 >::get ( const vpRGBa & rgba)
inline

Definition at line 169 of file vpColorGetter.h.

References vpRGBa::G.

◆ get() [9/18]

const unsigned char & vpColorGetter< 0 >::get ( const vpRGBa & rgba)
inline

Definition at line 163 of file vpColorGetter.h.

References vpRGBa::R.

◆ get() [10/18]

template<int ID>
template<typename ArithmeticType, bool useFullScale>
ArithmeticType & vpColorGetter< ID >::get ( vpHSV< ArithmeticType, useFullScale > & col)
static

Setter for a channel of a HSV pixel.

Template Parameters
ArithmeticTypeThe encoding type of a channel.
useFullScaleWhen using unsigned charn, either true if the Hue channel uses the full range of unsigned char or false if it uses a limited range.
Parameters
[in]colThe pixel we want to set a channel value.
Returns
ArithmeticType& The channel value.

◆ get() [11/18]

ArithmeticType & vpColorGetter< 2 >::get ( vpHSV< ArithmeticType, useFullScale > & hsv)
inline

Definition at line 111 of file vpColorGetter.h.

References vpHSV< T, useFullScale >::V.

◆ get() [12/18]

ArithmeticType & vpColorGetter< 1 >::get ( vpHSV< ArithmeticType, useFullScale > & hsv)
inline

Definition at line 104 of file vpColorGetter.h.

References vpHSV< T, useFullScale >::S.

◆ get() [13/18]

ArithmeticType & vpColorGetter< 0 >::get ( vpHSV< ArithmeticType, useFullScale > & hsv)
inline

Definition at line 97 of file vpColorGetter.h.

References vpHSV< T, useFullScale >::H.

◆ get() [14/18]

template<int ID>
unsigned char & vpColorGetter< ID >::get ( vpRGBa & col)
static

Setter for a vpRGBa pixel.

Parameters
[in]colThe pixel.
Returns
unsigned char& The channel after the change has been performed.

◆ get() [15/18]

unsigned char & vpColorGetter< 3 >::get ( vpRGBa & rgba)
inline

Definition at line 157 of file vpColorGetter.h.

References vpRGBa::A.

◆ get() [16/18]

unsigned char & vpColorGetter< 2 >::get ( vpRGBa & rgba)
inline

Definition at line 151 of file vpColorGetter.h.

References vpRGBa::B.

◆ get() [17/18]

unsigned char & vpColorGetter< 1 >::get ( vpRGBa & rgba)
inline

Definition at line 145 of file vpColorGetter.h.

References vpRGBa::G.

◆ get() [18/18]

unsigned char & vpColorGetter< 0 >::get ( vpRGBa & rgba)
inline

Definition at line 139 of file vpColorGetter.h.

References vpRGBa::R.