36 #include <visp3/visual_features/vpBasicFeature.h>
37 #include <visp3/visual_features/vpFeatureTranslation.h>
39 #include <visp3/core/vpMath.h>
42 #include <visp3/core/vpException.h>
43 #include <visp3/visual_features/vpFeatureException.h>
46 #include <visp3/core/vpDebug.h>
111 : f2Mf1(), translation(r)
129 this->f2Mf1 = f2Mf1_;
306 if (
flags[i] ==
false) {
309 vpTRACE(
"Warning !!! The interaction matrix is computed but f2Mf1 "
313 vpTRACE(
"Problem during the reading of the variable flags");
320 if (translation ==
cdMc) {
325 for (
int i = 0; i < 3; i++)
326 Lx[0][i] = f2Mf1[0][i];
337 for (
int i = 0; i < 3; i++)
338 Ly[0][i] = f2Mf1[1][i];
349 for (
int i = 0; i < 3; i++)
350 Lz[0][i] = f2Mf1[2][i];
358 if (translation ==
cMcd) {
397 if (translation ==
cMo) {
509 if (translation ==
cdMc || translation ==
cMcd) {
518 ex[0] =
s[0] - s_star[0];
524 ey[0] =
s[1] - s_star[1];
530 ez[0] =
s[2] - s_star[2];
562 std::cout <<
"Translation 3D:";
564 std::cout <<
" tx=" <<
s[0];
567 std::cout <<
" ty=" <<
s[1];
570 std::cout <<
" tz=" <<
s[2];
572 std::cout << std::endl;
591 if (translation ==
cdMc)
593 if (translation ==
cMo)
595 if (translation ==
cMcd)
606 const vpColor & ,
unsigned int )
const
608 static int firsttime = 0;
610 if (firsttime == 0) {
623 const vpColor & ,
unsigned int )
const
625 static int firsttime = 0;
627 if (firsttime == 0) {
class that defines what is a visual feature
vpColVector s
State of the visual feature.
static const unsigned int FEATURE_LINE[32]
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.
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 display(const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const override
void buildFrom(const vpHomogeneousMatrix &f2Mf1)
vpFeatureTranslation * duplicate() const override
Feature duplication.
void setFeatureTranslationType(const vpFeatureTranslationRepresentationType r)
vpMatrix interaction(unsigned int select=FEATURE_ALL) override
void print(unsigned int select=FEATURE_ALL) const override
static unsigned int selectTx()
vpFeatureTranslationRepresentationType getFeatureTranslationType() const
static unsigned int selectTy()
vpFeatureTranslationRepresentationType
vpColVector error(const vpBasicFeature &s_star, unsigned int select=FEATURE_ALL) override
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)