diff --git a/src/processor_tracker_feature.cpp b/src/processor_tracker_feature.cpp index 88084407f27fd8eaec80c82df07d42633d9025c8..21782ed1215d428a0b2b68e45df6de9b5a5c16b9 100644 --- a/src/processor_tracker_feature.cpp +++ b/src/processor_tracker_feature.cpp @@ -112,31 +112,21 @@ void ProcessorTrackerFeature::reset() unsigned int ProcessorTrackerFeature::processNew(const unsigned int& _max_new_features) { - // std::cout << "ProcessorTrackerFeature::processNew()" << std::endl; - /* Rationale: A keyFrame will be created using the last Capture. - * First, we create the constraints from the existing Features in last, - * because the ones that we want to detect later on will not be constrained by anyone yet. - * Then, we work on this last Capture to detect new Features, + * First, we work on the last Capture to detect new Features, * When done, we need to track these new Features to the incoming Capture. * At the end, all new Features are appended to the lists of known Features in * the last and incoming Captures. */ - // Populate the last Capture with new Features. The result is in new_features_last_. unsigned int n = detectNewFeatures(_max_new_features); - // std::cout << "detected " << n << " new features!" << std::endl; - // Track new features from last to incoming. This will append new correspondences to matches_last_incoming - if (incoming_ptr_ != last_ptr_ && incoming_ptr_ != nullptr) // we do not do it the first time. - { - trackFeatures(new_features_last_, new_features_incoming_, matches_last_from_incoming_); + trackFeatures(new_features_last_, new_features_incoming_, matches_last_from_incoming_); - // Append all new Features to the incoming Captures' list of Features - incoming_ptr_->addFeatureList(new_features_incoming_); - } + // Append all new Features to the incoming Captures' list of Features + incoming_ptr_->addFeatureList(new_features_incoming_); // Append all new Features to the last Captures' list of Features last_ptr_->addFeatureList(new_features_last_); diff --git a/src/processor_tracker_feature.h b/src/processor_tracker_feature.h index 7e1d625a56a77ccb4210bed0a85bee99bfeb9d44..27f03ee7f5046556d04022eff571a44ba5a8c226 100644 --- a/src/processor_tracker_feature.h +++ b/src/processor_tracker_feature.h @@ -137,14 +137,12 @@ class ProcessorTrackerFeature : public ProcessorTracker virtual unsigned int processNew(const unsigned int& _max_features); /** \brief Detect new Features - * \param _capture_ptr Capture for feature detection. Defaults to incoming_ptr_. - * \param _new_features_list The list of detected Features. Defaults to member new_features_list_. + * \param _max_features maximum number of features detected * \return The number of detected Features. * * This function detects Features that do not correspond to known Features/Landmarks in the system. * - * The function sets the member new_features_list_, the list of newly detected features, - * to be used for landmark initialization. + * The function sets the member new_features_last_, the list of newly detected features. */ virtual unsigned int detectNewFeatures(const unsigned int& _max_features) = 0;