Lane and Object Detection
Using OpenCV and YOLOv7
Loading...
Searching...
No Matches
LaneAndObjectDetection::FrameBuilder Class Reference

Builds OpenCV frames to be displayed to the user. More...

#include "FrameBuilder.hpp"

Public Member Functions

 FrameBuilder ()=delete
 Disable constructing a new FrameBuilder object.

Static Public Member Functions

static void UpdateFrame (cv::Mat &p_frame, const ObjectDetectionInformation &p_objectDetectionInformation, const LaneDetectionInformation &p_laneDetectionInformation, const PerformanceInformation &p_performanceInformation, const VideoManagerInformation &p_videoManagerInformation)
 Updates p_frame with object detection, lane detection, performance and video manager information.

Static Private Member Functions

static void AddObjectDetectorInformation (cv::Mat &p_frame, const ObjectDetectionInformation &p_objectDetectionInformation, const bool &p_debugMode)
 Adds object detection information to p_frame.
static void AddLaneDetectorInformation (cv::Mat &p_frame, const LaneDetectionInformation &p_laneDetectionInformation, const bool &p_debugMode)
 Adds lane detection information to p_frame.
static void AddPerformanceInformation (cv::Mat &p_frame, const PerformanceInformation &p_performanceInformation, const bool &p_debugMode)
 Adds performance information to p_frame.
static void AddVideoManagerInformation (cv::Mat &p_frame, const VideoManagerInformation &p_videoManagerInformation)
 Adds video manager information to p_frame.
static void AddBackgroundRectAndCentredText (cv::Mat &p_frame, const cv::Rect &p_backgroundRect, const std::string &p_text, const double &p_fontScale=Globals::G_FONT_DEFAULT_SCALE)
 Adds p_backgroundRect to p_frame and centers p_text within p_backgroundRect.

Detailed Description

Builds OpenCV frames to be displayed to the user.

Definition at line 21 of file FrameBuilder.hpp.

Member Function Documentation

◆ UpdateFrame()

void LaneAndObjectDetection::FrameBuilder::UpdateFrame ( cv::Mat & p_frame,
const ObjectDetectionInformation & p_objectDetectionInformation,
const LaneDetectionInformation & p_laneDetectionInformation,
const PerformanceInformation & p_performanceInformation,
const VideoManagerInformation & p_videoManagerInformation )
static

Updates p_frame with object detection, lane detection, performance and video manager information.

Parameters
p_frameThe frame to update.
p_objectDetectionInformationThe information needed by FrameBuilder to update frame with object detection information.
p_laneDetectionInformationThe information needed by FrameBuilder to update frame with lane detection information.
p_performanceInformationThe information needed by FrameBuilder to update frame with performance information.
p_videoManagerInformationThe information needed by FrameBuilder to update frame with video manager information.

Definition at line 20 of file FrameBuilder.cpp.

◆ AddObjectDetectorInformation()

void LaneAndObjectDetection::FrameBuilder::AddObjectDetectorInformation ( cv::Mat & p_frame,
const ObjectDetectionInformation & p_objectDetectionInformation,
const bool & p_debugMode )
staticprivate

Adds object detection information to p_frame.

Parameters
p_frameThe frame to update.
p_objectDetectionInformationThe information needed by FrameBuilder to update frame with object detection information.
p_debugModeWhether in debug mode.

Definition at line 35 of file FrameBuilder.cpp.

◆ AddLaneDetectorInformation()

void LaneAndObjectDetection::FrameBuilder::AddLaneDetectorInformation ( cv::Mat & p_frame,
const LaneDetectionInformation & p_laneDetectionInformation,
const bool & p_debugMode )
staticprivate

Adds lane detection information to p_frame.

Parameters
p_frameThe frame to update.
p_laneDetectionInformationThe information needed by FrameBuilder to update frame with lane detection information.
p_debugModeWhether in debug mode.

Definition at line 73 of file FrameBuilder.cpp.

◆ AddPerformanceInformation()

void LaneAndObjectDetection::FrameBuilder::AddPerformanceInformation ( cv::Mat & p_frame,
const PerformanceInformation & p_performanceInformation,
const bool & p_debugMode )
staticprivate

Adds performance information to p_frame.

Parameters
p_frameThe frame to update.
p_performanceInformationThe information needed by FrameBuilder to update frame with performance information.
p_debugModeWhether in debug mode.

Definition at line 92 of file FrameBuilder.cpp.

◆ AddVideoManagerInformation()

void LaneAndObjectDetection::FrameBuilder::AddVideoManagerInformation ( cv::Mat & p_frame,
const VideoManagerInformation & p_videoManagerInformation )
staticprivate

Adds video manager information to p_frame.

Parameters
p_frameThe frame to update.
p_videoManagerInformationThe information needed by FrameBuilder to update frame with video manager information.

Definition at line 107 of file FrameBuilder.cpp.

◆ AddBackgroundRectAndCentredText()

void LaneAndObjectDetection::FrameBuilder::AddBackgroundRectAndCentredText ( cv::Mat & p_frame,
const cv::Rect & p_backgroundRect,
const std::string & p_text,
const double & p_fontScale = Globals::G_FONT_DEFAULT_SCALE )
staticprivate

Adds p_backgroundRect to p_frame and centers p_text within p_backgroundRect.

Parameters
p_frameThe frame to update.
p_backgroundRectThe text background rect to add to p_frame.
p_textThe text to add to p_frame.
p_fontScaleThe font scale of p_text.

Definition at line 135 of file FrameBuilder.cpp.


The documentation for this class was generated from the following files: