Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Making FLANN index editable and savable to disk?

I have my FLANN index here:

flann_params = dict(algorithm = 1, trees = 4)

matcher = cv2.FlannBasedMatcher(flann_params, {})

And then I add descriptors of training images to it in a loop:

matcher.add([descriptors])

And then I train it:

matcher.train()

Few more related methods:

matcher.clear()

Clears the train descriptor collection

matcher.empty()

Does the same thing ( right?)

But what I really want is,

A) to store the descriptors to disk and simply load them into the matcher and then train it

B) Make the matcher editable: if I delete an image off the disk, it shouldn't be found by the matcher. Maybe something like matcher.clear(index_of_image_deleted)

C) Save the matcher data to disk so that I don't have to train images everytime I run the program. (Maybe save descriptors to disk?)

Making FLANN index editable and savable to disk?

I have my FLANN index here:

flann_params = dict(algorithm = 1, trees = 4)

matcher = cv2.FlannBasedMatcher(flann_params, {})

And then I add descriptors of training images to it in a loop:

matcher.add([descriptors])

And then I train it:

matcher.train()

Few more related methods:

matcher.clear()

Clears the train descriptor collection

matcher.empty()

Does the same thing ( right?)

But what I really want is,

A) to store the descriptors to disk and simply load them into the matcher and then train it

OR

Save the matcher data to disk so that I don't have to train images everytime I run the program.

B) Make the matcher editable: if I delete an image off the disk, it shouldn't be found by the matcher. Maybe something like matcher.clear(index_of_image_deleted)

C) Save the matcher data to disk so that I don't have to train images everytime I run the program. (Maybe save descriptors to disk?)

click to hide/show revision 3
terminology correction

Making FLANN index matcher editable and savable to disk?

I have my FLANN index matcher here:

flann_params = dict(algorithm = 1, trees = 4)

matcher = cv2.FlannBasedMatcher(flann_params, {})

And then I add descriptors of training images to it in a loop:

matcher.add([descriptors])

And then I train it:

matcher.train()

Few more related methods:

matcher.clear()

Clears the train descriptor collection

matcher.empty()

Does the same thing ( right?)

But what I really want is,

A) to store the descriptors to disk and simply load them into the matcher and then train it

OR

Save the matcher data to disk so that I don't have to train images everytime I run the program.

B) Make the matcher editable: if I delete an image off the disk, it shouldn't be found by the matcher. Maybe something like matcher.clear(index_of_image_deleted)

click to hide/show revision 4
retagged

updated 2014-09-11 02:49:40 -0500

berak gravatar image

Making FLANN matcher editable and savable to disk?

I have my FLANN matcher here:

flann_params = dict(algorithm = 1, trees = 4)

matcher = cv2.FlannBasedMatcher(flann_params, {})

And then I add descriptors of training images to it in a loop:

matcher.add([descriptors])

And then I train it:

matcher.train()

Few more related methods:

matcher.clear()

Clears the train descriptor collection

matcher.empty()

Does the same thing ( right?)

But what I really want is,

A) to store the descriptors to disk and simply load them into the matcher and then train it

OR

Save the matcher data to disk so that I don't have to train images everytime I run the program.

B) Make the matcher editable: if I delete an image off the disk, it shouldn't be found by the matcher. Maybe something like matcher.clear(index_of_image_deleted)