Still need to do PIL median filter