Flann against a database of images
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!
'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 ?
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.
"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)
How can I filter out a best 50 descriptors? Is there a method in opencv which does this?