Void Sentry
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
BaseDetectionModule Class Referenceabstract

An abstract base class (Interface) that defines the contract for detection algorithms. This class allows the Controller to remain agnostic of the specific detection method (e.g., Color, AI, or Motion) by providing a consistent interface. More...

#include <base_detection_module.h>

Inheritance diagram for BaseDetectionModule:
CameraDiffDetection TestDetection

Public Member Functions

virtual ~BaseDetectionModule ()=default
 Virtual destructor to ensure proper cleanup of derived classes.
 
virtual std::tuple< MoveX, MoveY > detect_object (camera_buffer_t frame)=0
 Analyzes a camera frame to locate a specific object.
 
virtual TrackSnapshot get_track_snapshot () const
 Latest tracker output, safe to call from another task (implementations copy under a lock).
 
virtual void reset ()
 Drop the current target and background. Implementations must make this safe to call from any task.
 
virtual DetectionStats get_stats () const
 Detection timings and counters for the stats line.
 

Detailed Description

An abstract base class (Interface) that defines the contract for detection algorithms. This class allows the Controller to remain agnostic of the specific detection method (e.g., Color, AI, or Motion) by providing a consistent interface.

Member Function Documentation

◆ detect_object()

virtual std::tuple< MoveX, MoveY > BaseDetectionModule::detect_object ( camera_buffer_t frame)
pure virtual

Analyzes a camera frame to locate a specific object.

Parameters
framePointer to the ESP32-CAM frame buffer (camera_fb_t).
Returns
std::tuple<uint8_t, uint8_t> Returns a tuple containing:
  • Index 0 (MoveX): Left | Right | Stay
  • Index 1 (MoveY): Up | Down | Stay

Implemented in CameraDiffDetection.

◆ get_stats()

virtual DetectionStats BaseDetectionModule::get_stats ( ) const
inlinevirtual

Detection timings and counters for the stats line.

Reimplemented in CameraDiffDetection.

◆ get_track_snapshot()

virtual TrackSnapshot BaseDetectionModule::get_track_snapshot ( ) const
inlinevirtual

Latest tracker output, safe to call from another task (implementations copy under a lock).

Returns
Default (Idle) snapshot when the module does not track.

Reimplemented in CameraDiffDetection.

◆ reset()

virtual void BaseDetectionModule::reset ( )
inlinevirtual

Drop the current target and background. Implementations must make this safe to call from any task.

Reimplemented in CameraDiffDetection.


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