?? fssss.m
字號(hào):
clear all;
clc;
yuantu=imread('kids.jpg');
figure,subplot(2,2,1),imshow(yuantu);
[height,width]=size(yuantu);
s=ones(5,5);
a=100;
b=130;
[sh,sw]=size(s);
sum=length(find(s==1));
sorigin=[3 3];
imresult=zeros(height,width);
for i=3:1:height-2
for j=3:1:width-2
count=1;
for k=1:1:sh
for w=1:1:sw
if yuantu(i-3+k,j-3+w)>=a & yuantu(i-3+k,j-3+w)<=b & s(k,w)==1
if count>=25
imresult(i,j)=yuantu(i,j);
else
count=count+1;
end
else
break;
end
end
end
end
end
subplot(2,2,2),imshow(imresult);
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -