Clear Filters
Clear Filters

Add noise to image-datastore using "Randn" command on Matlab

3 views (last 30 days)
I have used command Randn, but still give me the same accuraccy result even after changing the noise magnitude. Why accuracy still same? how image can be affected by noise
used commands :
A=imread('human_6_77_.png');
K = imcrop(A,[116 50 675 534]);
b = 20*randn(size(K));
I=uint8(double(K)+b);
imshow(I)
  2 Comments
Sai Sri Pathuri
Sai Sri Pathuri on 11 Jul 2020
Here are the images I tried with your code, i see a change in both images. There is more distortion for image with noise magnitude of 100. Can you attach your images? What did you mean by accuray? Is it the same as amount of distortion or something else?
% Original Image
figure
A=imread('coins.png');
K = imcrop(A,[116 50 675 534]);
I=uint8(double(K));
imshow(I)
% Image with Noise magnitude = 20
figure;
A=imread('coins.png');
K = imcrop(A,[116 50 675 534]);
b = 20*randn(size(K));
I=uint8(double(K)+b);
imshow(I)
% Image with Noise magnitude = 100
figure;
A=imread('coins.png');
K = imcrop(A,[116 50 675 534]);
b = 100*randn(size(K));
I=uint8(double(K)+b);
imshow(I)
Mohamed Elbeialy
Mohamed Elbeialy on 14 Jul 2020
As changing magnitude, the noise will increase on image. However, when trying to train this image on matlab "deep learning", it keeps givening me the same training accuracy evern with different noise magnitudes. why? what idology is running ?

Sign in to comment.

Answers (0)

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!