11#include <freertos/FreeRTOS.h>
12#include <freertos/task.h>
56 void reset()
override;
68 static void task_entry(
void* arg);
73 Pipeline* _pipeline =
nullptr;
75 TaskHandle_t _task =
nullptr;
76 std::atomic<bool> _reset_requested{
false};
77 uint32_t _last_sequence = 0;
Abstract interface for object detection logic on ESP32-CAM.
An abstract base class (Interface) that defines the contract for detection algorithms....
Definition base_detection_module.h:22
Motion detection and persistent single-target tracking on camera frames.
Definition camera_diff_detection.h:26
void reset() override
Publish an Idle snapshot now and request a reset of detector and tracker.
Definition camera_diff_detection.cpp:193
bool start_task(FrameStore &store)
Create the "detect" task (core 1, priority 3, 4096 B stack) and subscribe it to the store.
Definition camera_diff_detection.cpp:130
DetectionStats get_stats() const override
Detection timings and counters for the stats line.
Definition camera_diff_detection.cpp:218
bool begin()
Allocate the pipeline in internal RAM. Without it detect_object() reports no motion.
Definition camera_diff_detection.cpp:60
std::tuple< MoveX, MoveY > detect_object(camera_buffer_t frame) override
Analyse one frame; returns the direction toward the tracked target (None when there is none).
Definition camera_diff_detection.cpp:77
TrackSnapshot get_track_snapshot() const override
Latest tracker output, safe to call from another task (implementations copy under a lock).
Definition camera_diff_detection.cpp:213
Definition frame_store.h:30
Definition motion_detector.h:21
A value of type T that owns its own spinlock; every access is one short critical section.
Definition sync.h:54
Finds moving regions in 40x30 gray frames with a background model (pure C++20, natively tested).
Definition track_snapshot.h:32
Definition track_snapshot.h:14
Small RAII wrappers for the two locking patterns the firmware uses (device only).
Single-target persistent tracker over detector blobs (pure C++20, natively tested).
std::array< uint8_t, kCells > GrayFrame
One 40x30 luma frame, row-major (index = y * kGridW + x).
Definition tracking_types.h:21