Pergunta

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?).

Foi útil?

Solução

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);

or use the detector-class:

Ptr<FeatureDetector> detector = Ptr<FeatureDetector>( new SIFT( <your arguments> ) );
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top