I need help repairing a pixelated image using for loops

I know I first need to identify each bad pixel
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

1 Comment

Start with defining "bad" at first. While I like the spotty area, I do not like the machine built to kill people.
Your code would be easier to read, if you format it.

Sign in to comment.

Answers (0)

Categories

Asked:

Bob
on 8 Oct 2013

Commented:

Jan
on 9 Oct 2013

Community Treasure Hunt

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

Start Hunting!