hii...i want to save my images as abc1.pgm, abc2.pgm, abc3.pgm...abc5.pgm

4 ビュー (過去 30 日間)
Prajakta
Prajakta 2013 年 3 月 23 日
i tried the following code
filename=spprimtf('E:\\prajube\\abc1%d.pgm',x);
imwrite(imge1,filename);
still it saves only the last photo...for eg. suppose we have to click 5 images.. it just saves abc5.pgm and abc1.pgm to abc4.pgm are lost
please help!!! :(
  1 件のコメント
Prajakta
Prajakta 2013 年 3 月 23 日
this question was asked by Mr.Alex mason...but i didnt get the exact solution for it

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

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 3 月 23 日
編集済み: Azzi Abdelmalek 2013 年 3 月 23 日
for k=1:3
filename=sprintf('E:\\prajube\\abc1%d.pgm',k)
imwrite(image1{k},filename);
end
  3 件のコメント
Prajakta
Prajakta 2013 年 3 月 23 日
the error is on
imwrite(image1{k},filename)
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 3 月 23 日
Because image1 was used before as double array.

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

その他の回答 (1 件)

Shivaputra Narke
Shivaputra Narke 2013 年 3 月 23 日
% first save ur images as img_cell{1}=img1; %ur imge matrix img_cell{2}=img2; img_cell{3}=img3;
for k=1:3 filename=sprintf('E:\\prajube\\abc%d.pgm',k) imwrite(img_cell{k},filename); end

カテゴリ

Help Center および File ExchangeFeature Detection and Extraction についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by