38 #include <visp3/visual_features/vpFeatureMomentDatabase.h>
39 #include <visp3/visual_features/vpFeatureMoment.h>
42 #include <visp3/core/vpConfig.h>
49 void vpFeatureMomentDatabase::add(
vpFeatureMoment& featureMoment,
char* name){
50 featureMomentsDataBase.insert(std::pair<const char*,vpFeatureMoment*>((
const char*)name,&featureMoment));
61 std::map<const char*,vpFeatureMoment*,vpFeatureMomentDatabase::cmp_str>::const_iterator it = featureMomentsDataBase.find(type);
63 found = (it!=featureMomentsDataBase.end());
75 std::map<const char*,vpFeatureMoment*,vpFeatureMomentDatabase::cmp_str>::const_iterator itr;
76 #ifdef VISP_HAVE_OPENMP
77 std::vector<vpFeatureMoment*> values;
78 values.reserve(featureMomentsDataBase.size());
79 for(itr = featureMomentsDataBase.begin(); itr != featureMomentsDataBase.end(); ++itr){
80 values.push_back((*itr).second);
82 #pragma omp parallel for shared(A,B,C)
83 for(
int i=0;i<(int)values.size();i++){
84 unsigned int i_ =
static_cast<unsigned int>(i);
85 values[i_]->update(A,B,C);
88 for(itr = featureMomentsDataBase.begin(); itr != featureMomentsDataBase.end(); ++itr){
89 (*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)