フィルターのクリア

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 Center および File ExchangeImport, Export, and Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by