39#include <visp3/visual_features/vpBasicFeature.h>
40#include <visp3/visual_features/vpFeatureTranslation.h>
42#include <visp3/core/vpMath.h>
45#include <visp3/core/vpException.h>
46#include <visp3/visual_features/vpFeatureException.h>
49#include <visp3/core/vpDebug.h>
111 : f2Mf1(), translation(r)
129 this->f2Mf1 = f2Mf1_;
307 if (
flags[i] ==
false) {
310 vpTRACE(
"Warning !!! The interaction matrix is computed but f2Mf1 "
314 vpTRACE(
"Problem during the reading of the variable flags");
321 if (translation ==
cdMc) {
326 for (
int i = 0; i < 3; i++)
327 Lx[0][i] = f2Mf1[0][i];
338 for (
int i = 0; i < 3; i++)
339 Ly[0][i] = f2Mf1[1][i];
350 for (
int i = 0; i < 3; i++)
351 Lz[0][i] = f2Mf1[2][i];
359 if (translation ==
cMcd) {
398 if (translation ==
cMo) {
510 if (translation ==
cdMc || translation ==
cMcd) {
519 ex[0] =
s[0] - s_star[0];
525 ey[0] =
s[1] - s_star[1];
531 ez[0] =
s[2] - s_star[2];
563 std::cout <<
"Translation 3D:";
565 std::cout <<
" tx=" <<
s[0];
568 std::cout <<
" ty=" <<
s[1];
571 std::cout <<
" tz=" <<
s[2];
573 std::cout << std::endl;
592 if (translation ==
cdMc)
594 if (translation ==
cMo)
596 if (translation ==
cMcd)
607 const vpColor & ,
unsigned int )
const
609 static int firsttime = 0;
611 if (firsttime == 0) {
624 const vpColor & ,
unsigned int )
const
626 static int firsttime = 0;
628 if (firsttime == 0) {
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify=true, bool recopy_=true)
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.
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.
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.
Definition of the vpImage class member functions.
Implementation of a matrix and operations on matrices.
void stack(const vpMatrix &A)