Why do I receive a Null Count for Tag reading a TIFF file using IMREAD in MATLAB (R2013a)?

조회 수: 5 (최근 30일)
I have a TIFF file that causes the following warning when I open it using IMREAD:
Warning: Zero count for ImageDescription tag.
Warning: Zero count for tag.
Warning: TIFF library error - '_TIFFVSetField: T:\1-NC0R95\noread.tiff: Null count for "Tag 50838" (type 4, writecount -3, passcount
1).' - file may be corrupt.
I can open the image in ImageJ without any problem. In fact, I can then re-save the image in ImageJ and open it in MATLAB.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2013년 7월 3일
It seems that the file is corrupted and is not TIFF-format compliant. When you open and save it using ImageJ (for example), it is likely that this latter formats it correctly and fills in the Tag and ImageDescription fields which seem to be missing in your original file.
A workaround would be to use the MATLAB class function TIFF which is MATLAB's getaway to LibTiff libraries.
Here is simple example:
T = Tiff('myImage.tiff');
I = read(T);
imshow(I);

추가 답변 (0개)

카테고리

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

제품


릴리스

R2013a

Community Treasure Hunt

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

Start Hunting!

Translated by