37 #include <visp3/core/vpMomentAreaNormalized.h>
38 #include <visp3/core/vpMomentObject.h>
39 #include <visp3/core/vpMomentCentered.h>
40 #include <visp3/core/vpMomentDatabase.h>
49 bool found_moment_centered;
61 a = momentCentered.
get(2,0)+momentCentered.
get(0,2);
65 values[0] = desiredDepth*sqrt(desiredSurface/a);
74 :
vpMoment(),desiredSurface(desired_surface),desiredDepth(desired_depth)
83 os << (__FILE__) << std::endl;
84 os <<
"An = " << m.
values[0] << std::endl ;
97 os << (__FILE__) << std::endl;
98 os <<
"Desired depth Z* = " << desiredDepth << std::endl;
99 os <<
"Desired area m00* = " << desiredSurface << std::endl;
101 bool found_moment_centered;
103 if(!found_moment_centered)
108 a = momentCentered.
get(2,0)+momentCentered.
get(0,2);
111 os <<
"a = " << a << std::endl;
Class handling the normalized surface moment that is invariant in scale and used to estimate depth...
vpMomentAreaNormalized(double desiredSurface, double desiredDepth)
error that can be emited by ViSP classes.
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 .
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)
double get(unsigned int i, unsigned int j) const
vpMomentDatabase & getMoments() const
void printDependencies(std::ostream &os) const
const vpMomentObject & getObject() const
std::vector< double > values