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)
120 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
148 this->f2Mf1 = f2Mf1_;
326 if (
flags[i] ==
false) {
329 vpTRACE(
"Warning !!! The interaction matrix is computed but f2Mf1 "
333 vpTRACE(
"Problem during the reading of the variable flags");
340 if (translation ==
cdMc) {
345 for (
int i = 0; i < 3; i++)
346 Lx[0][i] = f2Mf1[0][i];
357 for (
int i = 0; i < 3; i++)
358 Ly[0][i] = f2Mf1[1][i];
369 for (
int i = 0; i < 3; i++)
370 Lz[0][i] = f2Mf1[2][i];
378 if (translation ==
cMcd) {
417 if (translation ==
cMo) {
529 if (translation ==
cdMc || translation ==
cMcd) {
538 ex[0] =
s[0] - s_star[0];
544 ey[0] =
s[1] - s_star[1];
550 ez[0] =
s[2] - s_star[2];
582 std::cout <<
"Translation 3D:";
584 std::cout <<
" tx=" <<
s[0];
587 std::cout <<
" ty=" <<
s[1];
590 std::cout <<
" tz=" <<
s[2];
592 std::cout << std::endl;
611 if (translation ==
cdMc)
613 if (translation ==
cMo)
615 if (translation ==
cMcd)
626 const vpColor & ,
unsigned int )
const
628 static int firsttime = 0;
630 if (firsttime == 0) {
643 const vpColor & ,
unsigned int )
const
645 static int firsttime = 0;
647 if (firsttime == 0) {
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 buildFrom(const vpHomogeneousMatrix &f2Mf1)
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
vpFeatureTranslation & build(const vpHomogeneousMatrix &f2Mf1)
vpMatrix interaction(unsigned int select=FEATURE_ALL) VP_OVERRIDE
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)