
Reduces a dense OpticalFlow tensor against [Mask] into one [Vector2d<Double>] per object, carrying the mask centroid as position and the thresholded mean per-mask flow as orientation, ready for smoothing or overlay.
Optical flow and per-object masks are collapsed into one motion vector per object, which a 2D Kalman filter smooths into stable tracks.
The per-object motion vectors are drawn over the frame as direction arrows for a live motion overlay.
movement_threshold; when every pixel in a mask is below it, the object renders as stationary even though the mask exists. The orientation is the mean vector, not the dominant direction, so multi-modal motion averages toward zero.multiplication_factor scales the orientation vector linearly and is a per-frame displacement, not a per-second velocity; reverse only flips the sign, applied after thresholding and scaling.Automated release