在matlab中如何将 指定 文件夹中的所有文件 读出来

来源:百度知道 编辑:UC知道 时间:2024/05/22 17:59:03
在matlab中如何将 指定 文件夹中的所有文件 读出来
最好是有代码,如果没有函数也行
非常着急 谢谢啦

读取一个文件夹中的所有文件

假如读取F盘English文件夹中的所有bmp图片:
Files = dir(strcat('F:\\english\\','*.bmp'));
LengthFiles = length(Files);
for i = 1:LengthFiles;
Img = imread(strcat('F:\english\',Files(i).name));
%自己写图像处理函数 ImgProc(Img);
end

matlab图像旋转和缩放程序
2009-06-23 11:32

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%旋转
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function rotate(Image,Angle)
%Image为位图数据
%X,Y为其行列数
[X,Y]=size(Image);
%原图显示
imshow(Image);
%计算四个角点的新坐标,确定旋转后的显示区域
LeftTop(1,1)=-(Y-1)*sin(Angle);
LeftTop(1,2)=(Y-1)*cos(Angle);
LeftBottom(1,1)=0;
LeftBottom(1,2)=0;
RightTop(1,1)=(X-1)*cos(Angle)-(Y-1)*sin(Angle);
RightTop(1,2)=(X-1)*sin(Angle)+(Y-1)*cos(Angle);
RightBottom(1,1)=(X-1)*cos(Angle);
RightBottom(1,2)=(X-1)*sin(Angle);
%计算显示区域的行列数
Xnew=max([LeftTop(1,1),LeftBottom(1,1),RightTop(1,1),Righ