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;
60 if (!found_moment_centered)
67 a = momentCentered.
get(2, 0) + momentCentered.
get(0, 2);
71 values[0] = desiredDepth * sqrt(desiredSurface / a);
80 :
vpMoment(), desiredSurface(a_star), desiredDepth(Z_star)
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;
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)
error that can be emitted by ViSP classes.
@ notInitialized
Used to indicate that a parameter is not initialized.
Class handling the normalized surface moment that is invariant in scale and used to estimate depth.
void printDependencies(std::ostream &os) const
vpMomentAreaNormalized(double a_star, double Z_star)
This class defines the double-indexed centered moment descriptor .
double get(unsigned int i, unsigned int j) const
const vpMoment & get(const std::string &moment_name, bool &found) const
const std::vector< double > & get() const
This class defines shared methods/attributes for 2D moments.
std::vector< double > values
const vpMomentObject & getObject() const
vpMomentDatabase & getMoments() const