42 #include <visp/vpMomentCommon.h>
43 #include <visp/vpMomentObject.h>
58 momentGravityNormalized(),
59 momentSurfaceNormalized(dstSurface,dstZ),
61 momentAlpha(ref,refAlpha),
67 momentGravity.
linkTo(*
this);
68 momentCentered.
linkTo(*
this);
69 momentGravityNormalized.
linkTo(*
this);
70 momentSurfaceNormalized.
linkTo(*
this);
71 momentCInvariant->
linkTo(*
this);
138 momentSurfaceNormalized.
compute();
139 momentGravityNormalized.
compute();
142 }
catch(
const char* ex){
143 std::cout <<
"exception:" << ex <<std::endl;
165 a = momentCentered.
get(2,0)+momentCentered.
get(0,2);
188 return momentAlpha.
get();
206 std::vector<double> mu(4);
208 for (
unsigned int j=0; j<4; j++) {
209 for (
unsigned int i=0; i<4; i++) {
211 mu[idx] = momentCentered.
get(i,j);
220 if (momentCInvariant)
221 delete momentCInvariant;
vpMomentCommon(double dstSurface, std::vector< double > ref, double refAlpha, double dstZ=1.0, bool flg_sxsyfromnormalized=false)
void linkTo(vpMomentDatabase &moments)
Class for generic objects.
This class allows to register all vpMoments so they can access each other according to their dependen...
static std::vector< double > getMu3(vpMomentObject &object)
virtual void updateAll(vpMomentObject &object)
This class defines the double-indexed centered moment descriptor .
This class defines the orientation of the object inside the plane parallel to the object...
double get(unsigned int i, unsigned int j) const
static double getSurface(vpMomentObject &object)
Class describing 2D gravity center moment.
void updateAll(vpMomentObject &object)
static double getAlpha(vpMomentObject &object)