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

조회 수: 12 (최근 30일)
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 CenterFile Exchange에서 Feature Detection and Extraction에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by