8#include <opencv2/core/mat.hpp>
9#include <opencv2/videoio.hpp>
11#include "detectors/LaneDetector.hpp"
12#include "detectors/ObjectDetector.hpp"
13#include "helpers/Globals.hpp"
14#include "helpers/Information.hpp"
15#include "helpers/Performance.hpp"
51 const std::string& p_yoloFolderPath,
69 explicit VideoManager(
const std::string& p_inputVideoFilePath,
70 const std::string& p_yoloFolderPath,
99 explicit VideoManager(
const std::vector<std::string>& p_commandLineArguments);
120 const std::string& p_yoloFolderPath,
139 const std::string& p_yoloFolderPath,
Detects the lane the vehicle is in and other lane-related metrics.
YOLOv7 based object detector.
~VideoManager()
Destructs a VideoManager object.
ObjectDetector m_objectDetector
The object detector.
void SetProperties(const int32_t &p_inputVideoCamera, const std::string &p_yoloFolderPath, const Globals::ObjectDetectorTypes &p_objectDetectorTypes, const Globals::ObjectDetectorBackEnds &p_objectDetectorBackEnds, const Globals::ObjectDetectorBlobSizes &p_objectDetectorBlobSizes)
Set the properties of the VideoManager object.
VideoManagerInformation m_videoManagerInformation
The VideoManagerInformation struct containing all video manager-related information.
cv::VideoCapture m_inputVideo
Represents the input video stream.
VideoManager()
Constructs a new VideoManager object.
VideoManager & operator=(const VideoManager &&p_videoManager)=delete
Disable constructing a new VideoManager object using move assignment operator.
cv::VideoWriter m_outputVideo
Represents the output video stream.
LaneDetector m_laneDetector
The lane detector.
std::chrono::time_point< std::chrono::high_resolution_clock > m_saveOutputStartTime
The time that the output started to be saved locally.
void ToggleDebugMode()
Toggles the debug mode and whether to destroy the debug frames.
void ToggleSaveOutput()
Toggles whether the output video stream is saved locally. If toggled on, it creates a new file in the...
VideoManager(const VideoManager &p_videoManager)=delete
Disable constructing a new VideoManager object using copy constructor.
VideoManager(const VideoManager &&p_videoManager)=delete
Disable constructing a new VideoManager object using move constructor.
VideoManager & operator=(const VideoManager &p_videoManager)=delete
Disable constructing a new VideoManager object using copy assignment operator.
void RunLaneAndObjectDetector()
Orchestration function which contains the main program loop.
Performance m_performance
The frame time and current/average frames per second performance calculator.
Performance GetPerformance()
Get the performance object to extract performance-related information.
void Quit()
Destroys all windows and releases all input/output videos.
cv::Mat m_currentFrame
Represents the current frame being processed.
ObjectDetectorTypes
The type of object detector to use with an option to disable object detection. The tiny version is mo...
ObjectDetectorBackEnds
The supported backends for the object detector to run on. In theory, GPU should be significantly more...
ObjectDetectorBlobSizes
The supported blob sizes for the object detector to run with. The larger the blob size the more perfo...
Contains all Lane-and-Object-Detection objects.