Rules & events
A Mission Studio rule binds one marked area, one subject family, and one trigger. A match becomes a timestamped event linked to its source frame and track.
Anatomy of a rule#
{
"objective": "count-entries",
"subjects": "people",
"area_rule": "dwell",
"dwell_seconds": 3,
"zone": [[0.08, 0.31], [0.91, 0.31], [0.91, 0.88], [0.08, 0.88]]
}Three marked-area triggers run today:
| Trigger | Fires when |
|---|---|
enter | A stable track transitions from outside the polygon to inside it |
exit | A stable track that was inside transitions outside the polygon |
dwell | A stable track remains inside until the configured threshold is reached |
Tracks, not isolated boxes#
Rules operate on track histories. A track needs at least three observations before it can produce an event. The same track can produce another entry after it leaves and later returns. A dwell rule emits once per continuous stay, at the first sampled moment that reaches its threshold.
What counts as inside#
Mission Studio evaluates the center of each tracked subject against the normalized polygon drawn by the operator. The polygon and every track observation remain in the run manifest, so the rule can be inspected after processing. The Challenge uses a different prepared overlap rule and should not be treated as the Mission Studio implementation.
The retained event#
{
"track_id": "person_002",
"label": "person",
"kind": "dwell",
"event": "stayed in marked area",
"time_seconds": 7.5,
"source_frame": 180,
"dwell_seconds": 1.5,
"confidence": 0.73,
"evidence_image": "/artifacts/run_id/event-02.jpg"
}The event is retained in JSON and CSV, marked on the result timeline, included in the event reel, and packaged with the exact evidence frame. An operator review adds its verdict, note, and review time without replacing the original event record.