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

20 visualizzazioni (ultimi 30 giorni)
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{:});

Risposte (1)

Yongjian Feng
Yongjian Feng il 20 Gen 2022
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 Commento
Dinh Trong Dung
Dinh Trong Dung il 8 Apr 2022
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});

Accedi per commentare.

Categorie

Scopri di più su Display Image in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by