Repairing pixelated image using matlab Help needed

Hi I need help repairing this image using for loops. I know I have to identify the bad pixels first and fill them in. thanks. PS I am very new to matlab
Im pretty sure the for statemetn is wrong and I do not know wat to do from here. I need help writing the for loop to go through the image matrix to identify the black and white pixels.
clear
clc
format compact
filenameIN = uigetfile('.bmp','Picture');
noisyRGBarray = imread(filenameIN);
figure(1)
imshow(noisyRGBarray)
y = noisyRGBarray;
[m,n]=size(y)
clean=[];
for i=2:m-1
for j=2:n-1
if y(i,j)% clean add new
clean = [ clean, y(i,j) ]
end
end
end
% code end

回答 (1 件)

Image Analyst
Image Analyst 2014 年 3 月 9 日

0 投票

See my salt and pepper noise removal program, attached.

質問済み:

Bob
2013 年 10 月 9 日

回答済み:

2014 年 3 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by