Smart Camera ESP32
An AI-driven, real-time Sentry Turret platform leveraging asynchronous I/O and computer vision to deliver high-precision autonomous motion tracking on resource-constrained embedded hardware.
Loading...
Searching...
No Matches
DetectionMetrics Class Reference

Performance and health metrics for the Motion Detection engine. More...

#include <motion_data.h>

Public Member Functions

 DetectionMetrics ()
 Constructor: Initializes all metrics to zero.
 
Metric Mutators (Setters)
void set_detection_time_ms (uint32_t time)
 
void set_pixels_changed (int count)
 
void set_motion_confidence (float conf)
 Sets confidence and clamps value between 0.0 and 1.0.
 
void set_consecutive_motion_frames (int count)
 
void set_consecutive_static_frames (int count)
 
void set_total_detections (uint32_t count)
 
void set_total_frames (uint32_t count)
 
void set_last_frame_timestamp (uint32_t ts)
 
void set_average_fps (uint32_t fps)
 
Metric Accessors (Getters)
uint32_t get_detection_time_ms () const
 
int get_pixels_changed () const
 
float get_motion_confidence () const
 
int get_consecutive_motion_frames () const
 
int get_consecutive_static_frames () const
 
uint32_t get_total_detections () const
 
uint32_t get_total_frames () const
 
uint32_t get_last_frame_timestamp () const
 
uint32_t get_average_fps () const
 

Detailed Description

Performance and health metrics for the Motion Detection engine.

Tracks computational overhead (latency) and statistical trends such as FPS and detection consistency. This data is primarily used for the Web Dashboard telemetry and debugging.

Member Function Documentation

◆ get_average_fps()

uint32_t DetectionMetrics::get_average_fps ( ) const
inline
Returns
Current performance in frames per second.

◆ get_consecutive_motion_frames()

int DetectionMetrics::get_consecutive_motion_frames ( ) const
inline
Returns
Number of frames motion has been continuously present.

◆ get_consecutive_static_frames()

int DetectionMetrics::get_consecutive_static_frames ( ) const
inline
Returns
Number of frames the scene has been continuously static.

◆ get_detection_time_ms()

uint32_t DetectionMetrics::get_detection_time_ms ( ) const
inline
Returns
Processing time in milliseconds.

◆ get_last_frame_timestamp()

uint32_t DetectionMetrics::get_last_frame_timestamp ( ) const
inline
Returns
Millis timestamp of last update.

◆ get_motion_confidence()

float DetectionMetrics::get_motion_confidence ( ) const
inline
Returns
Confidence score as a percentage (0.0 - 1.0).

◆ get_pixels_changed()

int DetectionMetrics::get_pixels_changed ( ) const
inline
Returns
Count of changed pixels.

◆ get_total_detections()

uint32_t DetectionMetrics::get_total_detections ( ) const
inline
Returns
Accumulated detection count.

◆ get_total_frames()

uint32_t DetectionMetrics::get_total_frames ( ) const
inline
Returns
Accumulated frame count.

◆ set_motion_confidence()

void DetectionMetrics::set_motion_confidence ( float conf)
inline

Sets confidence and clamps value between 0.0 and 1.0.

Parameters
confThe raw float confidence score.

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