Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Extracting features with opencv for image classification

Hi everybody, I started to study computer vision and machine learning. I have a dataset of images and my goal is to extract the features with opencv3 (using different feature detection algorithms: Fast, GoodFeaturesToTrack, Mser, Star, Sift, Surf) and using the extracted matrix of features with an algorithm of machine learning for the images classification.

After a lot of search I've started with SIFT and SURF and I used the tecnique of bag of word for obtaining my final matrix. Now the problem comes with the other algorithms, because I've noted that, for example FAST, provide only a keypoints extractor but not a descriptor, so seem that I've to use one of following descriptor:

  1. SIFT
  2. SURF
  3. BRIEF
  4. BRISK
  5. ORB
  6. FREAK

But I have a lot a doubts...I've read here that BRISK / FREAK / ORB are not for image classification problem and, since they are binary descriptors, I can't use it with the implementation of bow in opencv because the kmeans works only with non binary descriptor. If I use, for example, only the SIFT descriptor with keypoint extracted with other algorithm (Fast, Star etc) the program works but has sense?I've search and it not seems good strategy (I report belove some lines of my algorithrm)

bowTrain = cv2.BOWKMeansTrainer(10)
detector = cv2.MSER_create()
sift = cv2.xfeatures2d.SIFT_create()
kp = detector.detect(img,None)
kp,des = sift.compute(img,kp)
bowTrain.add(des)

Is correct or there are other tecniques that I can use? Thank you for help.