Adds preview functions

This commit is contained in:
2019-03-12 00:43:10 +01:00
parent db665025bd
commit 8706e241a4
3 changed files with 33 additions and 5 deletions
+10
View File
@@ -256,4 +256,14 @@ void DescriptorManager::outputRank(string imagename, int method) {
for (std::multiset<pair<unsigned long long, string>>::iterator it = distances.begin(); it != distances.end(); ++it) {
cout << "(" << it->first << ", " << it->second << ")" << endl;
}
}
//Just runs the preview functions of all the descriptors on given image.
//No need to init before this.
void DescriptorManager::generatePreviews(string imagename) {
fs::path imagePath(img_path / imagename);
Image* img = new Image(imagePath.generic_string());
for (int i = 0; i < numDescriptors; i++) {
descriptor_types[i]->preview(img);
}
}