STDFilt Python
from scipy.ndimage.filters import generic_filter
import numpy as np
I_filt = generic_filter(I, np.std, size=3)
Eager Elk
from scipy.ndimage.filters import generic_filter
import numpy as np
I_filt = generic_filter(I, np.std, size=3)