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

Calculates the frame times and current/average frames per second for real-time performance tracking. More...

#include "Performance.hpp"

Public Member Functions

 Performance ()
 Constructs a new Performance object.
void StartTimer ()
 Start the internal timer.
void EndTimer ()
 End the internal timer.
PerformanceInformation GetInformation ()
 Get the PerformanceInformation struct.
std::vector< uint32_t > GetFrameTimes ()
 Get the times to compute each and every frame.
void ClearPerformanceInformation ()
 Clears all performance-related information.

Static Public Member Functions

static std::string GetTimeUnit ()
 Get the time unit for the frame times.
static uint32_t GetTimeUnitConversion ()
 Get the divisor needed to convert the frame times to seconds.

Private Attributes

PerformanceInformation m_performanceInformation
 The PerformanceInformation struct containing all performance-related information.
std::vector< uint32_t > m_frameTimes
 The frame times that have been measured.
std::chrono::time_point< std::chrono::high_resolution_clock > m_startTime
 The time the internal timer was started within StartTimer().

Detailed Description

Calculates the frame times and current/average frames per second for real-time performance tracking.

Definition at line 20 of file Performance.hpp.

Constructor & Destructor Documentation

◆ Performance()

LaneAndObjectDetection::Performance::Performance ( )
explicit

Constructs a new Performance object.

Definition at line 12 of file Performance.cpp.

Member Function Documentation

◆ StartTimer()

void LaneAndObjectDetection::Performance::StartTimer ( )

Start the internal timer.

Definition at line 16 of file Performance.cpp.

◆ EndTimer()

void LaneAndObjectDetection::Performance::EndTimer ( )

End the internal timer.

Definition at line 21 of file Performance.cpp.

◆ GetInformation()

PerformanceInformation LaneAndObjectDetection::Performance::GetInformation ( )

Get the PerformanceInformation struct.

Returns
PerformanceInformation The PerformanceInformation struct.

Definition at line 34 of file Performance.cpp.

◆ GetFrameTimes()

std::vector< uint32_t > LaneAndObjectDetection::Performance::GetFrameTimes ( )

Get the times to compute each and every frame.

Returns
std::vector<uint32_t> A list of the time to compute each frame.

Definition at line 39 of file Performance.cpp.

◆ GetTimeUnit()

std::string LaneAndObjectDetection::Performance::GetTimeUnit ( )
static

Get the time unit for the frame times.

Returns
std::string The time unit for the frame times.

Definition at line 44 of file Performance.cpp.

◆ GetTimeUnitConversion()

uint32_t LaneAndObjectDetection::Performance::GetTimeUnitConversion ( )
static

Get the divisor needed to convert the frame times to seconds.

Returns
uint32_t The divisor needed to convert the frame times to seconds.

Definition at line 49 of file Performance.cpp.

◆ ClearPerformanceInformation()

void LaneAndObjectDetection::Performance::ClearPerformanceInformation ( )

Clears all performance-related information.

Definition at line 54 of file Performance.cpp.

Member Data Documentation

◆ m_performanceInformation

PerformanceInformation LaneAndObjectDetection::Performance::m_performanceInformation
private

The PerformanceInformation struct containing all performance-related information.

Definition at line 75 of file Performance.hpp.

◆ m_frameTimes

std::vector<uint32_t> LaneAndObjectDetection::Performance::m_frameTimes
private

The frame times that have been measured.

Definition at line 80 of file Performance.hpp.

◆ m_startTime

std::chrono::time_point<std::chrono::high_resolution_clock> LaneAndObjectDetection::Performance::m_startTime
private

The time the internal timer was started within StartTimer().

Definition at line 85 of file Performance.hpp.


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