Random Value Impulse noise added to every pixel ? How to generate labels?
1 view (last 30 days)
Show older comments
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 ?.
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!