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.
Downloads about 15 MB the first time (Python and NumPy).
gainscales the flow vectors; negative inverts the direction.scaleis the central-difference step for the spatial gradients.mask hisets the high edge of the confidence gate: determinant at or above it passes at full strength, near-zero determinant reads as no-flow.decayis how much of last frame's accumulated field persists.injectionis how strongly each frame's fresh solve blends into the accumulator.reachis the tap spacing of the directional fill along low-confidence stripes; 0 turns it off.viewpicks the display: the accumulated vecfield, the raw determinant confidence, or the source luma.view gainbrightens 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.