clc;
clear all;
close all;
A=imread('median.tif');
% Pad the matrix with zeros on all sides
modifyA=zeros(size(A)+2);
B=zeros(size(A));
% copy the original image matrix to the padded matrix
for x=1:size(A,1)
for y=1:size(A,2)
modifyA(x+1,y+1)=A(x,y);
end
end
h = waitbar(0,'Calculating Median Operation please wait......');
% Let the window be an array store the 3-by-3 neighbour
% values in the array sort and find the middle element
for i= 1:size(modifyA,1)-2
for j=1:size(modifyA,2)-2
window=zeros(9,1);
inc=1;
for x=1:3
for y=1:3
window(inc,1)=modifyA(i+x-1,j+y-1);
inc=inc+1;
end
end
med=sort(window);
% Place the median element in the output matrix
B(i,j)=med(5);
end
waitbar(i/size(modifyA,1));
end
% Convert the output matrix to 0-255 range image type
B=uint8(B);
figure('Position',[100 100 1200 550]);
subplot(1,2,1),imshow(A),
ylabel('Image with salt-papper noise','Color','r','FontSize', 20,'FontAngle', 'italic');
subplot(1,2,2),imshow(B),
ylabel('Image after median filtering','Color','r','FontSize', 20,'FontAngle', 'italic');
close(h);
clear all;
close all;
A=imread('median.tif');
% Pad the matrix with zeros on all sides
modifyA=zeros(size(A)+2);
B=zeros(size(A));
% copy the original image matrix to the padded matrix
for x=1:size(A,1)
for y=1:size(A,2)
modifyA(x+1,y+1)=A(x,y);
end
end
h = waitbar(0,'Calculating Median Operation please wait......');
% Let the window be an array store the 3-by-3 neighbour
% values in the array sort and find the middle element
for i= 1:size(modifyA,1)-2
for j=1:size(modifyA,2)-2
window=zeros(9,1);
inc=1;
for x=1:3
for y=1:3
window(inc,1)=modifyA(i+x-1,j+y-1);
inc=inc+1;
end
end
med=sort(window);
% Place the median element in the output matrix
B(i,j)=med(5);
end
waitbar(i/size(modifyA,1));
end
% Convert the output matrix to 0-255 range image type
B=uint8(B);
figure('Position',[100 100 1200 550]);
subplot(1,2,1),imshow(A),
ylabel('Image with salt-papper noise','Color','r','FontSize', 20,'FontAngle', 'italic');
subplot(1,2,2),imshow(B),
ylabel('Image after median filtering','Color','r','FontSize', 20,'FontAngle', 'italic');
close(h);
Ataköy
ReplyDeleteÇekirge
Karataş
Adrasan
Çavuşlu
LNE8
Erzurum
ReplyDeleteistanbul
Ağrı
Malatya
Trabzon
TJZ
Kocaeli
ReplyDeleteDenizli
Bursa
istanbul
Van
0LMNİ
görüntülüshow
ReplyDeleteücretli show
ZYMNJ
https://titandijital.com.tr/
ReplyDeletemersin parça eşya taşıma
osmaniye parça eşya taşıma
kırklareli parça eşya taşıma
tokat parça eşya taşıma
BGTG
antep evden eve nakliyat
ReplyDeletebolu evden eve nakliyat
afyon evden eve nakliyat
tekirdağ evden eve nakliyat
artvin evden eve nakliyat
KJ30A
D4F58
ReplyDeletesinop sohbet muhabbet
gümüşhane sohbet chat
rize mobil sohbet sitesi
mobil sohbet sitesi
rastgele sohbet
yozgat canlı görüntülü sohbet odaları
canli goruntulu sohbet siteleri
manisa canlı sohbet ücretsiz
siirt canlı sohbet siteleri ücretsiz
9B794828A1
ReplyDeletetiktok takipçi satın al