Input image slice.
Square size of median kernel.
Optional pre-allocated return image buffer.
Optional TaskPool instance used to parallelize computation.
Returns filtered image of same size as the input. If prealloc parameter is not an empty slice, and is of same size as input slice, return value is assigned to prealloc buffer. If not, newly allocated buffer is used.
Median filtering algorithm.