38 #include <visp3/visual_features/vpFeatureMoment.h>
39 #include <visp3/core/vpMoment.h>
40 #include <visp3/visual_features/vpFeatureMomentDatabase.h>
41 #include <visp3/core/vpMomentDatabase.h>
42 #include <visp3/core/vpMath.h>
44 #include <visp3/core/vpException.h>
45 #include <visp3/visual_features/vpFeatureException.h>
47 #include <visp3/core/vpDebug.h>
70 for(
unsigned int i=0;i<
dim_s;i++)
86 for(
unsigned int i=0;i<
dim_s;++i)
98 for(
unsigned int i=0;i<
dim_s;++i){
100 std::cout <<
s[i] <<
",";
104 std::cout << std::endl;
111 const vpColor &color,
unsigned int thickness)
const
124 const vpColor &color,
unsigned int thickness)
const
160 for(
unsigned int i=0;i<
dim_s;i++)
191 for(
unsigned int i=0;i<
dim_s;++i){
216 for(
unsigned int i=0;i<
dim_s;i++)
217 feat->
s[i] = this->s[i];
220 for (
unsigned int i = 0; i < (
unsigned int)
nbParameters; i++)
232 if (strlen(
name() ) >= 255) {
234 "Not enough memory to intialize the moment name"));
240 featureMoments.add(*
this,
_name);
270 os <<
" WARNING : Falling back to base class version of printDependencies() in vpFeatureMoment. To prevent that, this has to be implemented in the derived classes!" << std::endl;
Implementation of a matrix and operations on matrices.
bool * flags
Ensure that all the parameters needed to compute the iteraction matrix are set.
virtual const char * name() const =0
const std::vector< double > & get() const
virtual void compute_interaction(void)
void linkTo(vpFeatureMomentDatabase &featureMoments)
Class to define colors available for display functionnalities.
void stack(const vpMatrix &A)
vpBasicFeature * duplicate() const
unsigned int dim_s
Dimension of the visual feature.
error that can be emited by ViSP classes.
std::vector< vpMatrix > interaction_matrices
int getDimension(unsigned int select=FEATURE_ALL) const
This class defines a generic feature used for moment feature duplication.
virtual ~vpFeatureMoment()
virtual const char * momentName() const =0
class that defines what is a visual feature
vpMatrix interaction(const unsigned int select=FEATURE_ALL)
void display(const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const
This class defines shared system methods/attributes for 2D moment features but no functional code...
void print(const unsigned int select=FEATURE_ALL) const
virtual vpMatrix interaction(const unsigned int select=FEATURE_ALL)=0
Compute the interaction matrix from a subset of the possible features.
Generic class defining intrinsic camera parameters.
const vpMoment & get(const char *type, bool &found) const
vpMomentDatabase & moments
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)
void update(double A, double B, double C)
static const unsigned int FEATURE_LINE[32]
vpFeatureMomentDatabase * featureMomentsDataBase
virtual void printDependencies(std::ostream &os) const
std::ostream & matlabPrint(std::ostream &os) const
unsigned int nbParameters
Number of parameters needed to compute the interaction matrix.
vpColVector s
State of the visual feature.
This class allows to register all feature moments (implemented in vpFeatureMoment... classes) so they can access each other according to their dependencies.
void resize(const unsigned int i, const bool flagNullify=true)