Custom SIFT detector in OpenCV
Is there a way to specify custom SIFT detector parameters in OpenCV?
It seems that the FeatureDetector constructor does not take any parameter, whereas it seems possible to specify those parameters in the SIFT constructor.
I am working on logo detection. Some of the logos have very low texture information, so I would like to detect more keypoints when there are too few (I could increase the edgeThreshold of SIFT?).
Answer:
It is possible to create a custom SIFT descriptor extractor:
SIFT siftDetectorExtractor = SIFT(200, 3, 0.04, 15, 1.6);
Mat logo = imread("logoName.jpg");
vector<KeyPoint> keyPoints;
Mat sifts;
siftDetectorExtractor(logo, Mat(), keyPoints, sifts);
Just a small note to your own answer, you can still use the detector-class, e.g. cv::Ptr<cv::FeatureDetector> detector = cv::Ptr<cv::FeatureDetector>( new cv::SIFT( <your arguments> ) );