oa::image::optical_flow_farneback
Dense Farneback optical flow over a 2x image pyramid, following calcOpticalFlowFarneback. Each level expands both frames into polynomial coefficient maps through two separable weighted-least-squares passes (flow_expand_v then flow_expand_h), then relaxes the flow field with iterations Jacobi flow_update dispatches over a 2 * window + 1 averaging neighbourhood. The coarsest level starts from a zero field; finer levels initialize from the 2x-upsampled coarser solution. window is the half-window radius of the update averaging neighbourhood and poly_n the half-support of the gaussian-weighted polynomial fit. Returns the F32 [planes, 2, H, W] flow field at level-0 resolution with x displacement in channel 0 and y displacement in channel 1. Errors Returns an error unless both images are nonempty FP32 NCHW/CHW images with identical shape, layout, and format, levels, window, iterations, and poly_n are >= 1, poly_sigma is finite and positive, and the coarsest level still fits the polynomial support.