39 #include <visp3/core/vpMath.h>
40 #include <visp3/core/vpMoment.h>
41 #include <visp3/core/vpMomentDatabase.h>
42 #include <visp3/visual_features/vpFeatureMoment.h>
43 #include <visp3/visual_features/vpFeatureMomentDatabase.h>
45 #include <visp3/core/vpException.h>
46 #include <visp3/visual_features/vpFeatureException.h>
49 #include <visp3/core/vpDebug.h>
73 for (
unsigned int i = 0; i <
dim_s; i++)
89 for (
unsigned int i = 0; i <
dim_s; ++i)
101 for (
unsigned int i = 0; i <
dim_s; ++i) {
103 std::cout <<
s[i] <<
",";
107 std::cout << std::endl;
115 unsigned int thickness)
const
129 unsigned int thickness)
const
166 if (this->
moment != NULL) {
171 for (
unsigned int i = 0; i <
dim_s; i++)
203 for (
unsigned int i = 0; i <
dim_s; ++i) {
228 for (
unsigned int i = 0; i <
dim_s; i++)
229 feat->
s[i] = this->s[i];
232 for (
unsigned int i = 0; i < (
unsigned int)
nbParameters; i++)
246 if (strlen(
name()) >= 255) {
253 featureMoments.add(*
this,
_name);
283 os <<
" WARNING : Falling back to base class version of "
284 "printDependencies() in vpFeatureMoment. To prevent that, this has "
285 "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 functionnalities.
error that can be emited by ViSP classes.
@ notInitialized
Used to indicate that a parameter is not initialized.
@ memoryAllocationError
Memory allocation error.
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....
vpBasicFeature * duplicate() const
virtual void printDependencies(std::ostream &os) const
std::vector< vpMatrix > interaction_matrices
virtual ~vpFeatureMoment()
vpFeatureMomentDatabase * featureMomentsDataBase
vpMomentDatabase & moments
void print(unsigned int select=FEATURE_ALL) const
vpMatrix interaction(unsigned int select=FEATURE_ALL)
int getDimension(unsigned int select=FEATURE_ALL) const
virtual const char * momentName() const =0
void display(const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1) const
virtual const char * name() const =0
void update(double A, double B, double C)
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 char *type, bool &found) const
This class defines a generic feature used for moment feature duplication.
const std::vector< double > & get() const