For heuristic 4 (\(h_4\) ), we use the opencv implementation [1]} of the Farnebäck method to compute dense optical flow [2]}. This method approximates the neighborhood of each pixel with a quadratic polynomial and uses differences in the polynomials to estimate the per-pixel displacement.
