Please provide me a matlab source code for running number of files in a loop.

 Accepted Answer

video_dir = 'snaps/'
extension = 'jpg'
out_dir = 'video/'
resnames=dir(fullfile(video_dirs,['*.' extension]));
for i=1:length(resnames)
img=imread(fullfile(video_dirs,resnames(i).name));
%
% whatever you want to do with your image
%
imwrite(img, [out_dir resnames(i).name]);
end

More Answers (0)

Categories

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!