Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

GTA-VI.cpp 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. #include "../arffHelper/Arff.h"
  2. #include "VideoWidget.h"
  3. #include "MainWindow.h"
  4. #include <QtGui>
  5. #include <iostream>
  6. using namespace std;
  7. int main(int argc, char *argv[])
  8. {
  9. QApplication app(argc, argv);
  10. QApplication::setApplicationName("GTA-VI (Ground Truth Annotation-Visualization Interface)");
  11. QCoreApplication::setApplicationVersion("version 2.0");
  12. // initialize parser
  13. QCommandLineParser parser;
  14. parser.addHelpOption();
  15. parser.addVersionOption();
  16. QCommandLineOption videoFileOption(QStringList() << "vf" << "video-file",
  17. QCoreApplication::translate("main", "Video file."),
  18. QCoreApplication::translate("main", "file"));
  19. parser.addOption(videoFileOption);
  20. QCommandLineOption arffFileOption(QStringList() << "af" << "arff-file",
  21. QCoreApplication::translate("main", "ARFF file."),
  22. QCoreApplication::translate("main", "file"));
  23. parser.addOption(arffFileOption);
  24. QCommandLineOption saveFileOption(QStringList() << "sf" << "save-file",
  25. QCoreApplication::translate("main", "Save file."),
  26. QCoreApplication::translate("main", "file"));
  27. parser.addOption(saveFileOption);
  28. QCommandLineOption primaryLabelOption(QStringList() << "pl" << "primary-label",
  29. QCoreApplication::translate("main", "Primary hand labelling attribute name."),
  30. QCoreApplication::translate("main", "name"));
  31. parser.addOption(primaryLabelOption);
  32. QCommandLineOption primaryLabelValueOption(QStringList() << "plv" << "primary-label-value",
  33. QCoreApplication::translate("main", "(Optional) Create a nominal primary labelling attribute. Ex. \"{fix,sacc,sp}\"."),
  34. QCoreApplication::translate("main", "name"),
  35. "");
  36. parser.addOption(primaryLabelValueOption);
  37. QCommandLineOption secondaryLabelOption(QStringList() << "sl" << "secondary-label",
  38. QCoreApplication::translate("main", "(Optional) Secondary hand labelling attribute name."),
  39. QCoreApplication::translate("main", "name"));
  40. parser.addOption(secondaryLabelOption);
  41. QCommandLineOption secondaryLabelValueOption(QStringList() << "slv" << "secondary-label-value",
  42. QCoreApplication::translate("main", "(Optional) Create a nominal secondary labelling attribute. Ex. \"{fix,sacc,sp}\"."),
  43. QCoreApplication::translate("main", "name"),
  44. "");
  45. parser.addOption(secondaryLabelValueOption);
  46. QCommandLineOption speedFilterOption(QStringList() << "sw" << "speed-window",
  47. QCoreApplication::translate("main", "The duration of the window over which we filter the speed signal. The default value is 100000 us."),
  48. QCoreApplication::translate("main", "double value"),
  49. "100000");
  50. parser.addOption(speedFilterOption);
  51. QCommandLineOption fullScreenOption(QStringList() << "f" << "full-screen",
  52. QCoreApplication::translate("main", "Start window in full screen mode."));
  53. parser.addOption(fullScreenOption);
  54. QCommandLineOption fovFileOption(QStringList() << "fov" << "field-of-view",
  55. QCoreApplication::translate("main", "Convert Equirectangular video to Field Of View"));
  56. parser.addOption(fovFileOption);
  57. QCommandLineOption headFileOption(QStringList() << "head" << "head-only-motion",
  58. QCoreApplication::translate("main", "Display only head motion in the equirectangular video"));
  59. parser.addOption(headFileOption);
  60. // parse arguments
  61. parser.process(app);
  62. MainWindow *pMainWindow;
  63. SetupValues setup;
  64. setup.gazeType = GazeType::EYE_PLUS_HEAD;
  65. if (parser.isSet("field-of-view"))
  66. setup.gazeType = GazeType::FOV;
  67. if (parser.isSet("head-only-motion"))
  68. setup.gazeType = GazeType::HEAD;
  69. setup.arffFile = parser.value(arffFileOption);
  70. setup.saveFile = parser.value(saveFileOption);
  71. setup.videoFile = parser.value(videoFileOption);
  72. setup.primaryLabel = parser.value(primaryLabelOption);
  73. setup.primaryLabelValues = parser.value(primaryLabelValueOption);
  74. setup.secondaryLabel = parser.value(secondaryLabelOption);
  75. setup.secondaryLabelValues = parser.value(secondaryLabelValueOption);
  76. setup.windowDur = parser.value(speedFilterOption).toDouble();
  77. pMainWindow = new MainWindow(setup);
  78. if (parser.isSet(fullScreenOption))
  79. pMainWindow->showFullScreen();
  80. else
  81. pMainWindow->show();
  82. return app.exec();
  83. }