I am trying to make a program that will find similar images from a dataset of images. The steps are
- extract SURF descriptors for all images
- store the descriptors
- Apply knn on the stored descriptors
- Match the stored descriptors to the query image descriptor using kNN
Now each images SURF descriptor will be stored as Hierarchical k-means tree, now do I store each tree as a separate file or is it possible to build some sort of single tree with all the images descriptors and updated as images are added to dataset.
Use a KD-Tree instead. You will be able to build the hierarchical K-dimensional tree, you just need figure out what sort of information is sent down the tree to be stored. You can save the vectors/descriptors of the images onto the disk, load the KD-Tree every time you start-up your program. Newly computer vectors/descriptors can be both sent to the tree and the disk
Hope this helps