blob: 8d44431afe1164ad1ad2a383b0115b5c3850aace (
plain) (
tree)
|
|
#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", signature::default_cfg())));
a.push_back(std::move(signature::from_file("img/z.jpg", signature::default_cfg())));
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;
}
|