How to save multiple images using imwrite in matlab ?
4 ビュー (過去 30 日間)
古いコメントを表示
How to save multiple images gray format .jpeg using imwrite in matlab ?
image_folder ='E:\gambar_eror'
filenames = dir (fullfile(image_folder,'*.jpeg'))
total_images = numel(filenames);
%training=[];
for n= 1:total_images;
f= fullfile(image_folder, filenames(n).name);
disp(f);
our_images= imread (f);
size (our_images);
gray=rgb2gray(our_images);
end
0 件のコメント
採用された回答
KSSV
2022 年 5 月 31 日
編集済み: KSSV
2022 年 5 月 31 日
image_folder ='E:\gambar_eror'
filenames = dir (fullfile(image_folder,'*.jpeg'))
total_images = numel(filenames);
%training=[];
for n= 1:total_images;
f= fullfile(image_folder, filenames(n).name);
disp(f);
[FILEPATH,NAME,EXT] = fileparts(f) ;
our_image= imread (f);
gray=rgb2gray(our_image);
filename = [image_folder,'\',NAME,'_gray',EXT] ;
imwrite(gray,filename)
end
5 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Convert Image Type についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!