diff --git a/include/rovio/ImagePyramid.hpp b/include/rovio/ImagePyramid.hpp index 502a35ca..fb35aab9 100644 --- a/include/rovio/ImagePyramid.hpp +++ b/include/rovio/ImagePyramid.hpp @@ -134,8 +134,9 @@ class ImagePyramid{ * @param l - Pyramid level at which the corners should be extracted. * @param detectionThreshold - Detection threshold of the used cv::FastFeatureDetector. * See http://docs.opencv.org/trunk/df/d74/classcv_1_1FastFeatureDetector.html + * @param valid_radius - Radius inside which a feature is considered valid (as ratio of shortest image side) */ - void detectFastCorners(FeatureCoordinatesVec & candidates, int l, int detectionThreshold) const{ + void detectFastCorners(FeatureCoordinatesVec & candidates, int l, int detectionThreshold, double valid_radius = std::numeric_limits::max()) const{ std::vector keypoints; #if (CV_MAJOR_VERSION < 3) cv::FastFeatureDetector feature_detector_fast(detectionThreshold, true); diff --git a/include/rovio/ImgUpdate.hpp b/include/rovio/ImgUpdate.hpp index 0f440925..084cf4b1 100644 --- a/include/rovio/ImgUpdate.hpp +++ b/include/rovio/ImgUpdate.hpp @@ -985,7 +985,7 @@ ImgOutlierDetection,false>{ const double t1 = (double) cv::getTickCount(); candidates_.clear(); for(int l=endLevel_;l<=startLevel_;l++){ - meas.aux().pyr_[camID].detectFastCorners(candidates_,l,fastDetectionThreshold_); + meas.aux().pyr_[camID].detectFastCorners(candidates_,l,fastDetectionThreshold_, mpMultiCamera_->cameras_[camID].valid_radius_); } const double t2 = (double) cv::getTickCount(); if(verbose_) std::cout << "== Detected " << candidates_.size() << " on levels " << endLevel_ << "-" << startLevel_ << " (" << (t2-t1)/cv::getTickFrequency()*1000 << " ms)" << std::endl;