plugin  0.1.0
Classes | Public Types | Public Member Functions | List of all members
PerformanceMetrics Class Reference

Classes

struct  Metrics
 

Public Types

enum  MetricTypes { ALL , FPS , LATENCY }
 
using Clock = std::chrono::steady_clock
 
using TimePoint = std::chrono::time_point< Clock >
 
using Duration = Clock::duration
 
using Ms = std::chrono::duration< double, std::ratio< 1, 1000 > >
 
using Sec = std::chrono::duration< double, std::ratio< 1, 1 > >
 

Public Member Functions

 PerformanceMetrics (Duration timeWindow=std::chrono::seconds(1))
 
void update (TimePoint lastRequestStartTime, const cv::Mat &frame, cv::Point position={15, 30}, int fontFace=cv::FONT_HERSHEY_COMPLEX, double fontScale=0.75, cv::Scalar color={200, 10, 10}, int thickness=2, MetricTypes metricType=ALL)
 
void update (TimePoint lastRequestStartTime)
 
void paintMetrics (const cv::Mat &frame, cv::Point position={ 15, 30 }, int fontFace=cv::FONT_HERSHEY_COMPLEX, double fontScale=0.75, cv::Scalar color={ 200, 10, 10 }, int thickness=2, MetricTypes metricType=ALL) const
 
Metrics getLast () const
 
Metrics getTotal () const
 
void logTotal () const
 

Member Function Documentation

◆ paintMetrics()

void PerformanceMetrics::paintMetrics ( const cv::Mat &  frame,
cv::Point  position = { 15, 30 },
int  fontFace = cv::FONT_HERSHEY_COMPLEX,
double  fontScale = 0.75,
cv::Scalar  color = { 200, 10, 10 },
int  thickness = 2,
MetricTypes  metricType = ALL 
) const

Paints metrics over provided mat

Parameters
frameframe to paint over
positionleft top corner of text block
fontScalefont scale
colorfont color
thicknessfont thickness

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