Random Value Impulse noise added to every pixel ? How to generate labels?

1 Ansicht (letzte 30 Tage)
I = im2double(imread('barbara.png'));
imshow(I);
s = size(I);
S = s(1) * s(2);
OriginalImageVector= reshape(I, S ,1);
p = 0.5; % p between 0 and 1
noisyimage = (I + p*rand(size(I)))/(1+p);
imshow(noisyimage, []);
s2 = size(noisyimage);
S1 = s2(1) * s2(2);
NoisyImageVector= reshape(noisyimage, S1 ,1);
When I compare the values of "OriginalImageVector" and  values of "NoisyImageVector",     the result is same why?
while when I added slat and pepper noise to the image, it shows some difference between the valuues of "SOriginalImageVector"   and   "SNoisyImageVector".
IS = imread('barbara.png');
noisyimageS = imnoise(IS, 'salt & pepper', 0.02);
figure; imshow(IS, []);
figure; imshow(noisyimageS, []);
s = size(IS);
S = s(1) * s(2);
SOriginalImageVector= reshape(IS, S ,1);
s2 = size(noisyimageS);
S1 = s2(1) * s2(2);
SNoisyImageVector= reshape(noisyimageS, S1 ,1);
Kindly explain when we added the Random Value Impulse noise to an image then how we can generate labels?
(in the slat & pepper noise case, I compared the noisy image values with the original image values and got the labels)
Random Value Impulse noise added to every pixel ?.

Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by