41 #include <visp3/visual_features/vpBasicFeature.h>
42 #include <visp3/visual_features/vpFeatureTranslation.h>
44 #include <visp3/core/vpMath.h>
47 #include <visp3/core/vpException.h>
48 #include <visp3/visual_features/vpFeatureException.h>
51 #include <visp3/core/vpDebug.h>
113 : f2Mf1(), translation(r)
131 this->f2Mf1 = f2Mf1_;
309 if (
flags[i] ==
false) {
312 vpTRACE(
"Warning !!! The interaction matrix is computed but f2Mf1 "
316 vpTRACE(
"Problem during the reading of the variable flags");
323 if (translation ==
cdMc) {
328 for (
int i = 0; i < 3; i++)
329 Lx[0][i] = f2Mf1[0][i];
340 for (
int i = 0; i < 3; i++)
341 Ly[0][i] = f2Mf1[1][i];
352 for (
int i = 0; i < 3; i++)
353 Lz[0][i] = f2Mf1[2][i];
361 if (translation ==
cMcd) {
400 if (translation ==
cMo) {
512 if (translation ==
cdMc || translation ==
cMcd) {
514 vpERROR_TRACE(
"s* should be zero ! ");
521 ex[0] =
s[0] - s_star[0];
527 ey[0] =
s[1] - s_star[1];
533 ez[0] =
s[2] - s_star[2];
565 std::cout <<
"Translation 3D:";
567 std::cout <<
" tx=" <<
s[0];
570 std::cout <<
" ty=" <<
s[1];
573 std::cout <<
" tz=" <<
s[2];
575 std::cout << std::endl;
594 if (translation ==
cdMc)
596 if (translation ==
cMo)
598 if (translation ==
cMcd)
609 const vpColor & ,
unsigned int )
const
611 static int firsttime = 0;
613 if (firsttime == 0) {
615 vpERROR_TRACE(
"not implemented");
626 const vpColor & ,
unsigned int )
const
628 static int firsttime = 0;
630 if (firsttime == 0) {
632 vpERROR_TRACE(
"not implemented");
class that defines what is a visual feature
vpColVector s
State of the visual feature.
unsigned int nbParameters
Number of parameters needed to compute the interaction matrix.
vpColVector get_s(unsigned int select=FEATURE_ALL) const
Get the feature vector .
unsigned int dim_s
Dimension of the visual feature.
static const unsigned int FEATURE_LINE[32]
vpBasicFeatureDeallocatorType deallocate
Generic class defining intrinsic camera parameters.
Implementation of column vector and the associated operations.
void resize(unsigned int i, bool flagNullify=true)
Class to define RGB colors available for display functionalities.
Error that can be emitted by the vpBasicFeature class and its derivates.
@ badInitializationError
Wrong feature initialization.
Class that defines the translation visual feature .
static unsigned int selectTz()
void setFeatureTranslationType(const vpFeatureTranslationRepresentationType r)
vpColVector error(const vpBasicFeature &s_star, unsigned int select=FEATURE_ALL) VP_OVERRIDE
static unsigned int selectTx()
void print(unsigned int select=FEATURE_ALL) const VP_OVERRIDE
void display(const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const VP_OVERRIDE
vpFeatureTranslationRepresentationType getFeatureTranslationType() const
vpMatrix interaction(unsigned int select=FEATURE_ALL) VP_OVERRIDE
vpFeatureTranslation & buildFrom(const vpHomogeneousMatrix &f2Mf1)
vpFeatureTranslation * duplicate() const VP_OVERRIDE
Feature duplication.
static unsigned int selectTy()
vpFeatureTranslationRepresentationType
Implementation of an homogeneous matrix and operations on such kind of matrices.
Implementation of a matrix and operations on matrices.
void stack(const vpMatrix &A)