12345678910111213141516171819202122232425 |
- #include "lfr.h"
- #include <opencv2/core/utils/logger.hpp>
-
- int main(void)
- {
- //Disable opencv logging messages
- cv::utils::logging::setLogLevel(cv::utils::logging::LOG_LEVEL_WARNING);
-
- const int thresholdBinary = 140;
- const int videoHeight = 720;
- const int videoWidth = 1280;
- const int gaussKernelSize = 21;
- const int thresholdCanny1 = 50;
- const int thresholdCanny2 = 100;
- const int apertureSizeCanny = 3;
-
- LFR lfr(videoHeight, videoWidth, thresholdBinary, gaussKernelSize, thresholdCanny1, thresholdCanny2, apertureSizeCanny);
- lfr.saveOutputFlag = true;
- lfr.outputFileName = "/home/pi/Line-Following-Robot/AutonomousMode/tmp/test.jpg";
- lfr.startLoop();
- //To end the video stream, write any char in the console.
- char a;
- std::cin >> a;
- lfr.endLoop();
- }
|