41 #include <visp/vpConfig.h>
43 #ifdef VISP_MOMENTS_COMBINE_MATRICES
47 #include <visp/vpMomentObject.h>
48 #include <visp/vpFeatureMomentAreaNormalized.h>
49 #include <visp/vpFeatureMomentBasic.h>
50 #include <visp/vpMomentCentered.h>
51 #include <visp/vpMomentAreaNormalized.h>
52 #include <visp/vpFeatureMomentCentered.h>
53 #include <visp/vpFeatureMomentDatabase.h>
66 bool found_moment_centered;
67 bool found_moment_surface_normalized;
68 bool found_FeatureMoment_centered;
70 bool found_featuremoment_basic;
86 double normalized_multiplier;
90 a = momentCentered.
get(2,0)+momentCentered.
get(0,2);
93 a = momentObject.
get(0,0);
107 #include <visp/vpMomentObject.h>
108 #include <visp/vpMomentAreaNormalized.h>
109 #include <visp/vpMomentCentered.h>
110 #include <visp/vpMomentCentered.h>
111 #include <visp/vpMomentGravityCenter.h>
112 #include <visp/vpFeatureMomentDatabase.h>
113 #include <visp/vpFeatureMomentAreaNormalized.h>
124 bool found_moment_centered;
125 bool found_moment_surface_normalized;
126 bool found_moment_gravity;
138 double n11 = momentCentered.
get(1,1)/momentObject.
get(0,0);
139 double n20 = momentCentered.
get(2,0)/momentObject.
get(0,0);
140 double n02 = momentCentered.
get(0,2)/momentObject.
get(0,0);
141 double Xg = momentGravity.
getXg();
142 double Yg = momentGravity.
getYg();
144 double An=momentSurfaceNormalized.
get()[0];
149 double Anvx,Anvy,Anvz,Anwx,Anwy;
152 double a = momentCentered.
get(2,0)+momentCentered.
get(0,2);
154 double e01 = momentCentered.
get(0,1)/a;
155 double e10 = momentCentered.
get(1,0)/a;
156 double e11 = momentCentered.
get(1,1)/a;
157 double e02 = momentCentered.
get(0,2)/a;
158 double e20 = momentCentered.
get(2,0)/a;
159 double e12 = momentCentered.
get(1,2)/a;
160 double e21 = momentCentered.
get(2,1)/a;
161 double e03 = momentCentered.
get(0,3)/a;
162 double e30 = momentCentered.
get(3,0)/a;
164 Anvx = An*
A*e20+An*
B*e11;
165 Anvy = An*
A*e11+An*
B*e02;
167 Anwx = (n02*e01+n11*e10-e03-e21)*An-Xn*e11+(-1-e02)*Yn;
168 Anwy = (e12+e30-n11*e01-n20*e10)*An+(2-e02)*Xn+Yn*e11;
170 Anvz = -An*
C+
B*Anwx-
A*Anwy;
175 Anvz = -An*
C-(3./2.)*
A*Xn-(3./2.)*
B*Yn;
Functionality computation for basic moment feature. Computes the interaction matrix associated with v...
Definition of the vpMatrix class.
Class handling the normalized surface moment that is invariant in scale and used to estimate depth...
vpMomentObject & getObject() const
Functionality computation for centered moment feature. Computes the interaction matrix associated wit...
double get(unsigned int i, unsigned int j)
error that can be emited by ViSP classes.
Class for generic objects.
std::vector< vpMatrix > interaction_matrices
vpMoment & get(const char *type, bool &found)
std::vector< double > & get()
vpMomentDatabase & moments
This class defines the double-indexed centered moment descriptor .
Class describing 2D gravity center moment.
vpObjectType getType() const
vpMatrix interaction(unsigned int select_one, unsigned int select_two)
std::vector< double > & get()
double getDesiredSurface()
void compute_interaction()
vpMatrix interaction(unsigned int select_one, unsigned int select_two)
vpFeatureMoment & get(const char *type, bool &found)