add median filter function

I've added a median filter function to the images.py file, for further pre-processing options