Projektarbeit Line Following Robot bei Prof. Chowanetz im WS22/23
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

autonomous_mode_main.cpp 820B

12345678910111213141516171819202122232425
  1. #include "lfr.h"
  2. #include <opencv2/core/utils/logger.hpp>
  3. int main(void)
  4. {
  5. //Disable opencv logging messages
  6. cv::utils::logging::setLogLevel(cv::utils::logging::LOG_LEVEL_WARNING);
  7. const int thresholdBinary = 140;
  8. const int videoHeight = 720;
  9. const int videoWidth = 1280;
  10. const int gaussKernelSize = 21;
  11. const int thresholdCanny1 = 50;
  12. const int thresholdCanny2 = 100;
  13. const int apertureSizeCanny = 3;
  14. LFR lfr(videoHeight, videoWidth, thresholdBinary, gaussKernelSize, thresholdCanny1, thresholdCanny2, apertureSizeCanny);
  15. lfr.saveOutputFlag = true;
  16. lfr.outputFileName = "/home/pi/Line-Following-Robot/AutonomousMode/tmp/test.jpg";
  17. lfr.startLoop();
  18. //To end the video stream, write any char in the console.
  19. char a;
  20. std::cin >> a;
  21. lfr.endLoop();
  22. }