Visual Servoing Platform
version 3.0.0
|
#include <visp3/core/vpMomentAreaNormalized.h>
Public Member Functions | |
vpMomentAreaNormalized (double desiredSurface, double desiredDepth) | |
void | compute () |
double | getDesiredDepth () const |
double | getDesiredSurface () const |
const char * | name () const |
void | printDependencies (std::ostream &os) const |
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 |
Friends | |
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 [26].
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 continous cases.
This example shows a computation in the discrete case.
This code produces the following output:
Definition at line 128 of file vpMomentAreaNormalized.h.
vpMomentAreaNormalized::vpMomentAreaNormalized | ( | double | desired_surface, |
double | desired_depth | ||
) |
Default constructor.
desired_surface | : desired area a* when the visual servoing converges. |
desired_depth | : desired depth Z* when the visual servoing converges. |
Definition at line 73 of file vpMomentAreaNormalized.cpp.
References vpMoment::values.
|
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.
Referenced by vpMomentCommon::updateAll().
|
inlineinherited |
Returns all values computed by the moment.
Definition at line 148 of file vpMoment.h.
Referenced by vpMomentGravityCenterNormalized::compute(), vpFeatureMomentArea::compute_interaction(), vpFeatureMomentAreaNormalized::compute_interaction(), vpFeatureMomentGravityCenterNormalized::compute_interaction(), vpMomentCentered::get(), vpFeatureMoment::init(), vpMomentGravityCenterNormalized::printDependencies(), and vpFeatureMoment::update().
|
inline |
Retrieves the desired depth Z* as specified in the constructor.
Definition at line 138 of file vpMomentAreaNormalized.h.
|
inline |
Retrieves the desired surface a* as specified in the constructor.
Definition at line 142 of file vpMomentAreaNormalized.h.
|
inlineprotectedinherited |
Returns the linked moment database.
Definition at line 119 of file vpMoment.h.
Referenced by vpMomentArea::compute(), vpMomentGravityCenterNormalized::compute(), vpMomentCentered::compute(), compute(), vpMomentCInvariant::compute(), vpMomentAlpha::compute(), vpMomentArea::printDependencies(), vpMomentGravityCenterNormalized::printDependencies(), vpMomentCentered::printDependencies(), printDependencies(), and vpMomentAlpha::printDependencies().
|
inlineinherited |
Definition at line 143 of file vpMoment.h.
Referenced by vpMomentArea::compute(), vpMomentCentered::compute(), vpMomentGravityCenter::compute(), 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(), vpFeatureMomentCentered::interaction(), vpMomentArea::printDependencies(), vpMomentBasic::printDependencies(), vpMomentCentered::printDependencies(), vpMomentGravityCenter::printDependencies(), 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 99 of file vpMoment.cpp.
References vpException::memoryAllocationError, and vpMoment::name().
Referenced by vpMomentCommon::getAlpha(), vpMomentCommon::getMu3(), vpMomentCommon::getSurface(), and vpMomentCommon::vpMomentCommon().
|
inlinevirtual |
|
virtual |
Prints dependencies namely,
Reimplemented from vpMoment.
Definition at line 96 of file vpMomentAreaNormalized.cpp.
References vpMomentObject::DISCRETE, vpMomentCentered::get(), vpMomentDatabase::get(), vpMomentObject::get(), vpMoment::getMoments(), vpMoment::getObject(), and vpException::notInitialized.
|
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 116 of file vpMoment.cpp.
|
friend |
Outputs the moment's values to a stream.
Definition at line 82 of file vpMomentAreaNormalized.cpp.
|
protectedinherited |
Definition at line 114 of file vpMoment.h.
Referenced by vpMomentArea::compute(), vpMomentGravityCenterNormalized::compute(), vpMomentCentered::compute(), vpMomentGravityCenter::compute(), compute(), vpMomentCInvariant::compute(), vpMomentAlpha::compute(), vpMomentCentered::get(), vpMomentGravityCenter::get(), vpMomentCInvariant::getMomentVector(), vpMomentCentered::set(), vpMomentAlpha::vpMomentAlpha(), vpMomentArea::vpMomentArea(), vpMomentAreaNormalized(), vpMomentCInvariant::vpMomentCInvariant(), and vpMomentGravityCenter::vpMomentGravityCenter().