Ask Your Question

Problems in adding a new descriptor to OpenCV

asked 2014-06-18 13:42:56 -0500

updated 2014-06-18 17:38:56 -0500


I'm trying to add the BinBoost descriptor to OpenCV. The sources can be found here: link text

It's really straightforward, as the authors already implemented the DescriptorExtractor class.

The problem is that the constructors are dependent of certain binary files as input. They use them to initialize their inner structures. So one can easily construct a BinBoostDescriptorExtractor as

BinBoostDescriptorExtractor BinBoostDescriptorExtractorInstance("D:\\OpenCV_2_4_9\\opencv\\sources\\modules\\features2d\\src\\binboost_256.bin");

But one cannot use the simpler "create" command as:

Ptr<DescriptorExtractor> descriptor = DescriptorExtractor::create("BinBoost");

What can I do about it? Will OpenCV moderators be willing to accept a new descriptor (or more precisely - a family of 3 descriptors) that can't be initialized using "create"?

Thanks in advance,


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-06-20 05:18:51 -0500

First of all, thanks for taking time to port a new descriptor into OpenCV!

I haven't read the code for BinBoostDescriptor, but I guess they have default parameters, than can be retrieved without reading a file, right? So, you need to create a constructor with default parameters to initialize the structures. After that, you could use the "set" methods of Algorithm class (super class of DescriptorExtractor) to set your parameters to the detector.

I don't think OpenCV moderator will allow descriptors than can't be initialized with "create", but maybe they are opened to extension of DescriptorExtractor constructor with a parameters structure... You could ask on the bug report, as a feature request.

edit flag offensive delete link more


Thanks for the answer. Actually, the descriptor doesn't have default parameters - it read's all the parameters from files given to the constructor. I'll be glad to ask the moderators , is this the right place: ?

GilLevi gravatar imageGilLevi ( 2014-06-20 07:43:39 -0500 )edit

By the way, thanks for your help regarding BOW - I used your pseudo code in my blog post:

GilLevi gravatar imageGilLevi ( 2014-06-20 07:47:13 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2014-06-18 13:42:56 -0500

Seen: 283 times

Last updated: Jun 20 '14