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
tracker.h
Go to the documentation of this file.
1
11#pragma once
12
13#include "tracking_types.h"
14
15namespace tracking
16{
18{
19public:
20 explicit Tracker(const TrackerConfig& config = TrackerConfig{});
21
23 const TrackState& update(const DetectionResult& detection);
24
25 const TrackState& state() const { return state_; }
26
28 void reset();
29
30private:
31 Box gate() const;
32 bool measure(const DetectionResult& detection, const Box& gate, Blob& out) const;
33 void start_tentative(const Blob& blob);
34 void correct(const Blob& measurement);
35 void miss();
36 void to_idle();
37 void refresh_box();
38
39 TrackerConfig config_;
40 TrackState state_;
41 int hits_ = 0;
42 uint32_t last_id_ = 0;
43 float width_ = 0.0f;
44 float height_ = 0.0f;
45};
46} // namespace tracking
Definition tracker.h:18
void reset()
Drop the current target (Idle). Ids already handed out are never reused.
Definition tracker.cpp:10
const TrackState & update(const DetectionResult &detection)
Advance one frame. The returned reference stays valid until the next call.
Definition tracker.cpp:12
One connected region of foreground cells.
Definition tracking_types.h:59
Inclusive cell rectangle. A default-constructed box is empty.
Definition tracking_types.h:24
What the detector found in one frame. Blobs are sorted by area, largest first.
Definition tracking_types.h:83
The tracked target. Positions in cells, velocity in cells per frame. id 0 = no target.
Definition tracking_types.h:123
Tracker tunables (frame counts assume ~17 fps).
Definition tracking_types.h:111
Value types shared by the motion detector and the tracker (pure C++20, natively tested).