数模论坛

 找回密码
 注-册-帐-号
搜索
热搜: 活动 交友 discuz
12
返回列表 发新帖
楼主: benbenswf

怎么用MATLAB连续读取一批图形文件阿

[复制链接]
发表于 2004-8-28 04:04:34 | 显示全部楼层
<>程序中用细胞数组,这是我这几天遇到的提取100幅图片信息的程序,图片的大小不同,就要用细胞数组来存储</P><>clear</P><>a={'A.bmp','A1.bmp','A2.bmp','A3.bmp','A4.bmp','A5.bmp','A6.bmp','A7.bmp','A8.bmp','A9.bmp','A10.bmp',...
   'A11.bmp','A12.bmp','A13.bmp','A14.bmp','A15.bmp','A16.bmp','A17.bmp','A18.bmp','A19.bmp','A20.bmp',...
   'A21.bmp','A22.bmp','A23.bmp','A24.bmp','A25.bmp','A26.bmp','A27.bmp','A28.bmp','A29.bmp','A30.bmp',...
   'A31.bmp','A32.bmp','A33.bmp','A34.bmp','A35.bmp','A36.bmp','A37.bmp','A38.bmp','A39.bmp','A40.bmp',...
   'A41.bmp','A42.bmp','A43.bmp','A44.bmp','A45.bmp','A46.bmp','A47.bmp','A48.bmp','A49.bmp','A50.bmp',...
   'A51.bmp','A52.bmp','A53.bmp','A54.bmp','A55.bmp','A56.bmp','A57.bmp','A58.bmp','A59.bmp','A60.bmp',...
  'A61.bmp','A62.bmp','A63.bmp','A64.bmp','A65.bmp','A66.bmp','A67.bmp','A68.bmp','A69.bmp','A70.bmp',...
  'A71.bmp','A72.bmp','A73.bmp','A74.bmp','A75.bmp','A76.bmp','A77.bmp','A78.bmp','A79.bmp','A80.bmp',...
  'A81.bmp','A82.bmp','A83.bmp','A84.bmp','A85.bmp','A86.bmp','A87.bmp','A88.bmp','A89.bmp','A90.bmp',...
  'A91.bmp','A92.bmp','A93.bmp','A94.bmp','A95.bmp','A96.bmp','A97.bmp','A98.bmp','A99.bmp'};</P><P>for i=1:length(a)
[I map]=imread(a{1,i});
I;b=1;
for j=1:511
    for k=1:511
       if (I(j,k)==1&amp;&amp;I(j,k+1)==0)||(I(j,k)==0&amp;&amp;I(j,k+1)==1)
          x(1,b)=k;
          y(1,b)=j;
          b=b+1;
      end
  end
end
w=i*ones(1,length(x));
zz1{1,i}=x;
zz1{2,i}=y;
zz1{3,i}=w;
I=[];x=[];y=[];w=[];
end</P>
发表于 2004-8-28 04:08:25 | 显示全部楼层
<>但我这样做了,就是在程序中漏点了</P><>里面有一个地方要该一下</P>
发表于 2004-8-30 19:43:05 | 显示全部楼层
niu x
您需要登录后才可以回帖 登录 | 注-册-帐-号

本版积分规则

小黑屋|手机版|Archiver|数学建模网 ( 湘ICP备11011602号 )

GMT+8, 2024-11-27 23:35 , Processed in 0.045647 second(s), 12 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表