フィルターのクリア

why this type of errors

1 回表示 (過去 30 日間)
aswathy
aswathy 2014 年 9 月 21 日
コメント済み: Image Analyst 2014 年 9 月 21 日
Error in ==> imread at 1 function [X, map, alpha] = imread(varargin)
??? Output argument "X" (and maybe others) not assigned during call to "D:\matlab new\toolbox\matlab\imagesci\imread.m>imread".
Error in ==> Untitled2 at 3 i=imread('peppers.jpg')

回答 (2 件)

Image Analyst
Image Analyst 2014 年 9 月 21 日
It works for me, at least it does for peppers.png which is a standard demo image. Can you read peppers.jpg with any other program? Can you attach it here?
  3 件のコメント
Image Analyst
Image Analyst 2014 年 9 月 21 日
aswathy's "Answer" moved here since it was a Comment on my Answer rather than an independent Answer to his original question:
sir not only this image ,when i read all the images it show the same error what was the problem,i think its directory change what can i do
Image Analyst
Image Analyst 2014 年 9 月 21 日
aswathy, if by "directory change" you mean that the image is not in the current folder, or on the search path, that's not the problem. You'd get a different error if that were the case. It would say
>> imread('peppers.jpg')
Error using imread (line 349)
File "peppers.jpg" does not exist.
If it happens with all files, then most likely your imread.m file has been corrupted. You may need to reinstall. Just to make sure it's not calling the wrong imread (the one at "D:\matlab new\toolbox\matlab\imagesci\imread.m"), do this command:
which -all imread
It should show just one, which for Windows is normally at "C:\Programs Files\MATLAB\R2014a\toolbox\matlab\imagesci\imread.m" but could be at "D:\matlab new\toolbox\matlab\imagesci\imread.m" if you changed the installation folder during installation.
You asked "what can i do" - well, other than using which command like I mentioned above, in my answer I asked if you could attach peppers.jpg (perhaps you overlooked that suggestion).

サインインしてコメントする。


Star Strider
Star Strider 2014 年 9 月 21 日
Be sure you’re reading an image file that is actually on your computer.
In the Command Window, type:
which peppers.png -all
When I do it, I get:
C:\Program Files\MATLAB\R2014a\toolbox\matlab\imagesci\peppers.png
You should get something similar.
However, when I type:
which peppers.jpg -all
I get:
'peppers.jpg' not found.

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by