41 #include <visp/vpMomentAreaNormalized.h>
42 #include <visp/vpMomentObject.h>
43 #include <visp/vpMomentCentered.h>
44 #include <visp/vpMomentDatabase.h>
53 bool found_moment_centered;
65 a = momentCentered.
get(2,0)+momentCentered.
get(0,2);
69 values[0] = desiredDepth*sqrt(desiredSurface/a);
78 :
vpMoment(),desiredSurface(desired_surface),desiredDepth(desired_depth)
87 os << (__FILE__) << std::endl;
88 os <<
"An = " << m.
values[0] << std::endl ;
101 os << (__FILE__) << std::endl;
102 os <<
"Desired depth Z* = " << desiredDepth << std::endl;
103 os <<
"Desired area m00* = " << desiredSurface << std::endl;
105 bool found_moment_centered;
107 if(!found_moment_centered)
112 a = momentCentered.
get(2,0)+momentCentered.
get(0,2);
115 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 .
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