Visual Servoing Platform
version 3.5.1 under development (2023-09-22)
|
#include <visp3/core/vpMomentGravityCenter.h>
Public Member Functions | |
vpMomentGravityCenter () | |
virtual | ~vpMomentGravityCenter () |
Inherited functionalities from vpMoment | |
const vpMomentObject & | getObject () const |
void | linkTo (vpMomentDatabase &moments) |
void | update (vpMomentObject &object) |
Protected Member Functions | |
vpMomentDatabase & | getMoments () const |
Protected Attributes | |
std::vector< double > | values |
Inherited functionalities from vpMomentGravityCenter | |
void | compute () |
const std::vector< double > & | get () const |
double | getXg () const |
double | getYg () const |
const char * | name () const |
void | printDependencies (std::ostream &os) const |
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 108 of file vpMomentGravityCenter.h.
vpMomentGravityCenter::vpMomentGravityCenter | ( | ) |
Default constructor.
Definition at line 54 of file vpMomentGravityCenter.cpp.
References vpMoment::values.
|
inlinevirtual |
Definition at line 112 of file vpMomentGravityCenter.h.
|
virtual |
Computes the two gravity center coordinates commonly called and .
Implements vpMoment.
Reimplemented in vpMomentGravityCenterNormalized.
Definition at line 45 of file vpMomentGravityCenter.cpp.
References vpMomentObject::get(), vpMoment::getObject(), and vpMoment::values.
Referenced by vpMomentCommon::getAlpha(), vpMomentCommon::getMu3(), vpMomentCommon::getSurface(), and vpMomentCommon::updateAll().
const std::vector< double > & vpMomentGravityCenter::get | ( | ) | const |
Returns a vector of the two gravity center coordinates.
Definition at line 60 of file vpMomentGravityCenter.cpp.
References vpMoment::values.
Referenced by vpMomentCentered::compute(), vpMomentGravityCenterNormalized::compute(), vpFeatureMomentCentered::compute_interaction(), and vpMomentGravityCenterNormalized::printDependencies().
|
inlineprotectedinherited |
Returns the linked moment database.
Definition at line 118 of file vpMoment.h.
Referenced by vpMomentAlpha::compute(), vpMomentArea::compute(), vpMomentAreaNormalized::compute(), vpMomentCentered::compute(), vpMomentCInvariant::compute(), vpMomentGravityCenterNormalized::compute(), vpMomentAlpha::printDependencies(), vpMomentArea::printDependencies(), vpMomentAreaNormalized::printDependencies(), vpMomentCentered::printDependencies(), and vpMomentGravityCenterNormalized::printDependencies().
|
inlineinherited |
Definition at line 145 of file vpMoment.h.
Referenced by vpMomentArea::compute(), vpMomentAreaNormalized::compute(), vpMomentCentered::compute(), vpMomentCInvariant::compute(), compute(), vpFeatureMomentAlpha::compute_interaction(), vpFeatureMomentArea::compute_interaction(), vpFeatureMomentAreaNormalized::compute_interaction(), vpFeatureMomentBasic::compute_interaction(), vpFeatureMomentCentered::compute_interaction(), vpFeatureMomentCInvariant::compute_interaction(), vpFeatureMomentGravityCenter::compute_interaction(), vpFeatureMomentGravityCenterNormalized::compute_interaction(), vpMomentBasic::get(), vpMomentCentered::get(), vpFeatureMomentBasic::interaction(), vpFeatureMomentCentered::interaction(), vpMomentArea::printDependencies(), vpMomentAreaNormalized::printDependencies(), vpMomentBasic::printDependencies(), vpMomentCentered::printDependencies(), printDependencies(), vpMomentCentered::printWithIndices(), and vpMomentCentered::set().
|
inline |
Shortcut function to retrieve .
Definition at line 122 of file vpMomentGravityCenter.h.
Referenced by vpFeatureMomentAlpha::compute_interaction(), vpFeatureMomentArea::compute_interaction(), vpFeatureMomentAreaNormalized::compute_interaction(), vpFeatureMomentCentered::compute_interaction(), vpFeatureMomentGravityCenter::compute_interaction(), vpFeatureMomentGravityCenterNormalized::compute_interaction(), and vpMomentCentered::printDependencies().
|
inline |
Shortcut function to retrieve .
Definition at line 127 of file vpMomentGravityCenter.h.
Referenced by vpFeatureMomentAlpha::compute_interaction(), vpFeatureMomentArea::compute_interaction(), vpFeatureMomentAreaNormalized::compute_interaction(), vpFeatureMomentCentered::compute_interaction(), vpFeatureMomentGravityCenter::compute_interaction(), vpFeatureMomentGravityCenterNormalized::compute_interaction(), and vpMomentCentered::printDependencies().
|
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.
data_base | : database of moment primitives. |
Definition at line 98 of file vpMoment.cpp.
References vpException::memoryAllocationError, and 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 131 of file vpMomentGravityCenter.h.
|
virtual |
Prints its dependencies Basic moments m10, m01 and m00 from vpMomentObject
Reimplemented from vpMoment.
Reimplemented in vpMomentGravityCenterNormalized.
Definition at line 76 of file vpMomentGravityCenter.cpp.
References vpMomentObject::get(), and vpMoment::getObject().
|
inherited |
Updates the moment with the current object. This does not compute any values.
moment_object | : object descriptor of the current camera vision. |
Definition at line 115 of file vpMoment.cpp.
|
friend |
Outputs the moment's values to a stream.
Definition at line 65 of file vpMomentGravityCenter.cpp.
|
protectedinherited |
Definition at line 113 of file vpMoment.h.
Referenced by vpMomentAlpha::compute(), vpMomentArea::compute(), vpMomentAreaNormalized::compute(), vpMomentCentered::compute(), vpMomentCInvariant::compute(), compute(), vpMomentGravityCenterNormalized::compute(), get(), vpMomentCentered::get(), vpMomentCInvariant::getMomentVector(), vpMomentCentered::set(), vpMomentAlpha::vpMomentAlpha(), vpMomentArea::vpMomentArea(), vpMomentAreaNormalized::vpMomentAreaNormalized(), vpMomentCInvariant::vpMomentCInvariant(), and vpMomentGravityCenter().