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

22 ビュー (過去 30 日間)
Nabeela Ahmad
Nabeela Ahmad 2021 年 12 月 16 日
コメント済み: Dinh Trong Dung 2022 年 4 月 8 日
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 Center および File ExchangeDisplay Image についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by