I'm implementing an content-based image retrieval application which involves the Bag of Features model. I'm using cv::SIFT
as feature detector.
Anyway, the application performances are not great and I'm trying to improve them from the first step algorithm, which is detecting features.
Reading cv::SIFT::create()
documentation I've seen 3 parameters that caught my attention:
- nfeatures – The number of best features to retain. The features are ranked by their scores (measured in SIFT algorithm as the local contrast)
- contrastThreshold – The contrast threshold used to filter out weak features in semi-uniform (low-contrast) regions. The larger the threshold, the less features are produced by the detector.
- edgeThreshold – The threshold used to filter out edge-like features. Note that the its meaning is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are filtered out (more features are retained).
This means that increasing the first and third parameters, while decreasing the second, should improve the algorithm precision (with lower time-performances)?
I'm wondering this especially for the first parameters, where for example if we set nfeatures=2000
, it's going to detect exactly 2000
features, no matter if they are "interesting" or not. This means that is it going to detect "uninteresting" (so bad) keypoints?