// We just added twice the same feature in the list.
prc_apr->setLastDetections(features_in);
// at this point we have 0 detections in last, 2 detections in incoming with same id. We should keep only one in the final list of new detected features
prc_apr->detectNewFeatures(2,features_out);
ASSERT_EQ(features_out.size(),1);
//we add new different features in the list
features_in.clear();
features_in.push_back(f0);
features_in.push_back(f1);
//these features are set as the incoming detections due to processing an image
prc_apr->setLastDetections(features_in);
// at this point we have 0 detections in last, 2 detections in incoming with different ids, thus we should have 2 new detected features (if max_features set to >= 2)
prc_apr->detectNewFeatures(2,features_out);
ASSERT_EQ(features_out.size(),2);
// Put some of the features in the graph with createLandmark() and detect some of them as well as others with detectNewFeatures() running again.
WOLF_WARN("call to function createLandmark() in unit test for detectNewFeatures().")
C1->addFeature(f0);
LandmarkBasePtrlmk0=prc_apr->createLandmark(f0);
C1->addFeature(f1);
LandmarkBasePtrlmk1=prc_apr->createLandmark(f1);
// Add landmarks to the map
LandmarkBasePtrListlandmark_list;
landmark_list.push_back(lmk0);
landmark_list.push_back(lmk1);
problem->addLandmarkList(landmark_list);
//problem->print(4,1,1,1);
// Add 1 one more new feature to the detection list
features_in.push_back(f2);
prc_apr->setLastDetections(features_in);
// At this point we have 2 landmarks (for f0 and f1), and 3 detections (f0, f1 and f2).