![]() |
Visual Servoing Platform version 3.7.0
|
#include <vpMomentBasic.h>
Public Member Functions | |
| vpMomentBasic () | |
| void | compute () VP_OVERRIDE |
| const std::vector< double > & | get () const |
| double | get (unsigned int i, unsigned int j) const |
| const std::string | name () const VP_OVERRIDE |
| void | printDependencies (std::ostream &os) const VP_OVERRIDE |
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 |
Friends | |
| VISP_EXPORT std::ostream & | operator<< (std::ostream &os, const vpMomentBasic &v) |
This class defines the 2D basic moment
. This class is a wrapper for vpMomentObject which allows to use it as a moment. This enables all common operations such as adding to a vpMomentDatabase.
In the case of a dense object O, 2D basic moments are defined by:
In the case of a discrete set of n points, the basic moments are defined by
The selection of a dense or discrete object is done in vpMomentObject. The maximum order of vpMomentBasic is the same as that of vpMomentObject (ie:
vpMomentObject::getOrder).
Note that in the continuous case, the basic moment
corresponds to the surface
of the object. In the discrete case, it is the number of discrete points
.
Definition at line 72 of file vpMomentBasic.h.
| BEGIN_VISP_NAMESPACE vpMomentBasic::vpMomentBasic | ( | ) |
Default constructor.
Definition at line 41 of file vpMomentBasic.cpp.
References vpMoment::vpMoment().
Referenced by operator<<.
|
virtual |
Dummy function. Everything is already done in object.
Implements vpMoment.
Definition at line 64 of file vpMomentBasic.cpp.
| const std::vector< double > & vpMomentBasic::get | ( | ) | const |
Retrieve all moments of all orders computed. vpMomentBasic::get()[j*order+i] refers to moment
.
Same behaviour as vpMomentObject.
Definition at line 49 of file vpMomentBasic.cpp.
References vpMomentObject::get(), and vpMoment::getObject().
Referenced by vpFeatureMomentCentered::compute_Lmu_pq().
| double vpMomentBasic::get | ( | unsigned int | i, |
| unsigned int | j ) const |
Gets the desired moment using indexes.
| i | : first index of the 2D moment. |
| j | : second index of the 2D moment. |
Same behaviour as vpMomentObject.
Definition at line 59 of file vpMomentBasic.cpp.
References vpMomentObject::get(), and vpMoment::getObject().
|
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 150 of file vpMoment.h.
Referenced by vpMomentArea::compute(), vpMomentAreaNormalized::compute(), vpMomentCentered::compute(), vpMomentCInvariant::compute(), vpMomentGravityCenter::compute(), vpMomentBasic::get(), vpMomentBasic::get(), vpMomentCentered::get(), vpMomentBasic::operator<<, vpMomentCentered::operator<<, vpMomentArea::printDependencies(), vpMomentAreaNormalized::printDependencies(), vpMomentBasic::printDependencies(), vpMomentCentered::printDependencies(), vpMomentGravityCenter::printDependencies(), vpMomentCentered::printWithIndices(), and vpMomentCentered::set().
|
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 114 of file vpMoment.cpp.
References name().
Referenced by vpMomentCommon::getAlpha(), vpMomentCommon::getMu3(), and vpMomentCommon::getSurface().
|
inlinevirtual |
|
virtual |
No dependencies on other vpMoments, since basic moments are computed in vpMomentObject Just prints the basic moments in vpMomentObject with indices
Reimplemented from vpMoment.
Definition at line 70 of file vpMomentBasic.cpp.
References vpMoment::getObject(), and vpMomentObject::printWithIndices().
|
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 127 of file vpMoment.cpp.
Referenced by name().
|
friend |
Outputs the moment's values to a stream. Same output as in vpMomentObject.
Definition at line 83 of file vpMomentBasic.cpp.
References vpMoment::getObject(), operator<<, vpMomentObject::printWithIndices(), and vpMomentBasic().
Referenced by operator<<.
|
protectedinherited |
Definition at line 113 of file vpMoment.h.
Referenced by vpMomentCInvariant::C1(), vpMomentCInvariant::C10(), vpMomentCInvariant::C2(), vpMomentCInvariant::C3(), vpMomentCInvariant::C4(), vpMomentCInvariant::C5(), vpMomentCInvariant::C6(), vpMomentCInvariant::C7(), vpMomentCInvariant::C8(), vpMomentCInvariant::C9(), vpMomentAlpha::compute(), vpMomentArea::compute(), vpMomentAreaNormalized::compute(), vpMomentCentered::compute(), vpMomentCInvariant::compute(), vpMomentGravityCenter::compute(), vpMomentGravityCenterNormalized::compute(), get(), vpMomentAlpha::get(), vpMomentCentered::get(), vpMomentCInvariant::get(), vpMomentGravityCenter::get(), vpMomentCInvariant::getMomentVector(), vpMomentGravityCenter::getXg(), vpMomentGravityCenter::getYg(), operator<<, vpMomentAlpha::operator<<, vpMomentArea::operator<<, vpMomentAreaNormalized::operator<<, vpMomentCentered::operator<<, vpMomentGravityCenter::operator<<, vpMomentGravityCenterNormalized::operator<<, vpMomentCInvariant::Px(), vpMomentCInvariant::Py(), vpMomentCentered::set(), vpMomentCInvariant::Sx(), vpMomentCInvariant::Sy(), vpMoment(), vpMomentAlpha::vpMomentAlpha(), vpMomentArea::vpMomentArea(), vpMomentAreaNormalized::vpMomentAreaNormalized(), vpMomentCInvariant::vpMomentCInvariant(), and vpMomentGravityCenter::vpMomentGravityCenter().