Local Mean Filter In Numpy
I have a 512x512x512 numpy array. Is there any efficient way to perform a mean filter where every array value is substituted by all 3x3x3 local values? We are seeking somethin simi
Solution 1:
scipy.ndimage.filters.convolve()
with a weight: np.full((3, 3, 3), 1.0/27)
.
Solution 2:
mean filter is the alias of uniform filter, which is available in scipy.ndimage.uniform_filter.
Post a Comment for "Local Mean Filter In Numpy"