Error using images.int​ernal.getI​mageFromFi​le in matlab R2016a

21 次查看(过去 30 天)
Error using images.internal.getImageFromFile (line 7) The specified filename is not a string.
Error in montage>getImagesFromFiles (line 355) [img, map] = images.internal.getImageFromFile(fileNames{1});
Error in montage>parse_inputs (line 241) [I,cmap] = getImagesFromFiles(varargin{1});
Error in montage (line 114) [I,cmap,mSize,indices,displayRange,parent] = parse_inputs(varargin{:});

回答(1 个)

Yongjian Feng
Yongjian Feng 2022-1-20
images.internal.getImageFromFile expects the input argument to be string (the filename for the image). But it is something else. That is what the error means.
How did you get into this error please? Did you call montage with some inputs?
  1 个评论
Dinh Trong Dung
Dinh Trong Dung 2022-4-8
could you help me? i have tried many times
this my code :
img = imread('00187.jpg');
imgGray = rgb2gray(imread('00187.jpg'));
imshow(imgGray);
BW = imbinarize(imgGray);
imshow(BW);
montage({imgGray, BW});
this is error:
Error using images.internal.getImageFromFile (line 7)
The specified filename is not a string.
Error in montage>getImagesFromFiles (line 355)
[img, map] = images.internal.getImageFromFile(fileNames{1});
Error in montage>parse_inputs (line 241)
[I,cmap] = getImagesFromFiles(varargin{1});
Error in montage (line 114)
[I,cmap,mSize,indices,displayRange,parent] = parse_inputs(varargin{:});
Error in w3 (line 6)
montage({imgGray, BW});

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Display Image 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by