Add median filter function template
Finish median function