39 #include <visp3/core/vpMomentAreaNormalized.h> 40 #include <visp3/core/vpMomentCentered.h> 41 #include <visp3/core/vpMomentDatabase.h> 42 #include <visp3/core/vpMomentObject.h> 50 bool found_moment_centered;
59 if (!found_moment_centered)
66 a = momentCentered.
get(2, 0) + momentCentered.
get(0, 2);
70 values[0] = desiredDepth * sqrt(desiredSurface / a);
80 :
vpMoment(), desiredSurface(desired_surface), desiredDepth(desired_depth)
90 os << (__FILE__) << std::endl;
91 os <<
"An = " << m.
values[0] << std::endl;
105 os << (__FILE__) << std::endl;
106 os <<
"Desired depth Z* = " << desiredDepth << std::endl;
107 os <<
"Desired area m00* = " << desiredSurface << std::endl;
109 bool found_moment_centered;
112 if (!found_moment_centered)
117 a = momentCentered.
get(2, 0) + momentCentered.
get(0, 2);
120 os <<
"a = " << a << std::endl;
Class handling the normalized surface moment that is invariant in scale and used to estimate depth...
double get(unsigned int i, unsigned int j) const
friend VISP_EXPORT std::ostream & operator<<(std::ostream &os, const vpMomentAreaNormalized &v)
const vpMoment & get(const char *type, bool &found) const
vpMomentAreaNormalized(double desiredSurface, double desiredDepth)
error that can be emited by ViSP classes.
const vpMomentObject & getObject() const
This class defines shared methods/attributes for 2D moments.
const std::vector< double > & get() const
This class defines the double-indexed centered moment descriptor .
void printDependencies(std::ostream &os) const
vpMomentDatabase & getMoments() const
std::vector< double > values