51 lines
1020 B
C
Raw Normal View History

2022-11-10 17:07:39 +01:00
#pragma once
2022-11-03 09:23:30 +01:00
#include <iostream>
2022-11-10 14:41:27 +01:00
#include <future>
#include <thread>
2022-11-03 09:23:30 +01:00
#include <opencv2/opencv.hpp>
2022-11-10 14:41:27 +01:00
2022-11-03 09:23:30 +01:00
#include <input.h>
#include <processing.h>
#include <control_module.h>
#include <interpreter.h>
#include <intersection_handler.h>
2022-11-10 14:41:27 +01:00
2022-11-03 09:23:30 +01:00
using namespace cv;
class LFR
{
Input input;
Processing processing;
ControlModule controlModule;
Interpreter interpreter;
IntersectionHandler intersectionHandler;
2022-11-03 11:18:18 +01:00
volatile bool iAmLooping;
2022-11-03 09:23:30 +01:00
void loop();
2022-11-10 14:41:27 +01:00
thread loopThread;
int thresholdBinary;
int gaussKernelSize;
int thresholdCanny1;
int thresholdCanny2;
int apertureSizeCanny;
void provideOutput(Mat image,const FrameData& frameData, const Rect& roi);
2022-11-03 09:23:30 +01:00
public:
LFR() = delete;
LFR(int videoHeight, int videoWidth, int thresholdBinary, int gaussKernelSize, int thresholdCanny1, int thresholdCanny2, int apertureSizeCanny);
2022-11-03 09:23:30 +01:00
~LFR();
2022-11-10 14:41:27 +01:00
void startLoop();
2022-11-03 09:23:30 +01:00
void endLoop();
bool videoFlag;
bool saveOutputFlag;
std::string outputFileName;
2022-11-10 14:41:27 +01:00
2022-11-03 09:23:30 +01:00
};