Lane and Object Detection
Using OpenCV and YOLOv7
|
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(). |
Calculates the frame times and current/average frames per second for real-time performance tracking.
Definition at line 20 of file Performance.hpp.
|
explicit |
Constructs a new Performance object.
Definition at line 12 of file Performance.cpp.
void LaneAndObjectDetection::Performance::StartTimer | ( | ) |
Start the internal timer.
Definition at line 16 of file Performance.cpp.
void LaneAndObjectDetection::Performance::EndTimer | ( | ) |
End the internal timer.
Definition at line 21 of file Performance.cpp.
PerformanceInformation LaneAndObjectDetection::Performance::GetInformation | ( | ) |
Get the PerformanceInformation struct.
Definition at line 34 of file Performance.cpp.
std::vector< uint32_t > LaneAndObjectDetection::Performance::GetFrameTimes | ( | ) |
Get the times to compute each and every frame.
Definition at line 39 of file Performance.cpp.
|
static |
Get the time unit for the frame times.
Definition at line 44 of file Performance.cpp.
|
static |
Get the divisor needed to convert the frame times to seconds.
Definition at line 49 of file Performance.cpp.
void LaneAndObjectDetection::Performance::ClearPerformanceInformation | ( | ) |
Clears all performance-related information.
Definition at line 54 of file Performance.cpp.
|
private |
The PerformanceInformation struct containing all performance-related information.
Definition at line 75 of file Performance.hpp.
|
private |
The frame times that have been measured.
Definition at line 80 of file Performance.hpp.
|
private |
The time the internal timer was started within StartTimer().
Definition at line 85 of file Performance.hpp.