Fix number of generated SIFT features
While playing around with the SIFT feature extractor, I observed the following problems:
-
When creating the keypoint list, the flag
bHasMaxis defined the wrong way which would lead to unexpected behaviour in no limit is set. If there is a limit, then too many features are copied, but this is handled implicitly later on making this hard to recognize. -
I observed that in many cases the number of extracted features (at least what is returned by
GetFeatureNum()) exceed the specified limit. The functionLimitFeatureCount()removes overflowing levels iteratively until the count would drop below the limit in the next iteration. This is fixed by partially removing this last contributing level to match the limit. -
Although the feature extraction limit can be controlled in the config file, the Bundler uses a hard-coded number of
150. Since the value in the config file is1024, the above errors were unfortunately not catched. The second commit adjusts the config file and removes the hard-coded value.