文件夹下图像的批量处理

file_path =  'D:/MATLAB/bin/IMAGES/test_t1024/';% 图像文件夹路径
img_path_list = dir(strcat(file_path,'*.tif'));%获取该文件夹中所有jpg格式的图像
img_num = length(img_path_list);%获取图像总数量
if img_num > 0 %有满足条件的图像
        for k = 1:img_num %逐一读取图像
            image_name = img_path_list(k).name;% 图像名
            Im=  imread(strcat(file_path,image_name));


            '''''''''''''''''
            处理操作
            '''''''''''''''''

        end
end

猜你喜欢

转载自www.cnblogs.com/zgqcn/p/10973209.html