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

I am currently working on an image compression project. I have a a series of images in a folder named newsnap.I want to run a dct algorithm on the series of images and save it in another folder named video.So I need the matlab source code for my project urgently.

 채택된 답변

Marta Salas
Marta Salas 2014년 3월 20일
편집: Marta Salas 2014년 3월 20일
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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

질문:

2014년 3월 20일

댓글:

2014년 11월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by