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);
79 :
vpMoment(), desiredSurface(a_star), desiredDepth(Z_star)
89 os << (__FILE__) << std::endl;
90 os <<
"An = " << m.
values[0] << std::endl;
104 os << (__FILE__) << std::endl;
105 os <<
"Desired depth Z* = " << desiredDepth << std::endl;
106 os <<
"Desired area m00* = " << desiredSurface << std::endl;
108 bool found_moment_centered;
111 if (!found_moment_centered)
116 a = momentCentered.
get(2, 0) + momentCentered.
get(0, 2);
119 os <<
"a = " << a << std::endl;
Class handling the normalized surface moment that is invariant in scale and used to estimate depth...
friend VISP_EXPORT std::ostream & operator<<(std::ostream &os, const vpMomentAreaNormalized &v)
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
Used to indicate that a parameter is not initialized.
const vpMomentObject & getObject() const
vpMomentAreaNormalized(double a_star, double Z_star)
std::vector< double > values