2D Image filtering/convolution.
Median filtering of a matrix using the specified window (or a 3 x 3 default window).