You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: explain density vs recency (motionhistory vs heatmap/average)
Clarify how motionhistory() (MHI, recency, order-dependent) differs from
heatmap()/motion().average() (motion density, order-independent), and from
motion().history() (a motion-trail video), with a worked example.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/user-guide/video-analysis.md
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,6 +126,30 @@ These complement the motiongram (space×time) and the combined motion SSM (tempo
126
126
the stroboscope and volume show the body moving through space over time, the waterfall shows
127
127
spatial occupancy flowing over time, and the MHI compresses recency of motion into one frame.
128
128
129
+
### Density vs. recency: `motionhistory()` vs `heatmap()` / `motion().average()`
130
+
131
+
These single-image summaries look similar but encode different things — the distinction is
132
+
**whether time order matters**:
133
+
134
+
| Visualisation | Each pixel encodes | Time order |
135
+
|---|---|---|
136
+
|`heatmap()` and `motion().average()`|**how much / how often** motion happened there (motion *density*) |**Order-independent** — reversing or shuffling the frames gives the same image |
137
+
|`motionhistory()` (MHI) |**when** motion last happened there (motion *recency*: recent = bright, old = fades) |**Order-dependent** — reversing the video inverts the image |
138
+
139
+
Concrete example — a dancer crossing the frame left → right:
140
+
141
+
-`heatmap()` / `motion().average()` → a uniformly bright band along the whole path (you can't tell which way they went).
142
+
-`motionhistory()` → a **gradient** along the path: dark where they were early, bright where they were recently — so you can read the **direction and progression** of the movement.
143
+
144
+
In short: use **`heatmap()` / `motion().average()`** for *where and how much* motion (a long-exposure of motion intensity); use **`motionhistory()`** for *where and when* (a recency map that captures the arrow of time).
145
+
146
+
Related but different: `motion().history()` (or `mv.show(key='motionhistory')`) is a **video** where each frame
147
+
carries a short motion *trail* of the last N frames (a weighted moving average), rather than a single
148
+
whole-clip summary image.
149
+
150
+
> Note: `motion()` applies your `threshold`/`filtertype` when defining motion, whereas `motionhistory()`
151
+
> uses its own simple internal frame-difference threshold — so what counts as "motion" can differ slightly.
0 commit comments