本文介绍了如何在图像上添加高斯噪声?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在python中为图像添加一定量的高斯噪声?我需要以某种方式将图像的值转换为double类型还是其他?

How to add a certain amount of Gaussian noise to the image in python? Do I need to convert somehow the values of the image to double type or something else?

此外,我对测量图像中的噪声水平有疑问.一个根据dB(分贝)将其相加,而另一个则考虑方差.它如何关联以及如何测量噪声水平?

Also, I have doubts about measuring the level of noise in the image. One adds it according to the dB (decibels) while other considers the variance. How it is related and how should I measure the noise level?

推荐答案

您可以在scikit-image中使用random_noise函数.它是这样的:

You can use the random_noise function in scikit-image. It goes something like this:

skimage.util.random_noise(image, mode='gaussian', seed=None, clip=True, **kwargs)

您可以在此处了解更多信息: http://scikit-image.org/docs/stable /api/skimage.util.html#random-noise

You can read more about it here:http://scikit-image.org/docs/stable/api/skimage.util.html#random-noise

这篇关于如何在图像上添加高斯噪声?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-15 10:00