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>
60 if (this->
moment !=
nullptr)
69 for (
unsigned int i = 0; i <
dim_s; i++)
85 for (
unsigned int i = 0; i <
dim_s; ++i)
97 for (
unsigned int i = 0; i <
dim_s; ++i) {
99 std::cout <<
s[i] <<
",";
103 std::cout << std::endl;
111 unsigned int thickness)
const
124 unsigned int thickness)
const
161 if (this->
moment !=
nullptr) {
166 for (
unsigned int i = 0; i <
dim_s; i++)
169 if (
flags ==
nullptr)
199 for (
unsigned int i = 0; i <
dim_s; ++i) {
225 for (
unsigned int i = 0; i <
dim_s; i++)
226 feat->
s[i] = this->s[i];
229 for (
unsigned int i = 0; i < (
unsigned int)
nbParameters; i++)
246 featureMoments.add(*
this,
m_name);
260 os <<
" WARNING : Falling back to base class version of "
261 "printDependencies() in vpFeatureMoment. To prevent that, this has "
262 "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.
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.
static const unsigned int FEATURE_LINE[32]
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....
virtual void printDependencies(std::ostream &os) const
std::vector< vpMatrix > interaction_matrices
vpFeatureMomentDatabase * featureMomentsDataBase
vpMomentDatabase & moments
vpBasicFeature * duplicate() const VP_OVERRIDE
vpMatrix interaction(unsigned int select=FEATURE_ALL) VP_OVERRIDE
int getDimension(unsigned int select=FEATURE_ALL) const
void init(void) VP_OVERRIDE
void display(const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const VP_OVERRIDE
void print(unsigned int select=FEATURE_ALL) const VP_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