Use SciPy convolution function to average/blur image along a user-inputed window value.
Use SciPy Z-score normalisation