For each pixel position over the detector, a time line is extracted, sorted, and the central (median) value is assigned to the output plane. This non-linear filtering allows extraction of bad pixels and cosmic rays, but does not increase the signal to noise ratio for faint objects, since they tend to be rejected by the median filtering.