Flann against a database of images

asked 2015-08-20 01:23:32 -0500

roshanpal gravatar image

Hi,

I am trying to build a image recognition system where users upload images to a web portal and then they can scan that image in a mobile phone and upon successful recognition, mobile displays some content to the user.

I have tried using FlannIndex with SURF, but since SURF is patented I can not use it in my application. So I started looking for FAST features with FREAK descriptor. I have built the descriptors for all the images using FREAK, but the problem is when I pass all the image descriptors to FlannBasedMatcher and it identifies any matches, how do I know the matched descriptors belong to which image in the database?

Has anyone tried doing this before?

Any help would be much appreciated. Thank you so much!

edit retag flag offensive close merge delete

Comments

'recognition' means what, exactly, in your context ?

are you trying to classify (like "a bus") or to find the closest image ?

how exactly are you trying to match the descriptors ?

how do you deal with one image returning 27 descriptors, and another image 18 ?

  • if KAZE works for you, it's another free float descriptor
  • if you have a fixed set of classes (different objects) , BOW might be a good idea.
berak gravatar imageberak ( 2015-08-20 02:37:19 -0500 )edit

I have a set of 100 images in a database. Now when I scan the same image using my mobile phone, it should take extract features of the scanned image and the features of images which are in the database and compare whether the scanned image is available in the database, if it is available it should tell, which image was scanned. That's what I meant by image recognition.

I was extracting features of all the images and building one large matrix of descriptions and passing the matrix to Flann Index for knnSearch. This way I didn't have to worry about number of descriptions in each image. I'll try KAZE features.

roshanpal gravatar imageroshanpal ( 2015-08-20 04:27:09 -0500 )edit

"I was extracting features of all the images and building one large matrix" - i guess, it won't work that way. indeed you have lost any information, where the descriptors ever belonged to (the image and the keypoint index). i guess, you'll either have to keep your own index (which img had how many descriptors) or make them all same size (by e.g. filtering out the best 50)

berak gravatar imageberak ( 2015-08-20 04:35:37 -0500 )edit

How can I filter out a best 50 descriptors? Is there a method in opencv which does this?

roshanpal gravatar imageroshanpal ( 2015-09-03 05:32:01 -0500 )edit