35 #include <visp3/core/vpMomentObject.h>
36 #include <visp3/visual_features/vpFeatureMomentBasic.h>
37 #include <visp3/visual_features/vpFeatureMomentDatabase.h>
83 3 * delta * (
A * m.
get(1, 0) +
B * m.
get(0, 1) +
C * m.
get(0, 0)) - delta *
C * m.
get(0, 0);
90 for (
int j = 1; j < (int)
order - 1; j++) {
91 unsigned int j_ = (
unsigned int)j;
92 unsigned int jm1_ = j_ - 1;
93 unsigned int jp1_ = j_ + 1;
97 -j * (
A * m.
get(1, jm1_) +
B * m.
get(0, j_) +
C * m.
get(0, jm1_)) - delta *
B * m.
get(0, j_);
99 (j + 3 * delta) * (
A * m.
get(1, j_) +
B * m.
get(0, jp1_) +
C * m.
get(0, j_)) - delta *
C * m.
get(0, j_);
107 for (
int i = 1; i < (int)
order - 1; i++) {
108 unsigned int i_ = (
unsigned int)i;
109 unsigned int im1_ = i_ - 1;
110 unsigned int ip1_ = i_ + 1;
113 -i * (
A * m.
get(i_, 0) +
B * m.
get(im1_, 1) +
C * m.
get(im1_, 0)) - delta *
A * m.
get(i_, 0);
116 (i + 3 * delta) * (
A * m.
get(ip1_, 0) +
B * m.
get(i_, 1) +
C * m.
get(i_, 0)) - delta *
C * m.
get(i_, 0);
123 for (
int j = 1; j < (int)
order - 1; j++) {
124 unsigned int j_ = (
unsigned int)j;
125 unsigned int jm1_ = j_ - 1;
126 unsigned int jp1_ = j_ + 1;
128 for (
int i = 1; i < (int)
order - j - 1; i++) {
129 unsigned int i_ = (
unsigned int)i;
130 unsigned int im1_ = i_ - 1;
131 unsigned int ip1_ = i_ + 1;
134 -i * (
A * m.
get(i_, j_) +
B * m.
get(im1_, jp1_) +
C * m.
get(im1_, j_)) - delta *
A * m.
get(i_, j_);
136 -j * (
A * m.
get(ip1_, jm1_) +
B * m.
get(i_, j_) +
C * m.
get(i_, jm1_)) - delta *
B * m.
get(i_, j_);
138 (i + j + 3 * delta) * (
A * m.
get(ip1_, j_) +
B * m.
get(i_, jp1_) +
C * m.
get(i_, j_)) -
139 delta *
C * m.
get(i_, j_);
158 "been computed, you should "
159 "specify a higher order.");
error that can be emitted by ViSP classes.
@ badValue
Used to indicate that a value is not in the allowed range.
vpFeatureMomentBasic(vpMomentDatabase &moments, double A, double B, double C, vpFeatureMomentDatabase *featureMoments=nullptr)
vpMatrix interaction(unsigned int select_one, unsigned int select_two) const
void compute_interaction() VP_OVERRIDE
This class allows to register all feature moments (implemented in vpFeatureMoment....
This class defines shared system methods/attributes for 2D moment features but no functional code....
std::vector< vpMatrix > interaction_matrices
Implementation of a matrix and operations on matrices.
This class allows to register all vpMoments so they can access each other according to their dependen...
Class for generic objects.
unsigned int getOrder() const
const std::vector< double > & get() const
vpObjectType getType() const
const vpMomentObject & getObject() const