How to create custom descriptor to use with Bag of words?
Hi, is it possible to create a custom descriptor from features compiled with own feature extractor (not SIFT,SURF...) to use with a Bag of words and SVM implementation in OpenCV? So how to set up the Mat descriptor? Thanks in advance.
you will have to initialize the BOWImgDescriptorExtractor with FeatureExtractor / Matcher interfaces.
if you can supply that, and your features ae suitable (non-binary!) - why not ?
Sure, I have a set of features computed with a "Dense trajectory" algorithm but I don't know how to properly set up the "const Mat& descriptors" to be passed to the functions.
show, what you've got so far !
I'm using the "Dense trajectory" algorithm shown here http://lear.inrialpes.fr/people/wang/.... The features are computed one by one, and each one in a single line, with the following format: frameNum mean_x mean_y var_x var_y length scale x_pos y_pos t_pos Trajectory HOG HOF MBHx MBHy You can see more details at "The format of the computed features" paragraph in the above link. I need to create a Mat descriptor with these features.
creating a Mat from the numbers will be quite simple.
again, unfortunately, opencv's BOW classes require you to implement a DescriptorExtractor interface.
i'm not sure, if your data/control flow matches the assumptions here.
I am struggling with the same problem here... berak please can you specify the assumptions you are talking about... ( Is it about having no separate vector representing keypoints? ) PaoloPoli please update what you've got so far!
@Bhatt , again, opecv's BOW clases are tailored for SIFT or SURF feature descriptors.
Hi all,
I'm facing exactly the same problem PaoloPoli. I'm able to create a Mat with all the data and to make the vocabulary with this data, but no way to create the DescriptorExtractor.
Could anyone "iluminate" us.
Thanks in advance
P.D. Wich structure is necesary to create the DescriptorExtractor interface?
Regards