2022-11-03 09:38:28 +01:00
|
|
|
#include "lfr.h"
|
2022-11-10 14:42:14 +01:00
|
|
|
#include <opencv2/core/utils/logger.hpp>
|
2022-11-03 11:18:18 +01:00
|
|
|
|
2022-11-03 09:38:28 +01:00
|
|
|
int main(void)
|
|
|
|
{
|
2022-11-10 14:42:14 +01:00
|
|
|
//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;
|
2022-11-15 17:33:20 +01:00
|
|
|
const int gaussKernelSize = 21;
|
2022-11-16 11:18:56 +01:00
|
|
|
const int thresholdCanny1 = 50;
|
|
|
|
const int thresholdCanny2 = 100;
|
|
|
|
const int apertureSizeCanny = 3;
|
2022-11-10 20:55:23 +01:00
|
|
|
|
2022-11-16 11:18:56 +01:00
|
|
|
LFR lfr(videoHeight, videoWidth, thresholdBinary, gaussKernelSize, thresholdCanny1, thresholdCanny2, apertureSizeCanny);
|
2022-12-07 20:06:54 +01:00
|
|
|
lfr.saveOutputFlag = false;
|
|
|
|
lfr.videoFlag = true;
|
2022-11-03 09:38:28 +01:00
|
|
|
lfr.startLoop();
|
2022-11-10 20:55:23 +01:00
|
|
|
//To end the video stream, write any char in the console.
|
2022-11-10 14:42:14 +01:00
|
|
|
char a;
|
|
|
|
std::cin >> a;
|
2022-11-03 11:18:18 +01:00
|
|
|
lfr.endLoop();
|
2022-11-30 18:53:50 +01:00
|
|
|
}
|