42 #include <visp/vpFeatureMomentDatabase.h>
43 #include <visp/vpFeatureMoment.h>
46 #include <visp/vpConfig.h>
53 void vpFeatureMomentDatabase::add(
vpFeatureMoment& featureMoment,
char* name){
54 featureMomentsDataBase.insert(std::pair<const char*,vpFeatureMoment*>((
const char*)name,&featureMoment));
65 std::map<const char*,vpFeatureMoment*,vpFeatureMomentDatabase::cmp_str>::const_iterator it = featureMomentsDataBase.find(type);
67 found = (it!=featureMomentsDataBase.end());
79 std::map<const char*,vpFeatureMoment*,vpFeatureMomentDatabase::cmp_str>::const_iterator itr;
80 #ifdef VISP_HAVE_OPENMP
81 std::vector<vpFeatureMoment*> values;
82 values.reserve(featureMomentsDataBase.size());
83 for(itr = featureMomentsDataBase.begin(); itr != featureMomentsDataBase.end(); itr++){
84 values.push_back((*itr).second);
87 #pragma omp parallel for shared(A,B,C)
88 for(
int i=0;i<(int)values.size();i++){
89 i_ =
static_cast<unsigned int>(i);
90 values[i_]->update(A,B,C);
93 for(itr = featureMomentsDataBase.begin(); itr != featureMomentsDataBase.end(); itr++){
94 (*itr).second->update(A,B,C);
This class defines shared system methods/attributes for 2D moment features but no functional code...
virtual void updateAll(double A=0.0, double B=0.0, double C=1.0)
vpFeatureMoment & get(const char *type, bool &found)