FAILURE MAP
← Case archive

FA-91454 / Digital signal filters / Member archive

Median filter takes the middle sample without sorting · case 04

The output is the centre sample of the window, i.e. no filtering at all.

Member previewVariant 4 · 3 implementations · 7 checks per implementation

Case contract

Input [K, samples]; K odd ("bad-kernel" otherwise). Output i is the median of samples[i-K//2 .. i+K//2] clipped to the valid range (shrinking windows at the edges); an even count uses the mean of the two middle values. Return exact fraction strings.

Why this case matters

Median filters remove impulse noise without blurring edges; window or tie handling slips shift features.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression: random median 18["9", "17/2", "8", "5/2", "-3"]["8", "5/2", "-2", "3", "-2"]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗