Having trouble displaying an image

조회 수: 22 (최근 30일)
Kendall Donahoe
Kendall Donahoe 2021년 3월 31일
답변: Divya Gaddipati 2021년 4월 6일
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
Kendall Donahoe
Kendall Donahoe 2021년 4월 1일
I attached the file @Image Analyst
Meg Noah
Meg Noah 2021년 4월 1일
This works:
A = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/569324/avatar.jpg');

댓글을 달려면 로그인하십시오.

답변 (1개)

Divya Gaddipati
Divya Gaddipati 2021년 4월 6일
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');

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by