简体   繁体   English

numpy中的局部均值过滤器

[英]Local mean filter in numpy

I have a 512x512x512 numpy array.我有一个 512x512x512 的 numpy 数组。 Is there any efficient way to perform a mean filter where every array value is substituted by all 3x3x3 local values?是否有任何有效的方法来执行平均过滤器,其中每个数组值都被所有 3x3x3 本地值替换?

We are seeking somethin similar to scipy.ndimage.filters.median_filter but insted of median with mean.我们正在寻找类似于scipy.ndimage.filters.median_filter东西,但scipy.ndimage.filters.median_filter了均值的中值。

scipy.ndimage.filters.convolve()权重: np.full((3, 3, 3), 1.0/27)

mean filter 是uniform filter的别名,可以在scipy.ndimage.uniform_filter中找到。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM