ViSP
2.8.0
|
#include <vpMomentGravityCenter.h>
Public Member Functions | |
vpMomentGravityCenter () | |
void | compute () |
std::vector< double > & | get () |
double | getXg () const |
double | getYg () const |
const char * | name () |
vpMomentObject & | getObject () const |
void | linkTo (vpMomentDatabase &moments) |
void | update (vpMomentObject &object) |
Protected Member Functions | |
vpMomentDatabase & | getMoments () |
Protected Attributes | |
std::vector< double > | values |
Friends | |
VISP_EXPORT std::ostream & | operator<< (std::ostream &os, const vpMomentGravityCenter &v) |
Class describing 2D gravity center moment.
This moment can be computed from scratch (no need to compute any different moments before computing this). It gives access to both coordinates of the gravity center and .
These coordinates are defined as follows: ,
This example produces the following results:
Definition at line 113 of file vpMomentGravityCenter.h.
vpMomentGravityCenter::vpMomentGravityCenter | ( | ) |
Default constructor.
Definition at line 55 of file vpMomentGravityCenter.cpp.
References vpMoment::values.
|
virtual |
Computes the two gravity center coordinates commonly called and .
Implements vpMoment.
Reimplemented in vpMomentGravityCenterNormalized.
Definition at line 47 of file vpMomentGravityCenter.cpp.
References vpMomentObject::get(), vpMoment::getObject(), and vpMoment::values.
Referenced by vpMomentCommon::getAlpha(), vpMomentCommon::getMu3(), vpMomentCommon::getSurface(), and vpMomentCommon::updateAll().
std::vector< double > & vpMomentGravityCenter::get | ( | ) |
Returns a vector of the two gravity center coordinates.
Definition at line 63 of file vpMomentGravityCenter.cpp.
References vpMoment::values.
Referenced by vpMomentGravityCenterNormalized::compute(), and vpMomentCentered::compute().
|
inlineprotectedinherited |
Returns the linked moment database.
Definition at line 115 of file vpMoment.h.
Referenced by vpMomentArea::compute(), vpMomentGravityCenterNormalized::compute(), vpMomentCentered::compute(), vpMomentAreaNormalized::compute(), vpMomentCInvariant::compute(), and vpMomentAlpha::compute().
|
inlineinherited |
Definition at line 119 of file vpMoment.h.
Referenced by vpMomentArea::compute(), vpMomentCentered::compute(), compute(), vpMomentAreaNormalized::compute(), vpMomentCInvariant::compute(), vpFeatureMomentArea::compute_interaction(), vpFeatureMomentBasic::compute_interaction(), vpFeatureMomentCentered::compute_interaction(), vpFeatureMomentAlpha::compute_interaction(), vpFeatureMomentAreaNormalized::compute_interaction(), vpFeatureMomentCInvariant::compute_interaction(), vpFeatureMomentGravityCenter::compute_interaction(), vpFeatureMomentGravityCenterNormalized::compute_interaction(), vpMomentBasic::get(), vpMomentCentered::get(), vpFeatureMomentBasic::interaction(), and vpFeatureMomentCentered::interaction().
|
inline |
Shortcut function to retrieve .
Definition at line 123 of file vpMomentGravityCenter.h.
Referenced by vpFeatureMomentArea::compute_interaction(), vpFeatureMomentCentered::compute_interaction(), vpFeatureMomentAlpha::compute_interaction(), vpFeatureMomentAreaNormalized::compute_interaction(), vpFeatureMomentGravityCenter::compute_interaction(), and vpFeatureMomentGravityCenterNormalized::compute_interaction().
|
inline |
Shortcut function to retrieve .
Definition at line 128 of file vpMomentGravityCenter.h.
Referenced by vpFeatureMomentArea::compute_interaction(), vpFeatureMomentCentered::compute_interaction(), vpFeatureMomentAlpha::compute_interaction(), vpFeatureMomentAreaNormalized::compute_interaction(), vpFeatureMomentGravityCenter::compute_interaction(), and vpFeatureMomentGravityCenterNormalized::compute_interaction().
|
inherited |
Links the moment to a database of moment primitives. If the moment depends on other moments, these moments must be linked to the same database.
moments | : database of moment primitives. |
Definition at line 104 of file vpMoment.cpp.
References vpMoment::name().
Referenced by vpMomentCommon::getAlpha(), vpMomentCommon::getMu3(), vpMomentCommon::getSurface(), and vpMomentCommon::vpMomentCommon().
|
inlinevirtual |
The class's string name.
Implements vpMoment.
Reimplemented in vpMomentGravityCenterNormalized.
Definition at line 132 of file vpMomentGravityCenter.h.
|
inherited |
Updates the moment with the current object. This does not compute any values.
object | : object descriptor of the current camera vision. |
Definition at line 117 of file vpMoment.cpp.
|
friend |
Outputs the moment's values to a stream.
Definition at line 70 of file vpMomentGravityCenter.cpp.
|
protectedinherited |
Definition at line 110 of file vpMoment.h.
Referenced by vpMomentArea::compute(), vpMomentGravityCenterNormalized::compute(), vpMomentCentered::compute(), compute(), vpMomentAreaNormalized::compute(), vpMomentCInvariant::compute(), vpMomentAlpha::compute(), vpMomentCentered::get(), get(), vpMomentAlpha::vpMomentAlpha(), vpMomentArea::vpMomentArea(), vpMomentAreaNormalized::vpMomentAreaNormalized(), vpMomentCInvariant::vpMomentCInvariant(), and vpMomentGravityCenter().