MATLAB Answers

0

How can I put two noises in an image?

Asked by Ju Hee Hwang on 29 Aug 2019
Latest activity Commented on by Ju Hee Hwang on 29 Aug 2019
Accepted Answer by KSSV
-my code(diagonal noise)-
clc
k=imread('clue.jpg');
k=rgb2gray(k);
k=double(k);
[x,y]=meshgrid(1:512,1:512);
p=1+sin(x+y);
tp=(k/128+p)/4;
imshow(tp)
-my code(Vertical noise)-
clc
k=imread('clue.jpg');
k=rgb2gray(k);
k=double(k);
sig=30/255;
k(:,:) = k(:,:)/255;
for i=1:3:512
y=randn;
k(:,i) = k(:,i) + sig*y;
end
imshow(k)
I want to put these two noises in one image.
What should I do?

  0 Comments

Sign in to comment.

1 Answer

Answer by KSSV
on 29 Aug 2019
 Accepted Answer

How about
imshow((tp+k)/2)

  1 Comment

Thank you!
Succeeded:)

Sign in to comment.