Ask Your Question
0

Custom SIFT detector in OpenCV

asked 2014-03-31 11:56:34 -0600

arthur.sw gravatar image

updated 2014-04-01 04:21:57 -0600

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);
edit retag flag offensive close merge delete

Comments

1

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

Guanta gravatar imageGuanta ( 2014-04-01 07:53:01 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-04-07 09:39:36 -0600

arthur.sw gravatar image

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> ) );
edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-03-31 11:56:34 -0600

Seen: 828 times

Last updated: Apr 07 '14