34 #include <visp3/core/vpMath.h>
35 #include <visp3/core/vpMoment.h>
36 #include <visp3/core/vpMomentDatabase.h>
37 #include <visp3/visual_features/vpFeatureMoment.h>
38 #include <visp3/visual_features/vpFeatureMomentDatabase.h>
40 #include <visp3/core/vpException.h>
41 #include <visp3/visual_features/vpFeatureException.h>
44 #include <visp3/core/vpDebug.h>
59 if (this->
moment !=
nullptr)
68 for (
unsigned int i = 0; i <
dim_s; i++)
84 for (
unsigned int i = 0; i <
dim_s; ++i)
96 for (
unsigned int i = 0; i <
dim_s; ++i) {
98 std::cout <<
s[i] <<
",";
102 std::cout << std::endl;
110 unsigned int thickness)
const
123 unsigned int thickness)
const
160 if (this->
moment !=
nullptr) {
165 for (
unsigned int i = 0; i <
dim_s; i++)
168 if (
flags ==
nullptr)
198 for (
unsigned int i = 0; i <
dim_s; ++i) {
224 for (
unsigned int i = 0; i <
dim_s; i++)
225 feat->
s[i] = this->s[i];
228 for (
unsigned int i = 0; i < (
unsigned int)
nbParameters; i++)
245 featureMoments.add(*
this,
m_name);
273 os <<
" WARNING : Falling back to base class version of "
274 "printDependencies() in vpFeatureMoment. To prevent that, this has "
275 "to be implemented in the derived classes!"
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)
class that defines what is a visual feature
vpColVector s
State of the visual feature.
static const unsigned int FEATURE_LINE[32]
unsigned int nbParameters
Number of parameters needed to compute the interaction matrix.
virtual vpMatrix interaction(unsigned int select=FEATURE_ALL)=0
Compute the interaction matrix from a subset of the possible features.
unsigned int dim_s
Dimension of the visual feature.
Generic class defining intrinsic camera parameters.
void resize(unsigned int i, bool flagNullify=true)
Class to define RGB colors available for display functionalities.
error that can be emitted by ViSP classes.
@ notInitialized
Used to indicate that a parameter is not initialized.
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....
vpMatrix interaction(unsigned int select=FEATURE_ALL) override
virtual void printDependencies(std::ostream &os) const
std::vector< vpMatrix > interaction_matrices
void print(unsigned int select=FEATURE_ALL) const override
vpFeatureMomentDatabase * featureMomentsDataBase
vpMomentDatabase & moments
void display(const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const override
int getDimension(unsigned int select=FEATURE_ALL) const
vpBasicFeature * duplicate() const override
virtual const std::string name() const =0
void update(double A, double B, double C)
virtual const std::string momentName() const =0
virtual void compute_interaction(void)
void linkTo(vpFeatureMomentDatabase &featureMoments)
Implementation of a matrix and operations on matrices.
std::ostream & matlabPrint(std::ostream &os) const
const vpMoment & get(const std::string &moment_name, bool &found) const
This class defines a generic feature used for moment feature duplication.
const std::vector< double > & get() const