该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
clear all
clc
filepathsrc='F:\数学建模\数学建模赛题\B\附件5\';
file=dir('F:\数学建模\数学建模赛题\B\附件5\*.bmp');
for i=1:length(file)
A{i}=imread([filepathsrc,file(i).name]);
end
z=0;
for i=1:418
k{i}(:,1:11)=sum(A{i}(:,1:11));
d{i}=sum(k{i});
d1(i)=d{i}(1);
if d1(i)==255*180*11
z=z+1;
Nz(z)=i;
end
end
z=0;
for i=1:418
k{i}(:,(end-10):end)=sum(A{i}(:,(end-10):end));
d{i}=sum(k{i});
d1{i}=d{i}(1);
if d1(i)==255*180*11
z=z+1;
Ny(z)=i;
end
end
tz=rem(Nz,2);
rz=fix((Nz-1)./2);
ty=rem(Ny,2);
ry=fix((Ny-1)./2);
k=0;
for i=1:24