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

25 visualizaciones (últimos 30 días)
Nabeela Ahmad
Nabeela Ahmad el 16 de Dic. de 2021
Comentada: Dinh Trong Dung el 8 de Abr. de 2022
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{:});

Respuestas (1)

Yongjian Feng
Yongjian Feng el 20 de En. de 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 comentario
Dinh Trong Dung
Dinh Trong Dung el 8 de Abr. de 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});

Iniciar sesión para comentar.

Categorías

Más información sobre Display Image en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by