Unable to determine the file format

조회 수: 7 (최근 30일)
Stelios Fanourakis
Stelios Fanourakis 2018년 6월 26일
댓글: Stelios Fanourakis 2018년 6월 26일
I use both imread and imtool to read my image wich is like this
imread('name.bmp')
OR
imtool('name.bmp')
and I get the error of "Unable to Determine the file format".
Why is that?
  댓글 수: 1
Stelios Fanourakis
Stelios Fanourakis 2018년 6월 26일
I used
A=dicomread('name.dcm')
I = imcrop(A,[0.5 0.5 851 154])
X = dicomwrite(I,'myname.dcm')
And I get error "The parameter name.dcm is not recognized by imageDisplayParsePVPairs."
Any idea?

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

채택된 답변

Jan
Jan 2018년 6월 26일
imread('name.bmp')
>> error of "Unable to Determine the file format"
(Please post a copy of the complete error message in every case.)
Most likely the BMP-file is damaged. Are you able to open the file with another software?
A = dicomread('name.dcm')
>> error "The parameter name.dcm is not recognized by imageDisplayParsePVPairs."
Mysterious. I guess, that you have redefined a built-in function and the toolbox functions are confused. Try to remove all user-defined folders from the path, e.g. by:
restoredefaultpath
Then try to call imread and dicomread again.
  댓글 수: 2
Stelios Fanourakis
Stelios Fanourakis 2018년 6월 26일
The whole error message is this
Error using imfinfo (line 113)
Unable to determine file format.
Error in images.internal.getImageFromFile (line 16)
img_info = imfinfo(filename);
Error in images.internal.imageDisplayParseInputs (line 74)
images.internal.getImageFromFile(common_args.Filename);
Error in imshow (line 241)
images.internal.imageDisplayParseInputs({'Parent','Border','Reduce'},preparsed_varargin{:});
Stelios Fanourakis
Stelios Fanourakis 2018년 6월 26일
Yeah, actually cannot open it using other software either. This BMP files was exported from imtool by a dicom image. I just pressed Save as .. bmp. It should work though

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by