Reputation: 749
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 similar to scipy.ndimage.filters.median_filter
but insted of median with mean.
Upvotes: 5
Views: 13624
Reputation: 11
mean filter is the alias of uniform filter, which is available in scipy.ndimage.uniform_filter()
Upvotes: 1
Reputation: 97331
scipy.ndimage.filters.convolve()
with a weight: np.full((3, 3, 3), 1.0/27)
.
Upvotes: 8