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

1 回表示 (過去 30 日間)
BIJOYETA
BIJOYETA 2014 年 3 月 20 日
コメント済み: Image Analyst 2014 年 11 月 1 日
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 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by