フィルターのクリア

how to store the images by some another name after reading in a for loop???

1 回表示 (過去 30 日間)
archana
archana 2014 年 3 月 7 日
コメント済み: Image Analyst 2014 年 3 月 7 日
hello all, i wrote the following program to read multiple images now what i want to do is i want to store these images one by one to some location by some names like g1.jpg,g2jpg,g3jpg.........how can i do this ??
close all; clear all; clc; for i=1:5 m=imread(['C:\Users\shree\Desktop\1\im' num2str(i) '.jpg']); %r=imresize(m,[50 50]); %l=rgb2gray(r); %a=l(:); figure,imshow(m); end
%a1=g1(:);

採用された回答

Chandrasekhar
Chandrasekhar 2014 年 3 月 7 日
filename = ['g' num2str(i) '.jpg'];
saveas(m,filename)
  3 件のコメント
Dishant Arora
Dishant Arora 2014 年 3 月 7 日
imwrite(image,'filename');
saveas is used to save figure and diagram blocks. Or you can use save also.
Image Analyst
Image Analyst 2014 年 3 月 7 日
"image" being the actual variable name (which hopefully is not image which is the name of a built-in function).

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by