Ask Your Question

user21's profile - activity

2020-05-15 16:41:44 -0500 received badge  Popular Question (source)
2015-11-06 06:56:55 -0500 received badge  Student (source)
2015-10-02 14:00:17 -0500 commented question extract index of flann in java

In Python bindings the method is simply "flann.save(filepath)", where flann is the variable that contains your Flann index. Maybe this helps.

2015-10-02 13:51:12 -0500 commented question Create features index (image database) and search (Python)

Ok, thank you very much for your help. I was finally able to concatenate the descriptors of a smaller image group (using numpy) and build the Flann index. For the search I use

indices, dists = flann.knnSearch(query_des, 2, params = {})

and then I use

for m,n in dists:
    if m < 0.7*n:
        ...

to search for good matches and check to which image they belong using the returned indices. I then count good matches for each image to rank them. If the query image has been indexed, it gets of course all the points (perfect match), and all other images get no points. What do I need to change in order for other images to get also points in case they show the same object? Do I have to increase knn in knnSearch?

2015-10-02 08:48:20 -0500 commented question Create features index (image database) and search (Python)

I've read both threads. But: When I add descriptors of each image

flann.add(des2)

train the matcher

flann.train()

and search

matches = flann.knnMatch(des1,k=2)

how do I know, which of the images match the query image the most? How do I get some kind of ranking and the image names or IDs? Or is this just to compare one image to a group of images and it tells you how good the query image matches the whole group?

2015-10-02 03:57:21 -0500 received badge  Editor (source)
2015-10-02 03:54:28 -0500 commented question Create features index (image database) and search (Python)

Can you post a snippet of your C++ code? Maybe that helps.

2015-10-02 03:35:43 -0500 commented question Create features index (image database) and search (Python)

Doesn't help :( In Opencv2.4 it's cv2.flann_Index:

help(cv2.flann_Index)

Returns

flann_Index([features, params[, distType]]) -> <flann_Index object>

But how do I add multiple images to this index? Do I simply have to concatenate the features of each image or is there an "add" function?

2015-10-02 03:01:57 -0500 commented question Create features index (image database) and search (Python)

From what I've read, Opencv's Python bindings certainly does have the FLANN index (flann_Index). But it is not documented like many other Opencv features.

2015-10-02 02:47:12 -0500 commented question Create features index (image database) and search (Python)

Ok :) Any advice on how to build the index (FLANN for example)? I've read much about it but couldn't actually find any code example.

2015-10-02 00:41:49 -0500 asked a question Create features index (image database) and search (Python)

I have almost 3 million images of different objects. Now I'd like to build an index (database), storing the features of each image (SIFT or SURF). Using this index and a single image, I'd like to find the k most similar images (showing the exact same object). I have been able to extract features and compare single images to each other. But comparing image by image for such a huge database takes forever.

How would I build an index of all images and search this index?

This may be a trivial questions for all the pros here, but I am very new to OpenCV (Python bindings) and very grateful for any help :) Thank you!