42 #include <visp/vpMomentCentered.h>
43 #include <visp/vpMomentObject.h>
44 #include <visp/vpMomentGravityCenter.h>
66 bool found_moment_gravity;
73 for(
register unsigned int j=0;j<(order);j++){
74 for(
register unsigned int i=0;i<order-j;i++){
75 unsigned int c = order*j+i;
77 for(
register unsigned int k=0;k<=i;k++){
78 double Xg_i_k = pow(-momentGravity.
get()[0],(int)(i-k));
79 double comb_i_k =
static_cast<double>(
vpMath::comb(i,k) );
80 for(
register unsigned int l=0;l<=j;l++){
109 return values[j*(order+1)+i];
128 for(
unsigned int i = 0;i<m.
values.size();i++){
vpMomentDatabase & getMoments()
error that can be emited by ViSP classes.
Class for generic objects.
const std::vector< double > & get() const
const std::vector< double > & get() const
This class defines shared methods/attributes for 2D moments.
const vpMoment & get(const char *type, bool &found) const
This class defines the double-indexed centered moment descriptor .
Class describing 2D gravity center moment.
const std::vector< double > & get() const
static long double comb(unsigned int n, unsigned int p)
const vpMomentObject & getObject() const
std::vector< double > values
void set(unsigned int i, unsigned int j, double value)
unsigned int getOrder() const