FAILURE MAP
← Case archive

FA-91469 / Digital signal filters / Member archive

Median filter uses the upper middle for even counts · case 04

Shrunken edge windows report the larger middle value instead of the mean of the two.

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 11["4", "4", "3", "3", "2", "1", "2", "2"]["4", "7/2", "3", "3", "2", "1", "3/2", "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 ↗