相关疑难解决方法(0)

如何在不使用任何内置高斯函数的情况下高斯模糊图像?

我想使用原生高斯模糊公式来模糊我的图像.我读过这篇文章,但我不知道如何实现这一点.

如何使用公式来确定权重?

我不想使用MATLAB所具有的任何内置函数

c image-processing gaussianblur

54
推荐指数
3
解决办法
7万
查看次数

如何高斯滤波(模糊)一个浮点numpy数组

我有一个a类型的numpy数组float64.如何使用高斯滤波器模糊此数据?

我试过了

from PIL import Image, ImageFilter

image = Image.fromarray(a)
filtered = image.filter(ImageFilter.GaussianBlur(radius=7))
Run Code Online (Sandbox Code Playgroud)

,但这会产生ValueError: 'image has wrong mode'.(它有模式F.)

我可以通过乘以a一些常数,然后舍入到整数来创建合适模式的图像.这应该有效,但我希望有一个更直接的方式.

(我正在使用Pillow 2.7.0.)

python filtering numpy python-imaging-library

19
推荐指数
3
解决办法
4万
查看次数