How to read a large .img file
1 次查看(过去 30 天)
显示 更早的评论
I have a 4 GB image file that Matlab is choking on. I'd like to get this file into Matlab. Here is the code that makes my computer freeze:
fid=fopen('myimage.img','r','l');
M=fread(fid,[48333,41779],'uint16');
fclose(fid);
Equivalent code works well for a similar, smaller image, but this image is large. Subsetting into quadrants or sixteenths would be fine by me, but I don't know how to subset for a .img file. I know subsetting a tiff works with imread. Any suggestions for getting this big image into Matlab?
1 个评论
Ashish Uthama
2014-7-18
If you have a current version with Image processing toolbox, this blog post might be useful: "Dealing with “Really Big” Images: Block Processing"
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Denoising and Compression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!