Noise reduction filter that replaces pixels with median value of neighbors — preserves edges while killing grain. Perfect for denoising without blur.
In digital image processing — especially in the VFX pipeline — you regularly deal with noise problems: sensor noise from under-lighting, compression artifacts, or thermal noise in high ISO shots. The Median Filter is your tool of choice here because it does what linear blur filters cannot: it eliminates noise without destroying edge definition.
The principle is elegant — for each pixel, you analyze its immediate neighborhood (typically a 3x3, 5x5, or 7x7 kernel). You sort all pixel values in this matrix and replace the center pixel with the median value — the middle value of the sorted series. Unlike a Gaussian blur, which takes averages and blurs edges in the process, the median "jumps" over outliers. A single white dot in a black area is recognized as a statistical outlier and corrected without affecting the boundary line itself. That's why it's also called an Edge-Preserving Filter.
In practice, you use Median Filtering in the compositing workflow primarily for Grain Management and Rotoscoping Cleanup. If you have grainy plate material — especially from older digital cameras or footage shot under poor conditions — you apply a median pass before proceeding with color grading or keying. The grain structure disappears, but the detail contrast remains. The filter also performs well with chroma subsampling artifacts (common in compressed video material) without softening the luma edges.
Caution: Overly aggressive median filters destroy fine textures and lines. A single 3x3 pass is often enough; multiple stacking leads to a "plastic" look — characterless, as if the shot were digitally painted. In professional systems (Nuke, Fusion, also Plasticity), the Median Filter is in the standard toolbox; some call it "Despeckle" or "Median" there. Caution is advised for video sequences — temporal inconsistencies can easily arise if you work frame by frame with different kernel sizes. Temporal median filters (which include the Z-axis) help to avoid flickering here.