how could i turn this into a 5 by 5 filter
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I= imread('peppers.png');
I2=I;
[r, c,]=size(I);
for i = 2:r-1
for j = 2: c-1
uint8=[I(i-1,j-1),I(i-1,j),I(i-1,j+1),I(i,j-1),I(i,j),I(i,j+1),...
I(i+1,j-1),I(i+1,j),I(i+1,j+1)];
uint8=sort(uint8);
I2(i,j)= uint8(5);
end
end
figure;
imshow(I);
title('peppers noisy');
figure;
imshow(I2);
title('peppers');
2 Kommentare
Siehe auch
Kategorien
Find more on Digital Filter Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!