Median flow filtering

The observation behind median flow filtering is that nearby vectors arising from smoothly varying phenomena should have similar values. (The term "flow" arose through the development of this technique in the context of image motion analysis.)

Filtering has 2 stages:

  1. Determine a median vector:
    1. Find the mean direction of the cluster of N vectors out of a local neighborhood of size K with the smallest average angular differences.
    2. Find the mean length of the cluster of N vectors out of a local neighborhood of size K with the smallest average length differences.
    3. Typical values are N=3 and K=10.
  2. Reject vectors whose orientations and lengths are not within a given tolerance of the median vector.