42 #include <visp/vpFeatureMoment.h>
43 #include <visp/vpMoment.h>
44 #include <visp/vpFeatureMomentDatabase.h>
45 #include <visp/vpMomentDatabase.h>
46 #include <visp/vpMath.h>
48 #include <visp/vpException.h>
49 #include <visp/vpMatrixException.h>
50 #include <visp/vpFeatureException.h>
52 #include <visp/vpDebug.h>
75 for(
unsigned int i=0;i<
dim_s;i++)
91 for(
unsigned int i=0;i<
dim_s;++i)
103 for(
unsigned int i=0;i<
dim_s;++i){
105 std::cout <<
s[i] <<
",";
109 std::cout << std::endl;
116 const vpColor &color,
unsigned int thickness)
const
129 const vpColor &color,
unsigned int thickness)
const
165 for(
unsigned int i=0;i<
dim_s;i++)
196 for(
unsigned int i=0;i<
dim_s;++i){
221 for(
unsigned int i=0;i<
dim_s;i++)
222 feat->
s[i] = this->s[i];
225 for (
unsigned int i = 0; i < (
unsigned int)
nbParameters; i++)
237 if (strlen(
name() ) >= 255) {
239 "Not enough memory to intialize the moment name"));
245 featureMoments.add(*
this,
_name);
256 VISP_EXPORT std::ostream& operator<<(std::ostream & os,
const vpFeatureMoment& featM) {
275 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;
Definition of the vpMatrix class.
bool * flags
Ensure that all the parameters needed to compute the iteraction matrix are set.
virtual const char * name() const =0
static const unsigned int FEATURE_ALL
const std::vector< double > & get() const
virtual void compute_interaction(void)
void linkTo(vpFeatureMomentDatabase &featureMoments)
Class to define colors available for display functionnalities.
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
void stackMatrices(const vpMatrix &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
Print using matlab syntax, to be put in matlab later.
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)