Visual Servoing Platform  version 3.2.0 under development (2019-01-22)
vpFeatureTranslation Class Reference

#include <visp3/visual_features/vpFeatureTranslation.h>

+ Inheritance diagram for vpFeatureTranslation:

Public Types

enum  vpFeatureTranslationRepresentationType { cdMc, cMcd, cMo }
 
enum  { FEATURE_ALL = 0xffff }
 
enum  vpBasicFeatureDeallocatorType { user, vpServo }
 

Public Member Functions

 vpFeatureTranslation ()
 
 vpFeatureTranslation (vpFeatureTranslationRepresentationType r)
 
 vpFeatureTranslation (vpHomogeneousMatrix &f2Mf1, vpFeatureTranslationRepresentationType r)
 
virtual ~vpFeatureTranslation ()
 
void buildFrom (const vpHomogeneousMatrix &f2Mf1)
 
void display (const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const
 
void display (const vpCameraParameters &cam, const vpImage< vpRGBa > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const
 
vpFeatureTranslationduplicate () const
 
vpColVector error (const vpBasicFeature &s_star, const unsigned int select=FEATURE_ALL)
 
vpFeatureTranslationRepresentationType getFeatureTranslationType () const
 
double get_Tx () const
 
double get_Ty () const
 
double get_Tz () const
 
void init ()
 
vpMatrix interaction (const unsigned int select=FEATURE_ALL)
 
void print (const unsigned int select=FEATURE_ALL) const
 
void set_Tx (const double t_x)
 
void set_Ty (const double t_y)
 
void set_Tz (const double t_z)
 
void setFeatureTranslationType (const vpFeatureTranslationRepresentationType r)
 
Inherited functionalities from vpBasicFeature
unsigned int dimension_s ()
 
vpColVector get_s (unsigned int select=FEATURE_ALL) const
 
vpBasicFeatureDeallocatorType getDeallocate ()
 
unsigned int getDimension (const unsigned int select=FEATURE_ALL) const
 
virtual double operator[] (const unsigned int i) const
 
void setDeallocate (vpBasicFeatureDeallocatorType d)
 
void setFlags ()
 

Static Public Member Functions

static unsigned int selectTx ()
 
static unsigned int selectTy ()
 
static unsigned int selectTz ()
 
static unsigned int selectAll ()
 

Static Public Attributes

static const unsigned int FEATURE_LINE [32]
 

Protected Member Functions

void resetFlags ()
 

Protected Attributes

vpColVector s
 
unsigned int dim_s
 
bool * flags
 
unsigned int nbParameters
 
vpBasicFeatureDeallocatorType deallocate
 

Detailed Description

Class that defines the translation visual feature $s=(t_x,t_y,t_z)$.

It is convenient to consider two coordinate frames noted here $ {\cal{F}}_1 $ and $ {\cal{F}}_{2} $.

Let $^{{\cal{F}}_2}M_{{\cal{F}}_1} $ be the homogeneous matrix that gives the orientation and the translation of the frame $ {\cal{F}}_1 $ with respect to the frame $ {\cal{F}}_2 $.

\[ ^{{\cal{F}}_2}M_{{\cal{F}}_1} = \left(\begin{array}{cc} ^{{\cal{F}}_2}R_{{\cal{F}}_1} & ^{{\cal{F}}_2}t_{{\cal{F}}_1} \\ {\bf 0}_{1\times 3} & 1 \end{array} \right) \]

with $^{{\cal{F}}_2}R_{{\cal{F}}_1} $ the rotation matrix that gives the orientation of the frame $ {\cal{F}}_1 $ relative to the frame $ {\cal{F}}_2 $ and $^{{\cal{F}}_2}t_{{\cal{F}}_1} $ the translation vector that gives the position of the frame $ {\cal{F}}_1 $ relative to the frame $ {\cal{F}}_2 $. To know more about homogeneous matrices see vpHomogeneousMatrix documentation.

This class can be used to manipulate three kind of visual features:

  • This class can be used to manipulate the translation visual feature $s= ^{c^*}t_c$ which gives the position of the current camera frame relative to the desired camera frame. It is composed by the three components $(t_x,t_y,t_z)$. The desired visual feature $ s^* $ is equal to zero. The corresponding error is than equal to $ e=(s-s^*) = ^{c^*}t_c $. In this case, the interaction matrix related to $ s $ is given by

    \[ L = [ ^{c^*}R_c \;\; 0_3] \]

  • This class can also be used to manipulate the translation visual feature $s= ^{c}t_{c^*}$ which gives the position of the desired camera frame relative to the current camera frame. It is composed by the three components $(t_x,t_y,t_z)$. The desired visual feature $ s^* $ is equal to zero. The corresponding error is than equal to $ e=(s-s^*) = ^{c}t_{c^*} $. In this case, the interaction matrix related to $ s $ is given by

    \[ L = [ -I_3 \;\; [^{c}t_{c^*}]_\times] \]

  • Actually, this class can also be used to manipulate the translation visual feature $s= ^{c}t_o$ which gives the position of the object frame relative to the current camera frame. It is composed by the three components $(t_x,t_y,t_z)$ too. The desired visual feature $ s^* $ is the translation visual feature $s^*= ^{c^*}t_o$ which gives the position of the object frame relative to the desired camera frame. The corresponding error is than equal to $ e=(s-s^*) = ^{c}t_o - ^{c^*}t_o $. In this case, the interaction matrix related to $ s $ is given by

    \[ L = [ -I_3 \;\; [^{c}t_o]_\times] \]

To initialize the feature $(t_x, t_y, t_z)$ you may use member fonctions like set_Tx(), set_Ty(), set_Tz(), or also buildFrom() fonctions.

The interaction() method allows to compute the interaction matrix $ L$ associated to the translation visual feature, while the error() method computes the error vector $(s - s^*)$ between the current visual feature and the desired one.

The code below shows how to create a eye-in hand visual servoing task using a 3D translation feature $(t_x,t_y,t_z)$ that correspond to the 3D translation between the desired camera frame and the current camera frame. To control six degrees of freedom, at least three other features must be considered like vpFeatureThetaU visual features. First we create a current ( $s$) and desired ( $s^*$) 3D translation feature, set the task to use the interaction matrix associated to the current feature $L_s$ and than compute the camera velocity $v=-\lambda \; L_s^+ \; (s-s^*)$. The current feature $s$ is updated in the while() loop while $s^*$ is set to zero.

#include <visp3/core/vpHomogeneousMatrix.h>
#include <visp3/visual_features/vpFeatureTranslation.h>
#include <visp3/vs/vpServo.h>
int main()
{
vpServo task; // Visual servoing task
// ... cdMc need here to be initialized from for example a pose estimation.
// Creation of the current visual feature s
s.buildFrom(cdMc); // Initialization of the current feature s=(tx,ty,tz)
// Set eye-in-hand control law.
// The computed velocities will be expressed in the camera frame
// Interaction matrix is computed with the current visual features s
// Set the constant gain
double lambda = 0.8;
task.setLambda(lambda);
// Add the 3D translation feature to the task
task.addFeature(s); // s* is here considered as zero
// Control loop
for ( ; ; ) {
// ... cdMc need here to be initialized from for example a pose estimation.
// Update the current 3D translation visual feature
s.buildFrom(cdMc);
// compute the control law
vpColVector v = task.computeControlLaw(); // camera velocity
}
}

If you want to deal only with the $(t_x,t_y)$ subset feature from the 3D translation, you have just to modify the addFeature() call in the previous example by the following line. In that case, the dimension of $s$ is two.

// Add the (tx,ty) subset features from 3D translation to the task

If you want to build your own control law, this other example shows how to create a current ( $s$) and desired ( $s^*$) 3D translation visual feature, compute the corresponding error vector $(s-s^*)$ and finally build the interaction matrix $L_s$.

#include <visp3/core/vpHomogeneousMatrix.h>
#include <visp3/core/vpMatrix.h>
#include <visp3/visual_features/vpFeatureTranslation.h>
int main()
{
// ... cdMc need here to be initialized from for example a pose estimation.
// Creation of the current feature s
s.buildFrom(cdMc); // Initialization of the feature
// Creation of the desired feature s*. By default this feature is
// initialized to zero
// Compute the interaction matrix for the translation feature
vpMatrix L = s.interaction();
// Compute the error vector (s-s*) for the translation feature
vpColVector e = s.error(s_star); // e = (s-s*)
}

The code below shows how to create an eye-in hand visual servoing task using a 3D translation feature $(t_x,t_y,t_z)$ that correspond to the 3D translation between the current camera frame and the object frame. Like with the previous examples, to control six degrees of freedom, at least three other features must be considered like vpFeatureThetaU visual features. The way to initialize the visual features is quite the same as before. The difference is that the cMo method must be precised and the desired feature is note necessary equal to zero.

#include <visp3/core/vpHomogeneousMatrix.h>
#include <visp3/visual_features/vpFeatureTranslation.h>
#include <visp3/vs/vpServo.h>
int main()
{
vpServo task; // Visual servoing task
// ... cdMo need here to be initialized from for example a pose estimation.
// Creation of the desired visual feature s*
s_star.buildFrom(cdMo); // Initialization of the desired feature s*=(tx*,ty*,tz*)
// ... cMo need here to be computed.
// Creation of the current visual feature s
s.buildFrom(cMo); // Initialization of the current feature s=(tx,ty,tz)
// Set eye-in-hand control law.
// The computed velocities will be expressed in the camera frame
// Interaction matrix is computed with the current visual features s
// Set the constant gain
double lambda = 0.8;
task.setLambda(lambda);
// Add the 3D translation feature to the task
task.addFeature(s, s_star); // s* is here considered as zero
// Control loop
for ( ; ; ) {
// ... cMo need here to be computed from for example a pose estimation.
// Update the current 3D translation visual feature
s.buildFrom(cMo);
// compute the control law
vpColVector v = task.computeControlLaw(); // camera velocity
}
}
Examples:
servoFrankaPBVS.cpp, servoSimu3D_cdMc_CamVelocity.cpp, servoSimu3D_cMcd_CamVelocity.cpp, and servoSimuPoint2DhalfCamVelocity3.cpp.

Definition at line 276 of file vpFeatureTranslation.h.

Member Enumeration Documentation

anonymous enum
inherited
Enumerator
FEATURE_ALL 

Definition at line 82 of file vpBasicFeature.h.

Indicates who should deallocate the feature.

Enumerator
user 
vpServo 

Definition at line 88 of file vpBasicFeature.h.

Kind of implemented 3D translation feature.

Enumerator
cdMc 

Selector used to manipulate the visual feature $s= ^{c^*}t_c$ which gives the position of the current camera frame relative to the desired camera frame.

cMcd 

Selector used to manipulate the visual feature $s= ^{c}t_{c^*}$ which gives the position of the desired camera frame relative to the current camera frame.

cMo 

Selector used to manipulate the visual feature $s= ^{c}t_o$ which gives the position of the object frame relative to the current camera frame.

Definition at line 283 of file vpFeatureTranslation.h.

Constructor & Destructor Documentation

vpFeatureTranslation::vpFeatureTranslation ( )

Default constructor that builds a visual feature and initialize it to zero. The type of the translation feature will be vpFeatureTranslation::cdMc by default. Use the function setFeatureTranslationType() to set the desired type of feature.

Definition at line 88 of file vpFeatureTranslation.cpp.

References init().

Referenced by duplicate().

vpFeatureTranslation::vpFeatureTranslation ( vpFeatureTranslationRepresentationType  r)
explicit

Default constructor that builds a visual feature and initialize it to zero specifying the type.

Parameters
r: Type of considered 3D translation feature.

Definition at line 97 of file vpFeatureTranslation.cpp.

References init().

vpFeatureTranslation::vpFeatureTranslation ( vpHomogeneousMatrix f2Mf1_,
vpFeatureTranslationRepresentationType  r 
)

Constructor that builds a 3D visual feature from an homogeneous matrix $ ^{{\cal{F}}_2}M_{{\cal{F}}_1} $ that represent the 3D transformation between two frames ${\cal{F}}_1$ and ${\cal{F}}_2$.

Parameters
f2Mf1_[in] : 3D displacement that the camera has to achieve to move from the frame ${\cal{F}}_2$ to the frame ${\cal{F}}_1$ ( $ ^{{\cal{F}}_2}M_{{\cal{F}}_1} $).
r: type of feature. It can be vpFeature::cdMc or vpFeature::cMo.

Definition at line 114 of file vpFeatureTranslation.cpp.

References buildFrom(), and init().

virtual vpFeatureTranslation::~vpFeatureTranslation ( )
inlinevirtual

Member Function Documentation

void vpFeatureTranslation::buildFrom ( const vpHomogeneousMatrix f2Mf1_)

Build a 3D translation visual feature from an homogeneous matrix $ ^{{\cal{F}}_2}M_{{\cal{F}}_1} $ that represent the 3D transformation between two frames ${\cal{F}}_1$ and ${\cal{F}}_2$.

Parameters
f2Mf1_[in] : 3D displacement that the camera has to achieve to move from the frame ${\cal{F}}_2$ to the frame ${\cal{F}}_1$ ( $ ^{{\cal{F}}_2}M_{{\cal{F}}_1} $).
Examples:
servoFrankaPBVS.cpp.

Definition at line 131 of file vpFeatureTranslation.cpp.

References vpBasicFeature::flags, and vpBasicFeature::s.

Referenced by vpFeatureTranslation().

unsigned int vpBasicFeature::dimension_s ( )
inlineinherited

Return the dimension of the feature vector $\bf s$.

Definition at line 110 of file vpBasicFeature.h.

References vpColor::green.

void vpFeatureTranslation::display ( const vpCameraParameters cam,
const vpImage< unsigned char > &  I,
const vpColor color = vpColor::green,
unsigned int  thickness = 1 
) const
virtual

Not implemented.

Implements vpBasicFeature.

Definition at line 609 of file vpFeatureTranslation.cpp.

References vpERROR_TRACE.

void vpFeatureTranslation::display ( const vpCameraParameters cam,
const vpImage< vpRGBa > &  I,
const vpColor color = vpColor::green,
unsigned int  thickness = 1 
) const
virtual

Not implemented.

Implements vpBasicFeature.

Definition at line 626 of file vpFeatureTranslation.cpp.

References vpERROR_TRACE.

vpFeatureTranslation * vpFeatureTranslation::duplicate ( ) const
virtual

Feature duplication.

Create an object with the same type.

s_star = s.duplicate();
// s_star is now a vpFeatureTranslation

Implements vpBasicFeature.

Definition at line 592 of file vpFeatureTranslation.cpp.

References cdMc, cMcd, cMo, and vpFeatureTranslation().

vpColVector vpFeatureTranslation::error ( const vpBasicFeature s_star,
const unsigned int  select = FEATURE_ALL 
)
virtual

Compute the error $ (s-s^*)$ between the current and the desired visual features from a subset of the possible features.

  • With the feature type cdMc: Since this visual feature $ s $ represent the 3D translation from the desired camera frame to the current one $^{c^*}t_{c} $, the desired visual feature $ s^* $ should be zero. Thus, the error is here equal to the current visual feature $ s $.
  • With the feature type cMo: In this case the desired feature is not necessary equal to zero. Thus, the error is here equal to $ s-s^* $.
Parameters
s_star: Desired visual feature.
select: The error can be computed for a selection of a subset of the possible translation features.
  • To compute the error for all the three translation vector coordinates use vpBasicFeature::FEATURE_ALL. In that case the error vector is a 3 dimension column vector.
  • To compute the error for only one of the translation vector coordinate feature $(t_x, t_y, t_z)$ use one of the corresponding function selectTx(), selectTy() or selectTz(). In that case the error vector is a 1 dimension column vector.
Returns
The error $ (s-s^*)$ between the current and the desired visual feature.
Exceptions
vpFeatureException::badInitializationError: If the desired visual feature $ s^* $ is not equal to zero in the case of the feature type is cdMc or cMcd.

The code below shows how to use this method to manipulate the $ t_z $ subset in the case of the cdMc feature type. It can be used also with the cMo feature type. In that case just change vpFeatureTranslation::cdMc by vpFeatureTranslation::cMo during the declaration of the two vpFeatureTranslation features.

// Creation of the current feature s
s.set_TUz(0.3); // Initialization of the feature
// Creation of the desired feature s*. By default this feature is
// initialized to zero
// Compute the interaction matrix for the t_z translation feature
vpMatrix L_z = s.interaction( vpFeatureTranslation::selectTz() );
// Compute the error vector (s-s*) for the t_z feature

To manipulate the subset features $s=(t_y, t_z)$, the code becomes:

// Compute the interaction matrix for the t_y, t_z features
// Compute the error vector e = (s-s*) for the t_y, t_z feature

Reimplemented from vpBasicFeature.

Definition at line 509 of file vpFeatureTranslation.cpp.

References vpFeatureException::badInitializationError, cdMc, cMcd, vpBasicFeature::get_s(), vpBasicFeature::s, selectTx(), selectTy(), selectTz(), vpColVector::stack(), vpColVector::sumSquare(), and vpERROR_TRACE.

double vpFeatureTranslation::get_Tx ( ) const

Return the $t_x $ subset value of the visual feature $s$.

Definition at line 205 of file vpFeatureTranslation.cpp.

References vpBasicFeature::s.

double vpFeatureTranslation::get_Ty ( ) const

Return the $t_y $ subset value of the visual feature $s$.

Definition at line 212 of file vpFeatureTranslation.cpp.

References vpBasicFeature::s.

double vpFeatureTranslation::get_Tz ( ) const

Return the $t_z $ subset value of the visual feature $s$.

Definition at line 219 of file vpFeatureTranslation.cpp.

References vpBasicFeature::s.

vpBasicFeatureDeallocatorType vpBasicFeature::getDeallocate ( )
inlineinherited

Definition at line 123 of file vpBasicFeature.h.

unsigned int vpBasicFeature::getDimension ( const unsigned int  select = FEATURE_ALL) const
inherited

Get the feature vector dimension.

Definition at line 100 of file vpBasicFeature.cpp.

References vpBasicFeature::dim_s, vpBasicFeature::FEATURE_LINE, vpArray2D< Type >::getRows(), and vpBasicFeature::s.

Referenced by vpFeatureMoment::vpFeatureMoment().

vpFeatureTranslation::vpFeatureTranslationRepresentationType vpFeatureTranslation::getFeatureTranslationType ( ) const

Get the type of translation feature.

Returns
Type of translation feature. It can be vpFeatureTranslation::cdMc, vpFeatureTranslation::cMcd or vpFeatureTranslation::cMo.
See also
setFeatureTranslationType()

Definition at line 195 of file vpFeatureTranslation.cpp.

void vpFeatureTranslation::init ( void  )
virtual

Initialise the memory space requested for 3D translation visual feature.

Implements vpBasicFeature.

Definition at line 68 of file vpFeatureTranslation.cpp.

References vpBasicFeature::dim_s, vpBasicFeature::flags, vpBasicFeature::nbParameters, vpColVector::resize(), and vpBasicFeature::s.

Referenced by vpFeatureTranslation().

vpMatrix vpFeatureTranslation::interaction ( const unsigned int  select = FEATURE_ALL)
virtual

Compute and return the interaction matrix $ L $ from a subset $(t_x, t_y, t_z)$ of the possible translation features that represent the 3D transformation $ ^{{\cal{F}}_2}M_{{\cal{F}}_1} $.

As it exists three different features, the computation of the interaction matrix is diferent for each one.

  • With the feature type cdMc:

    \[ L = [ ^{c^*}R_c \;\; 0_3] \]

where $^{c^*}R_c$ is the rotation the camera has to achieve to move from the desired camera frame to the current camera frame.

  • With the feature type cMcd:

    \[ L = [ -I_3 \;\; [^{c}t_{c^*}]_\times] \]

where $^{c}R_{c^*}$ is the rotation the camera has to achieve to move from the current camera frame to the desired camera frame.

  • With the feature type cMo:

    \[ L = [ -I_3 \;\; [^{c}t_o]_\times] \]

where $^{c}t_o $ is the position of the object frame relative to the current camera frame.

Parameters
select: Selection of a subset of the possible translation features.
  • To compute the interaction matrix for all the three translation subset features $(t_x,t_y,t_y)$ use vpBasicFeature::FEATURE_ALL. In that case the dimension of the interaction matrix is $ [3 \times 6] $
  • To compute the interaction matrix for only one of the translation subset ( $t_x, t_y, t_z$) use one of the corresponding function selectTx(), selectTy() or selectTz(). In that case the returned interaction matrix is $ [1 \times 6] $ dimension.
Returns
The interaction matrix computed from the translation features.

The code below shows how to compute the interaction matrix associated to the visual feature $s = t_x $ using the cdMc feature type.

...
// Creation of the current feature s
vpFeatureTranslation s(vpFeatureTranslation::cdMc);
s.buildFrom(cdMc);
vpMatrix L_x = s.interaction( vpFeatureTranslation::selectTx() );

The code below shows how to compute the interaction matrix associated to the $s = (t_x, t_y) $ subset visual feature:

L_xy is here now a 2 by 6 matrix. The first line corresponds to the $ t_x $ visual feature while the second one to the $ t_y $ visual feature.

It is also possible to build the interaction matrix from all the translation components by:

vpMatrix L_xyz = s.interaction( vpBasicFeature::FEATURE_ALL );

In that case, L_xyz is a 3 by 6 interaction matrix where the last line corresponds to the $ t_z $ visual feature.

Implements vpBasicFeature.

Definition at line 302 of file vpFeatureTranslation.cpp.

References cdMc, cMcd, cMo, vpBasicFeature::deallocate, vpBasicFeature::flags, vpBasicFeature::nbParameters, vpBasicFeature::resetFlags(), vpArray2D< Type >::resize(), vpBasicFeature::s, selectTx(), selectTy(), selectTz(), vpMatrix::stack(), vpBasicFeature::user, and vpTRACE.

virtual double vpBasicFeature::operator[] ( const unsigned int  i) const
inlinevirtualinherited

Return element i in the state vector (usage : x = s[i] )

Definition at line 130 of file vpBasicFeature.h.

void vpFeatureTranslation::print ( const unsigned int  select = FEATURE_ALL) const
virtual

Print to stdout the values of the current visual feature $ s $.

Parameters
select: Selection of a subset of the possible translation features.
vpHomogeneousMatrix cdMc; // Homogeneous transformation between the desired
camera frame and the current camera frame.
// Creation of the current feature s
vpFeatureTranslation s(vpFeatureTranslation::cdMc);
s.buildFrom(cdMc);
s.print(); // print all the 3 components of the translation feature
s.print(vpBasicFeature::FEATURE_ALL); // same behavior then previous line
s.print(vpFeatureTranslation::selectTz()); // print only the t_z component

Implements vpBasicFeature.

Definition at line 564 of file vpFeatureTranslation.cpp.

References vpBasicFeature::s, selectTx(), selectTy(), and selectTz().

static unsigned int vpBasicFeature::selectAll ( )
inlinestaticinherited

Select all the features.

Definition at line 142 of file vpBasicFeature.h.

unsigned int vpFeatureTranslation::selectTx ( )
static

Function used to select the $ t_x$ subset of the translation visual feature.

This function is to use in conjunction with interaction() in order to compute the interaction matrix associated to $ t_x$.

See the interaction() method for an usage example.

This function is also useful in the vpServo class to indicate that a subset of the visual feature is to use in the control law:

See also
selectTy(), selectTz()

Definition at line 683 of file vpFeatureTranslation.cpp.

References vpBasicFeature::FEATURE_LINE.

Referenced by error(), interaction(), and print().

unsigned int vpFeatureTranslation::selectTy ( )
static

Function used to select the $ t_y$ subset of the translation visual feature.

This function is to use in conjunction with interaction() in order to compute the interaction matrix associated to $ t_y$.

See the interaction() method for an usage example.

This function is also useful in the vpServo class to indicate that a subset of the visual feature is to use in the control law:

See also
selectTx(), selectTz()

Definition at line 728 of file vpFeatureTranslation.cpp.

References vpBasicFeature::FEATURE_LINE.

Referenced by error(), interaction(), and print().

unsigned int vpFeatureTranslation::selectTz ( )
static

Function used to select the $ t_z$ subset of the translation visual feature.

This function is to use in conjunction with interaction() in order to compute the interaction matrix associated to $ t_z$.

See the interaction() method for an usage example.

This function is also useful in the vpServo class to indicate that a subset of the visual feature is to use in the control law:

See also
selectTx(), selectTy()

Definition at line 773 of file vpFeatureTranslation.cpp.

References vpBasicFeature::FEATURE_LINE.

Referenced by error(), interaction(), and print().

void vpFeatureTranslation::set_Tx ( const double  t_x)

Initialise the $t_x $ subset value of the 3D visual feature $ s$.

Parameters
t_x: $t_x $ subset value to initialize.
See also
get_Tx()

Definition at line 164 of file vpFeatureTranslation.cpp.

References vpBasicFeature::s.

void vpFeatureTranslation::set_Ty ( const double  t_y)

Initialise the $t_y $ subset value of the 3D visual feature $ s$.

Parameters
t_y: $t_y $ subset value to initialize.
See also
get_Ty()

Definition at line 174 of file vpFeatureTranslation.cpp.

References vpBasicFeature::s.

void vpFeatureTranslation::set_Tz ( const double  t_z)

Initialise the $t_z $ subset value of the 3D visual feature $ s$.

Parameters
t_z: $t_z $ subset value to initialize.
See also
get_Tz()

Definition at line 184 of file vpFeatureTranslation.cpp.

References vpBasicFeature::s.

void vpBasicFeature::setDeallocate ( vpBasicFeatureDeallocatorType  d)
inlineinherited

Definition at line 137 of file vpBasicFeature.h.

Referenced by vpServo::addFeature().

void vpFeatureTranslation::setFeatureTranslationType ( const vpFeatureTranslationRepresentationType  r)

Set the type of translation feature.

Parameters
r: type of translation feature. It can be vpFeatureTranslation::cdMc, vpFeatureTranslation::cMcd or vpFeatureTranslation::cMo.
See also
getFeatureTranslationType()

Definition at line 150 of file vpFeatureTranslation.cpp.

void vpBasicFeature::setFlags ( )
inherited

Set feature flags to true to prevent warning when re-computing the interaction matrix without having updated the feature.

Definition at line 141 of file vpBasicFeature.cpp.

References vpBasicFeature::flags, and vpBasicFeature::nbParameters.

Member Data Documentation

const unsigned int vpBasicFeature::FEATURE_LINE
staticinherited
Initial value:
= {
(unsigned int)(1 << 0), (unsigned int)(1 << 1), (unsigned int)(1 << 2), (unsigned int)(1 << 3),
(unsigned int)(1 << 4), (unsigned int)(1 << 5), (unsigned int)(1 << 6), (unsigned int)(1 << 7),
(unsigned int)(1 << 8), (unsigned int)(1 << 9), (unsigned int)(1 << 10), (unsigned int)(1 << 11),
(unsigned int)(1 << 12), (unsigned int)(1 << 13), (unsigned int)(1 << 14), (unsigned int)(1 << 15),
(unsigned int)(1 << 16), (unsigned int)(1 << 17), (unsigned int)(1 << 18), (unsigned int)(1 << 19),
(unsigned int)(1 << 20), (unsigned int)(1 << 21), (unsigned int)(1 << 22), (unsigned int)(1 << 23),
(unsigned int)(1 << 24), (unsigned int)(1 << 25), (unsigned int)(1 << 26), (unsigned int)(1 << 27),
(unsigned int)(1 << 28), (unsigned int)(1 << 29), (unsigned int)(1 << 30), (unsigned int)(1 << 31)}

Definition at line 80 of file vpBasicFeature.h.

Referenced by vpBasicFeature::error(), vpGenericFeature::error(), vpBasicFeature::get_s(), vpBasicFeature::getDimension(), vpFeatureMoment::getDimension(), vpGenericFeature::interaction(), vpFeatureMoment::interaction(), vpGenericFeature::print(), vpFeatureMoment::print(), vpFeatureSegment::selectAlpha(), vpFeatureSegment::selectL(), vpFeatureEllipse::selectMu02(), vpFeatureEllipse::selectMu11(), vpFeatureEllipse::selectMu20(), vpFeatureLine::selectRho(), vpFeaturePointPolar::selectRho(), vpFeatureLine::selectTheta(), vpFeaturePointPolar::selectTheta(), vpFeatureThetaU::selectTUx(), vpFeatureThetaU::selectTUy(), vpFeatureThetaU::selectTUz(), selectTx(), selectTy(), selectTz(), vpFeatureVanishingPoint::selectX(), vpFeatureEllipse::selectX(), vpFeaturePoint::selectX(), vpFeaturePoint3D::selectX(), vpFeatureSegment::selectXc(), vpFeatureVanishingPoint::selectY(), vpFeatureEllipse::selectY(), vpFeaturePoint::selectY(), vpFeaturePoint3D::selectY(), vpFeatureSegment::selectYc(), and vpFeaturePoint3D::selectZ().

bool* vpBasicFeature::flags
protectedinherited

Ensure that all the parameters needed to compute the iteraction matrix are set.

Definition at line 98 of file vpBasicFeature.h.

Referenced by vpFeatureEllipse::buildFrom(), vpFeatureVanishingPoint::buildFrom(), vpFeatureDepth::buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureLine::buildFrom(), vpFeaturePoint3D::buildFrom(), vpFeatureThetaU::buildFrom(), vpFeaturePointPolar::buildFrom(), buildFrom(), vpFeatureMoment::duplicate(), vpFeatureVanishingPoint::init(), vpFeatureEllipse::init(), vpFeatureLuminance::init(), vpFeatureSegment::init(), vpFeatureDepth::init(), vpFeaturePoint::init(), vpFeatureMoment::init(), vpFeatureLine::init(), vpFeaturePoint3D::init(), vpFeatureThetaU::init(), vpFeaturePointPolar::init(), init(), vpFeatureVanishingPoint::interaction(), vpFeatureEllipse::interaction(), vpFeatureSegment::interaction(), vpFeatureDepth::interaction(), vpFeaturePoint::interaction(), vpFeatureLine::interaction(), vpFeaturePoint3D::interaction(), vpFeatureThetaU::interaction(), vpFeaturePointPolar::interaction(), interaction(), vpBasicFeature::operator=(), vpBasicFeature::resetFlags(), vpFeaturePointPolar::set_rho(), vpFeaturePointPolar::set_rhoThetaZ(), vpFeaturePointPolar::set_theta(), vpFeatureThetaU::set_TUx(), vpFeatureThetaU::set_TUy(), vpFeatureThetaU::set_TUz(), vpFeatureVanishingPoint::set_x(), vpFeatureEllipse::set_x(), vpFeatureDepth::set_x(), vpFeaturePoint::set_x(), vpFeaturePoint3D::set_X(), vpFeatureEllipse::set_xy(), vpFeaturePoint::set_xyZ(), vpFeaturePoint3D::set_XYZ(), vpFeatureDepth::set_xyZLogZoverZstar(), vpFeatureEllipse::set_y(), vpFeatureVanishingPoint::set_y(), vpFeatureDepth::set_y(), vpFeaturePoint::set_y(), vpFeaturePoint3D::set_Y(), vpFeatureLuminance::set_Z(), vpFeatureDepth::set_Z(), vpFeaturePoint::set_Z(), vpFeaturePoint3D::set_Z(), vpFeaturePointPolar::set_Z(), vpFeatureEllipse::setABC(), vpFeatureLine::setABCD(), vpBasicFeature::setFlags(), vpFeatureEllipse::setMu(), vpFeatureLine::setRhoTheta(), vpFeatureMoment::update(), vpFeatureLuminance::vpFeatureLuminance(), and vpBasicFeature::~vpBasicFeature().

vpColVector vpBasicFeature::s
protectedinherited

State of the visual feature.

Definition at line 92 of file vpBasicFeature.h.

Referenced by vpFeatureEllipse::buildFrom(), vpFeatureVanishingPoint::buildFrom(), vpFeatureLuminance::buildFrom(), vpFeatureDepth::buildFrom(), vpFeaturePoint::buildFrom(), vpFeatureLine::buildFrom(), vpFeaturePoint3D::buildFrom(), vpFeatureThetaU::buildFrom(), vpFeaturePointPolar::buildFrom(), buildFrom(), vpFeatureEllipse::display(), vpFeatureMoment::duplicate(), vpFeatureVanishingPoint::error(), vpFeatureEllipse::error(), vpFeatureLuminance::error(), vpBasicFeature::error(), vpFeatureDepth::error(), vpFeatureMomentAlpha::error(), vpGenericFeature::error(), vpFeaturePoint::error(), vpFeatureLine::error(), vpFeaturePoint3D::error(), vpFeatureThetaU::error(), vpFeaturePointPolar::error(), error(), vpFeatureDepth::get_LogZoverZstar(), vpFeaturePointPolar::get_rho(), vpBasicFeature::get_s(), vpGenericFeature::get_s(), vpFeaturePointPolar::get_theta(), vpFeatureThetaU::get_TUx(), vpFeatureThetaU::get_TUy(), vpFeatureThetaU::get_TUz(), get_Tx(), get_Ty(), get_Tz(), vpFeatureVanishingPoint::get_x(), vpFeaturePoint::get_x(), vpFeaturePoint3D::get_X(), vpFeatureVanishingPoint::get_y(), vpFeaturePoint::get_y(), vpFeaturePoint3D::get_Y(), vpFeaturePoint3D::get_Z(), vpBasicFeature::getDimension(), vpFeatureVanishingPoint::init(), vpFeatureEllipse::init(), vpFeatureLuminance::init(), vpFeatureSegment::init(), vpFeatureDepth::init(), vpGenericFeature::init(), vpFeaturePoint::init(), vpFeatureMoment::init(), vpFeatureLine::init(), vpFeaturePoint3D::init(), vpFeatureThetaU::init(), vpFeaturePointPolar::init(), init(), vpFeatureEllipse::interaction(), vpFeatureLine::interaction(), vpFeatureThetaU::interaction(), interaction(), vpBasicFeature::operator=(), vpFeatureEllipse::print(), vpFeatureSegment::print(), vpGenericFeature::print(), vpFeatureMoment::print(), vpFeatureLine::print(), vpFeatureThetaU::print(), print(), vpFeatureDepth::set_LogZoverZstar(), vpFeaturePointPolar::set_rho(), vpGenericFeature::set_s(), vpFeaturePointPolar::set_theta(), vpFeatureThetaU::set_TUx(), vpFeatureThetaU::set_TUy(), vpFeatureThetaU::set_TUz(), set_Tx(), set_Ty(), set_Tz(), vpFeatureVanishingPoint::set_x(), vpFeatureEllipse::set_x(), vpFeaturePoint::set_x(), vpFeaturePoint3D::set_X(), vpFeatureEllipse::set_xy(), vpFeatureEllipse::set_y(), vpFeatureVanishingPoint::set_y(), vpFeaturePoint::set_y(), vpFeaturePoint3D::set_Y(), vpFeaturePoint3D::set_Z(), vpFeatureEllipse::setMu(), vpFeatureLine::setRhoTheta(), vpFeatureMoment::update(), and vpGenericFeature::vpGenericFeature().