![]() |
Visual Servoing Platform
version 3.2.0
|
#include <vpMomentAreaNormalized.h>
Public Member Functions | |
vpMomentAreaNormalized (double a_star, double Z_star) | |
virtual | ~vpMomentAreaNormalized () |
void | compute () |
double | getDesiredArea () const |
double | getDesiredDepth () const |
vp_deprecated double | getDesiredSurface () const |
void | setDesiredDepth (double Z_star) |
void | setDesiredArea (double a_star) |
const char * | name () const |
void | printDependencies (std::ostream &os) const |
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 |
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 [Tahri05z].
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 137 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 77 of file vpMomentAreaNormalized.cpp.
|
inlinevirtual |
Definition at line 145 of file vpMomentAreaNormalized.h.
|
virtual |
Computes the normalized area . Depends on vpMomentCentered.
Implements vpMoment.
Definition at line 47 of file vpMomentAreaNormalized.cpp.
|
inlineinherited |
Returns all values computed by the moment.
Definition at line 154 of file vpMoment.h.
|
inline |
Retrieves the desired surface a* as specified in the constructor.
Definition at line 150 of file vpMomentAreaNormalized.h.
|
inline |
Retrieves the desired depth Z* as specified in the constructor.
Definition at line 154 of file vpMomentAreaNormalized.h.
|
inline |
Definition at line 159 of file vpMomentAreaNormalized.h.
|
inlineprotectedinherited |
Returns the linked moment database.
Definition at line 122 of file vpMoment.h.
|
inlineinherited |
Definition at line 149 of file vpMoment.h.
|
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 97 of file vpMoment.cpp.
|
inlinevirtual |
|
virtual |
Prints dependencies namely,
Reimplemented from vpMoment.
Definition at line 101 of file vpMomentAreaNormalized.cpp.
|
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 169 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 164 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 114 of file vpMoment.cpp.
|
friend |
Outputs the moment's values to a stream.
Definition at line 86 of file vpMomentAreaNormalized.cpp.
|
protectedinherited |
Definition at line 117 of file vpMoment.h.