필터 지우기
필터 지우기

storing multiple image in single file

조회 수: 3 (최근 30일)
Rishabh Kasliwal
Rishabh Kasliwal 2011년 5월 26일
Hi All,
Is there a way to store multiple images in a single file ? I am trying the following:
imwrite(cat(3,img1,img2),filename,format);
thanks, rishabh

채택된 답변

Steve Eddins
Steve Eddins 2011년 5월 26일
There is a method for writing multiple images to a TIFF file that has been in MATLAB a long time. It does not require the recently introduced TIFF class that Walter mentioned.
imwrite(im1, 'myfile.tif');
imwrite(im2, 'myfile.tif', 'WriteMode', 'append');
  댓글 수: 1
Harsha Vardhan Rao  Avunoori
Harsha Vardhan Rao Avunoori 2011년 5월 26일
Thanks Steve I had this doubt from quite a long time :)Thanks for clarifying it :)

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Walter Roberson
Walter Roberson 2011년 5월 26일
If you have a recent enough version, you can use the new TIFF class to write subfiles. See the hint about writeDirectory here
If you do not have a version that supports the TIFF class, there is no supported way to do what you want (but perhaps it could be done with one of the MATLAB FIle Exchange submissions.)

Bjorn Gustavsson
Bjorn Gustavsson 2011년 5월 26일
I was going to suggest that you could write your images to a fits-file - it is a good image format, in its way. Then when I checked matlab does not provide a fits-writing function, which is a bit pathetic. There are, however, a bunch of packages available on the FEX and the net.

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by