src/feature_detector/src/reconfigure_parameter_manager.cpp
// TODO: Improve this. Features are recomputed a lot of times.
Improve this. Features are recomputed a lot of times.
Improve this . Features are recomputed a lot of times .
void ReconfigureParameterManager::reconfigureCallback(
    feature_detector::ParametersConfig& config, uint32_t)
{
  setObjectName(config.object_name);
  setHessianThreshold(config.hessian_threshold);
  setNumOctaves(config.num_octaves);
  setNumOctaveLayers(config.num_octave_layers);
  setExtended(config.extended);
  setUpright(config.upright);
  setNormType(static_cast<NormType>(config.norm_type));
  setCrossCheck(config.cross_check);
  setMatchDistanceThreshold(config.match_distance_threshold);
  setRansacReprojThreshold(config.ransac_reproj_threshold);
  if (config.save_selection) {
    config.save_selection = false;
    saveSelection(config.filename);
  }
  if (config.load_selection) {
    config.load_selection = false;
    loadSelection(config.filename);
  }
}
void ReconfigureParameterManager :: reconfigureCallback ( feature_detector :: ParametersConfig & config , uint32_t ) { setObjectName ( config . object_name ) ; setHessianThreshold ( config . hessian_threshold ) ; setNumOctaves ( config . num_octaves ) ; setNumOctaveLayers ( config . num_octave_layers ) ; setExtended ( config . extended ) ; setUpright ( config . upright ) ; setNormType ( static_cast < NormType > ( config . norm_type ) ) ; setCrossCheck ( config . cross_check ) ; setMatchDistanceThreshold ( config . match_distance_threshold ) ; setRansacReprojThreshold ( config . ransac_reproj_threshold ) ; if ( config . save_selection ) { config . save_selection = false ; saveSelection ( config . filename ) ; } if ( config . load_selection ) { config . load_selection = false ; loadSelection ( config . filename ) ; } }
TODO: Improve this.
TODO : Improve this .
/*
  object_name_ = config.object_name;

  // surf_->setHessianThreshold(config.groups.surf.hessian_threshold);
  // groups are not yet fully implemented
  // (see answers.ros.org/question/101506)
  surf_->setHessianThreshold(config.hessian_threshold);
  surf_->setNOctaves(config.num_octaves);
  surf_->setNOctaveLayers(config.num_octave_layers);
  surf_->setExtended(config.extended);
  surf_->setUpright(config.upright);

  matcher_.reset(new cv::BFMatcher {config.norm_type, config.cross_check});

  match_distance_thresh_ = config.match_distance_threshold;
  ransac_reproj_thresh_ = config.ransac_reproj_threshold;
  */ // updateFeaturesAndMatcher();