Main.cpp 554 B

1234567891011121314151617181920212223242526
  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(&sll2, &img);
  21. std::cout << resultat.first << " , " << resultat.second << std::endl;
  22. }