Borrar filtros
Borrar filtros

Having trouble displaying an image

19 visualizaciones (últimos 30 días)
Kendall Donahoe
Kendall Donahoe el 31 de Mzo. de 2021
Respondida: Divya Gaddipati el 6 de Abr. de 2021
I've been trying to display an image of the avatar on matlab and have been using A=imread('avatar.jpg') but it keeps coming up with the error- Undefined function 'getFileFromURL' for input arguments of type 'char'. I was wondering what I can do to fix this problem
  5 comentarios
Kendall Donahoe
Kendall Donahoe el 1 de Abr. de 2021
I attached the file @Image Analyst
Meg Noah
Meg Noah el 1 de Abr. de 2021
This works:
A = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/569324/avatar.jpg');

Iniciar sesión para comentar.

Respuestas (1)

Divya Gaddipati
Divya Gaddipati el 6 de Abr. de 2021
You need to specify the entire path to the image's location.
im = imread('/path/to/image/avatar.jpg');
Another option would be copy/move the image to your current location and then read the image.
im = imread('avatar.jpg');

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by