Ask Your Question
0

Using DescriptorMatcher for generic features

asked 2015-10-02 02:18:40 -0600

kbarna gravatar image

Hi,

I'm wondering if I can use (and how?) the DescriptorMatcher class to classify other data than keypoints. More precisely I would like to use them for texture classification.

I have N texture classes (C1, C2,...CN), each with K features (let's say the Haralick features: F1...FK). For each texture I have several patches used for training (so texture Ci is described by a [Mi*K] matrix where Miis the number of patches). Now, I would like to classify a patch P in one of those texture classes.

I know I could write my own classifier (KNN, naive Bayesian), but I'm wondering if one of the DescriptorMatcher classes could do the same? The documentation of this class is very sparse and I only found examples classifying keypoint data obtained fromalgorithms like SIFT, SURF, BRIEF...). Or are there other methods for this in OpenCV?

Thanks for any hints!

edit retag flag offensive close merge delete

Comments

1

imho, DescriptorMatcher is not meant to be used for classifying at all. it's more a filter, that sieves out corresponding keypoint/descriptor sets from 2 images, useful for stiching, finding homography and such.

i'd rather go, and just throw e.g. those haralick features into an SVM

berak gravatar imageberak ( 2015-10-02 02:34:48 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2015-10-07 08:44:33 -0600

kbarna gravatar image

updated 2015-10-09 07:01:47 -0600

I answer my own question: I was looking for the good thing, only on the bad place. I was mislead of knnMatch (k nearest neighbour) function from the DescriptorMatcher module.

For this problem the classifiers in the ml (machine learning) module should be used instead those from the DescriptorMatcher module.

The ml module contains all the necessary classifiers, from k-nearest neighbors to SVM or the naive bayesian classifier.

edit flag offensive delete link more

Comments

Once you get enough karma, do not forget to accept your own question :)

StevenPuttemans gravatar imageStevenPuttemans ( 2015-10-08 06:40:57 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-10-02 02:18:40 -0600

Seen: 330 times

Last updated: Oct 09 '15