storing multiple image in single file
6 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
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
2011-5-26
Thanks Steve I had this doubt from quite a long time :)Thanks for clarifying it :)
更多回答(2 个)
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.)
0 个评论
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!