필터 지우기
필터 지우기

Unable to read image

조회 수: 23 (최근 30일)
swati mane
swati mane 2019년 9월 12일
댓글: Michal 2019년 9월 12일
Dear sir /mam
I have following code :
imgFiles =dir('*.jpg'); numFiles =numel(imgFiles);
for j=1:1:numFiles; if j<=numFiles;
img=imread(imgFiles(j).name); imshow(img); y =rgb2gray(img); imshow(y);
I have error that undefined function or method imftype for input arguments of type char
How to resolve..thanks in advance.
  댓글 수: 1
Michal
Michal 2019년 9월 12일
It seems that imftype is called by imread to determine the file format. As a workaround, have you tried explicitly stating the file format since all your images are .jpg:
img=imread(imgFiles(j).name,'jpg');
Similar issue is reported here. Could be a version problem? Sorry, I have no other ideas.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Import, Export, and Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by