← f_ notebook · Mirrors · ∇ Fields

f_vf_lk, live ​

Lucas-Kanade optical flow: estimates per-pixel motion between frames from local gradients, reports a confidence, and fills aperture-problem gaps along the ambiguous axis.

The cell below steps the NumPy mirror that f_vf_lk's tests are written against, in your browser. It is the NumPy mirror, not the Max patch, and it is not claimed to match the patch bit for bit.

f_vf_lk · NumPy mirror (Pyodide) · not the Max patch
Downloads about 15 MB the first time (Python and NumPy).
  • gain scales the flow vectors; negative inverts the direction.
  • scale is the central-difference step for the spatial gradients.
  • mask hi sets the high edge of the confidence gate: determinant at or above it passes at full strength, near-zero determinant reads as no-flow.
  • decay is how much of last frame's accumulated field persists.
  • injection is how strongly each frame's fresh solve blends into the accumulator.
  • reach is the tap spacing of the directional fill along low-confidence stripes; 0 turns it off.
  • view picks the display: the accumulated vecfield, the raw determinant confidence, or the source luma.
  • view gain brightens the flow display only; the field itself is untouched.
  • The input select picks the source texture the flow is computed from; moving (a drifting disc and bar) is the source with real motion.

reference doc · idea note · patcher · vf_lk_mirror.py

← SeparateRepulse →