std.Median(clip clip[, int[] planes=[0, 1, 2]])

Replaces each pixel with the median of the nine pixels in its 3x3 neighbourhood. In other words, the nine pixels are sorted from lowest to highest, and the middle value is picked.

Clip to process. It must have integer sample type, and bit depth between 8 and 16. If there are any frames with float samples or bit depth greater than 16, an error will be returned.
Specifies which planes will be processed. Any unprocessed planes will be simply copied.