Effacer les filtres
Effacer les filtres

why this type of errors

1 vue (au cours des 30 derniers jours)
aswathy
aswathy le 21 Sep 2014
Commenté : Image Analyst le 21 Sep 2014
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')

Réponses (2)

Image Analyst
Image Analyst le 21 Sep 2014
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 commentaires
Image Analyst
Image Analyst le 21 Sep 2014
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 le 21 Sep 2014
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).

Connectez-vous pour commenter.


Star Strider
Star Strider le 21 Sep 2014
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.

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by