diff options
author | 2022-08-27 00:55:38 -0400 | |
---|---|---|
committer | 2022-08-27 00:55:38 -0400 | |
commit | 96fc17b99d56eb636c894c5be9ab39bfdb4ba454 (patch) | |
tree | f558b185b55eddc83e9eb77a695b93290000a96e /tests/signature_test.cpp | |
download | deduper-96fc17b99d56eb636c894c5be9ab39bfdb4ba454.tar.xz |
Initial code dump.
Diffstat (limited to 'tests/signature_test.cpp')
-rw-r--r-- | tests/signature_test.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/signature_test.cpp b/tests/signature_test.cpp new file mode 100644 index 0000000..0b6b1f9 --- /dev/null +++ b/tests/signature_test.cpp @@ -0,0 +1,20 @@ +#include <cstdio> +#include <vector> +#include "signature.hpp" +//#include <opencv2/highgui.hpp> +int main() +{ + std::vector<signature> a; + a.push_back(std::move(signature::from_file("img/x.jpg"))); + a.push_back(std::move(signature::from_file("img/z.jpg"))); + for (size_t i = 0; i < a.size(); ++i) + for (size_t j = 0; j < a.size(); ++j) + { + printf("%lu <-> %lu:", i, j); + double d = a[i].distance(a[j]); + double l = a[i].length() + a[j].length(); + printf("%f\n", d / l); + } + //while (cv::waitKey(0) != 'q'); + return 0; +} |