Main.cpp 717 B

12345678910111213141516171819202122232425262728
  1. #include <iostream>
  2. #include <QImage>
  3. #include "SLList.hpp"
  4. void usage(char** argv)
  5. {
  6. std::cout << "usage : " << argv[0] << " json1 json2 image" << std::endl;
  7. }
  8. int main(int argc, char** argv)
  9. {
  10. if(argc!=4)
  11. {
  12. usage(argv);
  13. return EXIT_FAILURE;
  14. }
  15. std::string fichier1 = argv[1];
  16. std::string fichier2 = argv[2];
  17. SLList sll1(fichier1);
  18. SLList sll2(fichier2);
  19. QImage img(argv[3]);
  20. std::pair<double, int> resultat = sll1.distance_avg(&sll2, &img);
  21. std::cout << "( " << resultat.first << " , " << resultat.second << " )" << std::endl;
  22. //resultat = sll1.distance_hausdorff(&sll2, &img);
  23. //std::cout << "( " << resultat.first << " , " << resultat.second << " )" << std::endl;
  24. }