필터 지우기
필터 지우기

How to read large tiff or img file?

조회 수: 3 (최근 30일)
Hana
Hana 2015년 4월 11일
댓글: Image Analyst 2015년 4월 11일
My files are huge with [12200,5010] rows and column. I read them in the following format:
fid=fopen('lc60_4.img','r'); LU=fread(fid,[12200,5010]); fclose(fid)
LA=imread('lai4_240.tif');
As I have 8 image to read matlab cant handle this. How can I solve this problem? Thanks

채택된 답변

Chad Greene
Chad Greene 2015년 4월 11일
If you don't need the whole image, you can specify a region of pixels by range of rows and columns:
A=imread(filename,'PixelRegion',{rows cols});

추가 답변 (1개)

Image Analyst
Image Analyst 2015년 4월 11일
Don't have them all in memory at one time. Just process one image at a time.
One file is not really all that huge. If it's a uint8 image, that's about 61 MB - about the size of a typical color digital photo. Eight of them is getting up there particularly if you're using some other temporary images along the way. You might use clear() to delete any scratch/temporary variables as soon as you're done with them to free up memory.
  댓글 수: 4
Hana
Hana 2015년 4월 11일
Is it possible to read the images line by line?
Image Analyst
Image Analyst 2015년 4월 11일
Yes, but when I suggested to read them image by image you said no. So if image by image is no good, then how is line by line going to work?

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

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by