Error using images.internal.imagedisplayParseInputs
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello, i am trying to open this image, but it gives me the following error message:
f = figure('visible', true); % new figure in its own figure window
imshow('resin_canal.jpg')
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1093955/image.png)
Could anyone pleae help me with it?
댓글 수: 1
Walter Roberson
2022년 8월 11일
That file, resin_canal.jpg does not exist in the current directory or anywhere on the MATLAB path.
Are you looking for this:
filename = 'https://d2vlcm61l7u1fs.cloudfront.net/media%2F244%2F2441f05a-fd89-41c6-a06a-7c9a440a7053%2FphpcP4dl1.png';
img = imread(filename);
imshow(img)
답변 (1개)
Kunal Kandhari
2022년 8월 17일
Hi,
That’s likely because the image 'resin_canal.jpg' does not exists in your MATLAB directory or current folder where your MATLAB script is written.
Solution to this problem is to check that the image 'resin_canal.jpg' resides in the current folder or provide the full path to that image.
And before showing the image, you need to read it by using function
imread(image_path)
Correct code:
f = figure('visible', true);
img=imread(filename);
imshow(img);
Hopefully it solves your issue
댓글 수: 1
Walter Roberson
2022년 8월 17일
It is valid to pass a file name to imshow()
참고 항목
카테고리
Help Center 및 File Exchange에서 File Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!