36 #include <visp3/core/vpMomentObject.h>
37 #include <visp3/visual_features/vpFeatureMomentBasic.h>
38 #include <visp3/visual_features/vpFeatureMomentDatabase.h>
82 3 * delta * (
A * m.
get(1, 0) +
B * m.
get(0, 1) +
C * m.
get(0, 0)) - delta *
C * m.
get(0, 0);
89 for (
int j = 1; j < (int)
order - 1; j++) {
90 unsigned int j_ = (
unsigned int)j;
91 unsigned int jm1_ = j_ - 1;
92 unsigned int jp1_ = j_ + 1;
96 -j * (
A * m.
get(1, jm1_) +
B * m.
get(0, j_) +
C * m.
get(0, jm1_)) - delta *
B * m.
get(0, j_);
98 (j + 3 * delta) * (
A * m.
get(1, j_) +
B * m.
get(0, jp1_) +
C * m.
get(0, j_)) - delta *
C * m.
get(0, j_);
106 for (
int i = 1; i < (int)
order - 1; i++) {
107 unsigned int i_ = (
unsigned int)i;
108 unsigned int im1_ = i_ - 1;
109 unsigned int ip1_ = i_ + 1;
112 -i * (
A * m.
get(i_, 0) +
B * m.
get(im1_, 1) +
C * m.
get(im1_, 0)) - delta *
A * m.
get(i_, 0);
115 (i + 3 * delta) * (
A * m.
get(ip1_, 0) +
B * m.
get(i_, 1) +
C * m.
get(i_, 0)) - delta *
C * m.
get(i_, 0);
122 for (
int j = 1; j < (int)
order - 1; j++) {
123 unsigned int j_ = (
unsigned int)j;
124 unsigned int jm1_ = j_ - 1;
125 unsigned int jp1_ = j_ + 1;
127 for (
int i = 1; i < (int)
order - j - 1; i++) {
128 unsigned int i_ = (
unsigned int)i;
129 unsigned int im1_ = i_ - 1;
130 unsigned int ip1_ = i_ + 1;
133 -i * (
A * m.
get(i_, j_) +
B * m.
get(im1_, jp1_) +
C * m.
get(im1_, j_)) - delta *
A * m.
get(i_, j_);
135 -j * (
A * m.
get(ip1_, jm1_) +
B * m.
get(i_, j_) +
C * m.
get(i_, jm1_)) - delta *
B * m.
get(i_, j_);
137 (i + j + 3 * delta) * (
A * m.
get(ip1_, j_) +
B * m.
get(i_, jp1_) +
C * m.
get(i_, j_)) -
138 delta *
C * m.
get(i_, j_);
157 "been computed, you should "
158 "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.
void compute_interaction() override
vpMatrix interaction(unsigned int select_one, unsigned int select_two) const
vpFeatureMomentBasic(vpMomentDatabase &moments, double A, double B, double C, vpFeatureMomentDatabase *featureMoments=nullptr)
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