Sorting of descriptors and images, based on matched features