1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// THEORY:
// The `SmartBlob` module is the primary component of the Spatial Grouping Layer.
// Its purpose is to transform the purely temporal, single-point-in-space analysis
// from the `SmartChunk` layer into a spatially coherent object. A `SmartBlob`
// represents a single, contiguous region of anomalous activity at a specific
// moment in time.
//
// Key architectural principles:
// 1. **Spatial Cohesion**: A `SmartBlob` is a collection of `SmartChunk`s that are
// both in an anomalous state and are physically adjacent to each other on the
// grid. It finds meaningful shapes in the "noise" of the status map.
// 2. **Data Aggregation**: It acts as a high-level summary of a motion event.
// Instead of dealing with dozens of individual chunk statuses, the system can
// now work with a single `SmartBlob` object that has clearly defined properties
// like a bounding box, center of mass, and total area.
// 3. **Stateless Data Container**: Much like `Pixel` and `Chunk`, the `SmartBlob`
// struct itself is a "dumb" data container. It represents a detected object
// within a single frame. It does not have a memory of its past positions or
// behaviors.
// 4. **Input for the Next Layer**: A list of `SmartBlob`s is the final output of
// the spatial analysis layer. This list becomes the perfect input for the
// final architectural layer (Behavioral Analysis), which will track these
// blobs over time to create "Moments" and narratives.
use crateAnomalyDetails;
/// A simple struct to represent a 2D point or coordinate on the chunk grid.
/// Represents a single, spatially coherent object detected in a frame.
/// This is a "dumb" data container that summarizes the properties of a detected motion event.