// +-------------------------------- DISCLAIMER ---------------------------------+
// |                                                                             |
// | This application program is provided to you free of charge as an example.   |
// | Despite the considerable efforts of Euresys personnel to create a usable    |
// | example, you should not assume that this program is error-free or suitable  |
// | for any purpose whatsoever.                                                 |
// |                                                                             |
// | EURESYS does not give any representation, warranty or undertaking that this |
// | program is free of any defect or error or suitable for any purpose. EURESYS |
// | shall not be liable, in contract, in torts or otherwise, for any damages,   |
// | loss, costs, expenses or other claims for compensation, including those     |
// | asserted by third parties, arising out of or in connection with the use of  |
// | this program.                                                               |
// +-----------------------------------------------------------------------------+
#include <QApplication>
#include <QWidget>
#include "CameraWidget.h"

#include "Easy.h"
using namespace Euresys::Open_eVision;

int main(int argc, char *argv[ ])
{

  if (argc < 2)
  {
    std::cout << "Usage: " << argv[0] << " DEEP_LEARNING_TOOL CAMERA_PARAMS" << std::endl;
    std::cout << "   DEEP_LEARNING_TOOL: path to a model exported from Deep Learning Studio (.ecl file)" << std::endl;
    std::cout << "   CAMERA_PARAMS: For the FakeCamera, path towards the image or video file." << std::endl;

    return 0;
  }

  QApplication app(argc, argv);

  std::string deepLearningModel;
  std::string cameraParams;

  if (argc >= 2)
    deepLearningModel = argv[1];
  if (argc >= 3)
    cameraParams = argv[2];

  CameraWidget widget_(deepLearningModel, cameraParams);
  widget_.show();

  int ret = app.exec();
  return ret;
}
