39 #include <visp3/core/vpMomentAreaNormalized.h>
40 #include <visp3/core/vpMomentCentered.h>
41 #include <visp3/core/vpMomentDatabase.h>
42 #include <visp3/core/vpMomentObject.h>
52 bool found_moment_centered;
62 if (!found_moment_centered)
69 a = momentCentered.
get(2, 0) + momentCentered.
get(0, 2);
73 values[0] = desiredDepth * sqrt(desiredSurface / a);
82 :
vpMoment(), desiredSurface(a_star), desiredDepth(Z_star)
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;
104 if (!found_moment_centered)
109 a = momentCentered.
get(2, 0) + momentCentered.
get(0, 2);
112 os <<
"a = " << a << std::endl;
120 os << (__FILE__) << std::endl;
121 os <<
"An = " << m.
values[0] << 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