numpy中的局部均值过滤器 [英] Local mean filter in numpy
本文介绍了numpy中的局部均值过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个512x512x512 numpy数组.有没有一种有效的方法来执行均值过滤,将每个数组值都替换为所有3x3x3局部值?
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?
我们正在寻找与scipy.ndimage.filters.median_filter
类似的东西,但要插入具有均值的中位数.
We are seeking somethin similar to scipy.ndimage.filters.median_filter
but insted of median with mean.
推荐答案
scipy.ndimage.filters.convolve()
,权重为np.full((3, 3, 3), 1.0/27)
.
这篇关于numpy中的局部均值过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文