37 #include <visp3/core/vpConfig.h>
39 #ifdef VISP_MOMENTS_COMBINE_MATRICES
43 #include <visp3/core/vpMomentObject.h>
44 #include <visp3/visual_features/vpFeatureMomentAreaNormalized.h>
45 #include <visp3/visual_features/vpFeatureMomentBasic.h>
46 #include <visp3/core/vpMomentCentered.h>
47 #include <visp3/core/vpMomentAreaNormalized.h>
48 #include <visp3/visual_features/vpFeatureMomentCentered.h>
49 #include <visp3/visual_features/vpFeatureMomentDatabase.h>
62 bool found_moment_centered;
63 bool found_moment_surface_normalized;
64 bool found_FeatureMoment_centered;
66 bool found_featuremoment_basic;
80 double normalized_multiplier;
84 a = momentCentered.
get(2,0)+momentCentered.
get(0,2);
87 a = momentObject.
get(0,0);
101 #include <visp3/core/vpMomentObject.h>
102 #include <visp3/core/vpMomentAreaNormalized.h>
103 #include <visp3/core/vpMomentCentered.h>
104 #include <visp3/core/vpMomentCentered.h>
105 #include <visp3/core/vpMomentGravityCenter.h>
106 #include <visp3/visual_features/vpFeatureMomentDatabase.h>
107 #include <visp3/visual_features/vpFeatureMomentAreaNormalized.h>
118 bool found_moment_centered;
119 bool found_moment_surface_normalized;
120 bool found_moment_gravity;
132 double n11 = momentCentered.
get(1,1)/momentObject.
get(0,0);
133 double n20 = momentCentered.
get(2,0)/momentObject.
get(0,0);
134 double n02 = momentCentered.
get(0,2)/momentObject.
get(0,0);
135 double Xg = momentGravity.
getXg();
136 double Yg = momentGravity.
getYg();
138 double An=momentSurfaceNormalized.
get()[0];
143 double Anvx,Anvy,Anvz,Anwx,Anwy;
146 double a = momentCentered.
get(2,0)+momentCentered.
get(0,2);
148 double e01 = momentCentered.
get(0,1)/a;
149 double e10 = momentCentered.
get(1,0)/a;
150 double e11 = momentCentered.
get(1,1)/a;
151 double e02 = momentCentered.
get(0,2)/a;
152 double e20 = momentCentered.
get(2,0)/a;
153 double e12 = momentCentered.
get(1,2)/a;
154 double e21 = momentCentered.
get(2,1)/a;
155 double e03 = momentCentered.
get(0,3)/a;
156 double e30 = momentCentered.
get(3,0)/a;
158 Anvx = An*
A*e20+An*
B*e11;
159 Anvy = An*
A*e11+An*
B*e02;
161 Anwx = (n02*e01+n11*e10-e03-e21)*An-Xn*e11+(-1-e02)*Yn;
162 Anwy = (e12+e30-n11*e01-n20*e10)*An+(2-e02)*Xn+Yn*e11;
164 Anvz = -An*
C+
B*Anwx-
A*Anwy;
169 Anvz = -An*
C-(3./2.)*
A*Xn-(3./2.)*
B*Yn;
Functionality computation for basic moment feature. Computes the interaction matrix associated with v...
Implementation of a matrix and operations on matrices.
Class handling the normalized surface moment that is invariant in scale and used to estimate depth...
const std::vector< double > & get() const
Functionality computation for centered moment feature. Computes the interaction matrix associated wit...
error that can be emited by ViSP classes.
Class for generic objects.
const std::vector< double > & get() const
std::vector< vpMatrix > interaction_matrices
vpMatrix interaction(unsigned int select_one, unsigned int select_two) const
vpMatrix interaction(unsigned int select_one, unsigned int select_two) const
const vpMoment & get(const char *type, bool &found) const
vpMomentDatabase & moments
This class defines the double-indexed centered moment descriptor .
double get(unsigned int i, unsigned int j) const
Class describing 2D gravity center moment.
vpObjectType getType() const
vpFeatureMomentDatabase * featureMomentsDataBase
const vpMomentObject & getObject() const
void compute_interaction()
double getDesiredDepth() const
double getDesiredSurface() const
vpFeatureMoment & get(const char *type, bool &found)