Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Still in C++, but specifically for FAST, you can specify the threshold used by the algorithm:

cv::FastFeatureDetector detector(50);

Here, the threshold is set to 50. By increasing the threshold, you become less tolerant on the definition of a corner. It means that a candidate will need more contrast with its neighbors in order to be considered as a corner.

In other words, the higher the threshold, the smaller the number of corners you detect. You might use this as a first filter, and then retain the best of the remaining corner using cv::KeyPointsFilter::retainBest(keypoints, numberOfKeypointsToKeep) as suggested by Guanta.