Line-Following-Robot/AutonomousMode/autonomous_mode_main.cpp

23 lines
598 B
C++
Raw Normal View History

#include "lfr.h"
#include <opencv2/core/utils/logger.hpp>
2022-11-03 11:18:18 +01:00
int main(void)
{
//Disable opencv logging messages
cv::utils::logging::setLogLevel(cv::utils::logging::LOG_LEVEL_WARNING);
2022-11-14 11:37:38 +01:00
const int thresholdBinary = 140;
2022-11-30 18:53:50 +01:00
const int videoHeight = 720;
const int videoWidth = 1280;
const int gaussKernelSize = 11;
LFR lfr(videoHeight, videoWidth, thresholdBinary, gaussKernelSize);
lfr.saveOutputFlag = false;
lfr.videoFlag = true;
lfr.startLoop();
//To end the video stream, write any char in the console.
char a;
std::cin >> a;
2022-11-03 11:18:18 +01:00
lfr.endLoop();
2022-11-30 18:53:50 +01:00
}