批量处理
%%
% 读取文件夹下所有文件,把文件名作为数组
fileFolder = fullfile(matlabroot,'toolbox','images','imdata');
dirOutput...sequence(:,:,p) = imread(fileNames{p});
end
%%
% 图像局部标准差滤波
sequenceNew = stdfilt(sequence,ones(3));
%%
% 处理前后图像轮播...%% 对每一帧进行同样的处理
nframes = trafficVid.NumberOfFrames;
I = read(trafficVid, 1);
taggedCars = zeros([size...size(I,2) 3 nframes], class(I));
for k = 1 : nframes
singleFrame = read(trafficVid, k);
% 一样的处理过程...k) = 255;
taggedCars(row,col,2,k) = 0;
taggedCars(row,col,3,k) = 0;
end
end
%% 把处理完的图片播放为视频