我正在尝试将高斯噪声和泊松噪声添加到图像中.
I'm trying to add Gaussian and Poisson noise to an image.
我已尝试如下实现此目标,但结果却不是我所期望的.
I have been tried to implement this as follows but the result is not what I was expecting.
I = imread('eight.tif'); J = imnoise(I,'gaussian',0, 0.02); %mean variance figure, imshow(I), figure, imshow(J) P = imnoise(I,'poisson'); figure, imshow(P) K = J+P; figure, imshow(K)如何正确添加泊松噪声和高斯噪声?
How do I correctly add Poisson noise and Gaussian noise?
推荐答案您应该将 imnoise 应用于 J ,而不是 I .
You should be applying imnoise to J, not to I.
K = imnoise(J,'poisson'); figure, imshow(K)无噪音已经增加了图像的噪点,因此添加 J + P 会将图像添加到自身中,另外到已经添加的噪音.
imnoise already adds the noise to your image, so adding J+P will add the image to itself, in addition to the already-added noise.