40 #include <visp3/core/vpMomentAreaNormalized.h> 41 #include <visp3/core/vpMomentGravityCenter.h> 42 #include <visp3/core/vpMomentGravityCenterNormalized.h> 43 #include <visp3/core/vpMomentObject.h> 51 bool found_moment_gravity;
52 bool found_moment_surface_normalized;
55 getMoments().
get(
"vpMomentAreaNormalized", found_moment_surface_normalized));
59 if (!found_moment_surface_normalized)
61 if (!found_moment_gravity)
64 double Xn = momentGravity.
get()[0] * momentSurfaceNormalized.
get()[0];
65 double Yn = momentGravity.
get()[1] * momentSurfaceNormalized.
get()[0];
81 os << (__FILE__) << std::endl;
82 os <<
"(Xn,Yn) = (" << m.
values[0] <<
", " << m.
values[1] <<
")" << std::endl;
93 os << (__FILE__) << std::endl;
94 bool found_moment_gravity;
95 bool found_moment_surface_normalized;
98 getMoments().
get(
"vpMomentAreaNormalized", found_moment_surface_normalized));
102 if (!found_moment_surface_normalized)
104 if (!found_moment_gravity)
106 os <<
"Xg = " << momentGravity.
get()[0] <<
"\t" 107 <<
"Yg = " << momentGravity.
get()[1] << std::endl;
108 os <<
"An = " << momentSurfaceNormalized.
get()[0] << std::endl;
Class handling the normalized surface moment that is invariant in scale and used to estimate depth...
const std::vector< double > & get() const
Class describing 2D normalized gravity center moment.
error that can be emited by ViSP classes.
friend VISP_EXPORT std::ostream & operator<<(std::ostream &os, const vpMomentGravityCenterNormalized &v)
const vpMoment & get(const char *type, bool &found) const
Class describing 2D gravity center moment.
vpMomentDatabase & getMoments() const
const std::vector< double > & get() const
void printDependencies(std::ostream &os) const
Used to indicate that a parameter is not initialized.
vpMomentGravityCenterNormalized()
std::vector< double > values