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;
84 double normalized_multiplier;
88 a = momentCentered.
get(2,0)+momentCentered.
get(0,2);
91 a = momentObject.
get(0,0);
105 #include <visp/vpMomentObject.h>
106 #include <visp/vpMomentAreaNormalized.h>
107 #include <visp/vpMomentCentered.h>
108 #include <visp/vpMomentCentered.h>
109 #include <visp/vpMomentGravityCenter.h>
110 #include <visp/vpFeatureMomentDatabase.h>
111 #include <visp/vpFeatureMomentAreaNormalized.h>
122 bool found_moment_centered;
123 bool found_moment_surface_normalized;
124 bool found_moment_gravity;
136 double n11 = momentCentered.
get(1,1)/momentObject.
get(0,0);
137 double n20 = momentCentered.
get(2,0)/momentObject.
get(0,0);
138 double n02 = momentCentered.
get(0,2)/momentObject.
get(0,0);
139 double Xg = momentGravity.
getXg();
140 double Yg = momentGravity.
getYg();
142 double An=momentSurfaceNormalized.
get()[0];
147 double Anvx,Anvy,Anvz,Anwx,Anwy;
150 double a = momentCentered.
get(2,0)+momentCentered.
get(0,2);
152 double e01 = momentCentered.
get(0,1)/a;
153 double e10 = momentCentered.
get(1,0)/a;
154 double e11 = momentCentered.
get(1,1)/a;
155 double e02 = momentCentered.
get(0,2)/a;
156 double e20 = momentCentered.
get(2,0)/a;
157 double e12 = momentCentered.
get(1,2)/a;
158 double e21 = momentCentered.
get(2,1)/a;
159 double e03 = momentCentered.
get(0,3)/a;
160 double e30 = momentCentered.
get(3,0)/a;
162 Anvx = An*
A*e20+An*
B*e11;
163 Anvy = An*
A*e11+An*
B*e02;
165 Anwx = (n02*e01+n11*e10-e03-e21)*An-Xn*e11+(-1-e02)*Yn;
166 Anwy = (e12+e30-n11*e01-n20*e10)*An+(2-e02)*Xn+Yn*e11;
168 Anvz = -An*
C+
B*Anwx-
A*Anwy;
173 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...
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)