Image processing noise problem
1 回表示 (過去 30 日間)
古いコメントを表示
I tried to write the code that will run SaltPepperNoise but I am making an error where can you help if it is not working.
I press run in the editor, but pause is stuck.
x=imread('PEPPERS.TIF');
x=im2double(x);
[row,col]=size(x);
for i=1:row
for j=1:col
N=floor(rand(1000,1000)+0.01)*255;
end
end
subplot(1,2,1)
imshow(x);
title('original');
subplot(1,2,2)
imshow(N);
title('SaltPeperImage');
0 件のコメント
回答 (1 件)
Bhargavi Maganuru
2020 年 4 月 27 日
The variable N inside the loop is changing everytime and finally N is just a number.
To add salt and pepper noise to image, you can use imnoise function.
For more details follow the link https://www.mathworks.com/help/images/ref/imnoise.html#d120e138500
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Subplots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!