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
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, MoveYdetect_object (camera_buffer_t frame)=0
 Analyzes a camera frame to locate a specific object.
 
virtual MotionData get_motion_data () const
 Get the latest motion data from the detection module.
 

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_motion_data()

virtual MotionData BaseDetectionModule::get_motion_data ( ) const
inlinevirtual

Get the latest motion data from the detection module.

This method provides access to the motion metrics detected. Derived classes should override this to return their current metrics.

Returns
MotionData containing the latest detection results.

Reimplemented in CameraDiffDetection.


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