0

I have a dataset of images where I have applied the BRIEF method to. I used the following tutorial: http://docs.opencv.org/trunk/doc/py_tutorials/py_feature2d/py_brief/py_brief.html

Currently the size of the matrices vary quite dramatically. I am interested in fixing the size of the matrices but I do not know how to. If there are solutions out there which use another method such as SIFT and SURF then please let me know.

berak
  • 39,159
  • 9
  • 91
  • 89
GStack
  • 33
  • 5
  • as a preprocessing you should normalize your images, so that your BRIEF parameters (thresholds) are comparable between images. Then what do you want to do with those keypoints, why do you have to use the same number per image? This might be important to choose a method that reduces or increases the number of keypoints on the images... – Micka Feb 20 '15 at 13:15
  • I am working on a project that applies LSH to near image duplicate detection. I use the BRIEF key points and convert them into a unary representation. Once I get the unary representation, I workout the hamming distance between two images unary representation. However, the issue that when you get different numbers of key points in images you can not apply hamming distance. @Micka How do you suggest I normalise the images? – GStack Feb 21 '15 at 14:38

2 Answers2

0

The KeyPoints have a response fields which means larger is better.
You can sort your KeyPoints by this value and just keep the top N (or up to N).
Calculate the descriptor only for the selected KeyPoints.

Adi Shavit
  • 16,743
  • 5
  • 67
  • 137
0

You can use other methods instead of SIFT and SURF like ORB, BRISK, FREAK (and BRIEF ofc).

Unfortunately not all the keypoints detected can be described using BRIEF, for example. What can you do to get around this is:

  • Detect a large number of keypoints.
  • Calculate a descriptor for each of the points detected (using one of the methods above).
  • Save only a fixed number of N descriptors for each image.
  • If, for some images, the number of keypoints detected is less than N, change the value of detector's threshold so it can detect more keypoints.
zedv
  • 1,459
  • 12
  • 23