![]() |
Visual Servoing Platform version 3.7.0
|
#include <vpMomentAreaNormalized.h>
Public Member Functions | |
| vpMomentAreaNormalized (double a_star, double Z_star) | |
| void | compute () VP_OVERRIDE |
| double | getDesiredArea () const |
| double | getDesiredDepth () const |
| void | setDesiredDepth (double Z_star) |
| void | setDesiredArea (double a_star) |
Inherited functionalities from vpMoment | |
| const vpMomentObject & | getObject () const |
| const std::vector< double > & | get () const |
| void | linkTo (vpMomentDatabase &moments) |
| void | update (vpMomentObject &object) |
Protected Member Functions | |
| vpMomentDatabase & | getMoments () const |
Protected Attributes | |
| std::vector< double > | values |
Deprecated functions | |
| VP_DEPRECATED double | getDesiredSurface () const |
| const std::string | name () const VP_OVERRIDE |
| void | printDependencies (std::ostream &os) const VP_OVERRIDE |
| VISP_EXPORT std::ostream & | operator<< (std::ostream &os, const vpMomentAreaNormalized &v) |
Class handling the normalized surface moment that is invariant in scale and used to estimate depth.
This moment depends on vpMomentCentered.
The idea behind vpMomentAreaNormalized is described in [54].
During a visual servoing process, a vpMomentAreaNormalized will converge towards the desired depth when the current surface will converge to the destination surface. It is defined as follows:
where a is the current surface and a* the destination surface. Consequently, the vpMomentAreaNormalized needs to have information about the desired depth Z* and the desired surface a*.
Therefore, a vpMomentObject has to be of minimum order 2 in order to compute a vpMomentAreaNormalized moment in the discrete case and of minimum order 0 in continuous cases.
This example shows a computation in the discrete case.
This code produces the following output:
Definition at line 138 of file vpMomentAreaNormalized.h.
| vpMomentAreaNormalized::vpMomentAreaNormalized | ( | double | a_star, |
| double | Z_star ) |
Default constructor.
| a_star | : desired area a* when the visual servoing converges. |
| Z_star | : desired depth Z* when the visual servoing converges. |
Definition at line 79 of file vpMomentAreaNormalized.cpp.
References vpMoment::values, and vpMoment::vpMoment().
Referenced by operator<<.
|
virtual |
Computes the normalized area
. Depends on vpMomentCentered.
Implements vpMoment.
Definition at line 48 of file vpMomentAreaNormalized.cpp.
References vpMomentObject::DISCRETE, vpMomentCentered::get(), vpMomentDatabase::get(), vpMomentObject::get(), vpMoment::getMoments(), vpMoment::getObject(), vpException::notInitialized, and vpMoment::values.
|
inlineinherited |
Returns all values computed by the moment.
Definition at line 155 of file vpMoment.h.
References values.
Referenced by vpMomentGravityCenterNormalized::compute(), vpFeatureMomentArea::compute_interaction(), vpFeatureMomentAreaNormalized::compute_interaction(), vpFeatureMomentGravityCenterNormalized::compute_interaction(), vpMomentCentered::get(), and vpMomentGravityCenterNormalized::printDependencies().
|
inline |
Retrieves the desired surface a* as specified in the constructor.
Definition at line 151 of file vpMomentAreaNormalized.h.
|
inline |
Retrieves the desired depth Z* as specified in the constructor.
Definition at line 156 of file vpMomentAreaNormalized.h.
|
inline |
Definition at line 179 of file vpMomentAreaNormalized.h.
|
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 |
Prints dependencies namely,
Reimplemented from vpMoment.
Definition at line 93 of file vpMomentAreaNormalized.cpp.
References vpMomentObject::DISCRETE, vpMomentCentered::get(), vpMomentDatabase::get(), vpMomentObject::get(), vpMoment::getMoments(), vpMoment::getObject(), and vpException::notInitialized.
|
inline |
Set the desired area a* to a new value than the one specified in the constructor. This value has to be set before calling compute().
Definition at line 168 of file vpMomentAreaNormalized.h.
|
inline |
Set the desired depth Z* to a new value than the one specified in the constructor. This value has to be set before calling compute().
Definition at line 162 of file vpMomentAreaNormalized.h.
|
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.
Definition at line 116 of file vpMomentAreaNormalized.cpp.
References operator<<, vpMoment::values, and vpMomentAreaNormalized().
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().