41 #include <visp3/core/vpMomentObject.h> 42 #include <visp3/visual_features/vpFeatureMomentBasic.h> 43 #include <visp3/visual_features/vpFeatureMomentDatabase.h> 88 3 * delta * (
A * m.
get(1, 0) +
B * m.
get(0, 1) +
C * m.
get(0, 0)) - delta *
C * m.
get(0, 0);
95 for (
int j = 1; j < (int)order - 1; j++) {
96 unsigned int j_ = (
unsigned int)j;
97 unsigned int jm1_ = j_ - 1;
98 unsigned int jp1_ = j_ + 1;
102 -j * (
A * m.
get(1, jm1_) +
B * m.
get(0, j_) +
C * m.
get(0, jm1_)) - delta *
B * m.
get(0, j_);
104 (j + 3 * delta) * (
A * m.
get(1, j_) +
B * m.
get(0, jp1_) +
C * m.
get(0, j_)) - delta *
C * m.
get(0, j_);
112 for (
int i = 1; i < (int)order - 1; i++) {
113 unsigned int i_ = (
unsigned int)i;
114 unsigned int im1_ = i_ - 1;
115 unsigned int ip1_ = i_ + 1;
118 -i * (
A * m.
get(i_, 0) +
B * m.
get(im1_, 1) +
C * m.
get(im1_, 0)) - delta *
A * m.
get(i_, 0);
121 (i + 3 * delta) * (
A * m.
get(ip1_, 0) +
B * m.
get(i_, 1) +
C * m.
get(i_, 0)) - delta *
C * m.
get(i_, 0);
128 for (
int j = 1; j < (int)order - 1; j++) {
129 unsigned int j_ = (
unsigned int)j;
130 unsigned int jm1_ = j_ - 1;
131 unsigned int jp1_ = j_ + 1;
133 for (
int i = 1; i < (int)order - j - 1; i++) {
134 unsigned int i_ = (
unsigned int)i;
135 unsigned int im1_ = i_ - 1;
136 unsigned int ip1_ = i_ + 1;
139 -i * (
A * m.
get(i_, j_) +
B * m.
get(im1_, jp1_) +
C * m.
get(im1_, j_)) - delta *
A * m.
get(i_, j_);
141 -j * (
A * m.
get(ip1_, jm1_) +
B * m.
get(i_, j_) +
C * m.
get(i_, jm1_)) - delta *
B * m.
get(i_, j_);
143 (i + j + 3 * delta) * (
A * m.
get(ip1_, j_) +
B * m.
get(i_, jp1_) +
C * m.
get(i_, j_)) -
144 delta *
C * m.
get(i_, j_);
163 "been computed, you should " 164 "specify a higher order.");
Used to indicate that a value is not in the allowed range.
Implementation of a matrix and operations on matrices.
error that can be emited by ViSP classes.
Class for generic objects.
const std::vector< double > & get() const
std::vector< vpMatrix > interaction_matrices
vpMatrix interaction(unsigned int select_one, unsigned int select_two) const
void compute_interaction()
This class allows to register all vpMoments so they can access each other according to their dependen...
This class defines shared system methods/attributes for 2D moment features but no functional code...
vpObjectType getType() const
vpFeatureMomentBasic(vpMomentDatabase &moments, double A, double B, double C, vpFeatureMomentDatabase *featureMoments=NULL)
const vpMomentObject & getObject() const
This class allows to register all feature moments (implemented in vpFeatureMoment... classes) so they can access each other according to their dependencies.
unsigned int getOrder() const