Skip to main content

Module flow

Module flow 

Source
Expand description

Optical flow (OpenCV video analogue). Lucas-Kanade on the time surface: the Surface of Active Events T(x, y) (the latest event time at each pixel, in milliseconds) is a local ramp whose gradient encodes edge velocity — an edge moving with pixel velocity v satisfies ∇T · v = 1. We fit one constant v per pixel over a window by least squares, exactly like image Lucas-Kanade, and return a two-channel (flow_x, flow_y) EventFrame in pixels per millisecond. Where the window holds only a single edge the structure tensor is rank-deficient (the aperture problem), so we fall back to normal flow along the gradient; genuinely flat, event-free windows stay zero. Flow is emitted only at pixels that saw an event. Assumes ascending time order.

Enums§

FlowError