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
157 if(!found)
throw (
"Moment not found for feature");
166 for(
unsigned int i=0;i<
dim_s;i++)
197 for(
unsigned int i=0;i<
dim_s;++i){
222 for(
unsigned int i=0;i<
dim_s;i++)
223 feat->
s[i] = this->s[i];
226 for (
unsigned int i = 0; i < (
unsigned int)
nbParameters; i++)
241 featureMoments.add(*
this,
_name);
Definition of the vpMatrix class.
bool * flags
Ensure that all the parameters needed to compute the iteraction matrix are set.
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.
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()
class that defines what is a visual feature
virtual const char * name()=0
vpMatrix interaction(const unsigned int select=FEATURE_ALL)
vpMoment & get(const char *type, bool &found)
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
Generic class defining intrinsic camera parameters.
vpMomentDatabase & moments
void update(double A, double B, double C)
static const unsigned int FEATURE_LINE[32]
static vpMatrix stackMatrices(const vpMatrix &A, const vpMatrix &B)
Stack two Matrices C = [ A B ]^T.
std::vector< double > & get()
vpFeatureMomentDatabase * featureMomentsDataBase
virtual const char * momentName()=0
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)