Why my GUI (made with guide) opens with a specific image on my computer, and gives error while loading another one?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Arif ul Maula
am 22 Mär. 2016
Kommentiert: Arif ul Maula
am 12 Apr. 2016
This is the error I get, when I try to load new image (the image is loaded my moving cursor on GUI gives this error):
*Error while evaluating Figure WindowButtonMotionFcn
Error using matlab.graphics.primitive.Image/get Invalid or deleted object.
Error in impixelinfoval/displayPixelInfo (line 126) elseif strcmp(get(him,'tag'),'rset overview')
Error in iptaddcallback/callbackProcessor (line 147) fun(varargin{:});
Error while evaluating Figure WindowButtonMotionFcn*
Previously it was working fine. Now when I load the GUI by running .m file, it opens in one folder above and not in the same folder :(. Please help!!! I am using MATLAB 2016a
2 Kommentare
Adam
am 22 Mär. 2016
You haven't given enough information. We don't know what is in your WindowButtonMotionFcn.
If it is doing something expecting an image to be there, but you have temporarily deleted the image while you load another one then that would lead to something similar to that.
I'm not really sure what you mean about the folder in which it opens and how that related to the error you mention.
Akzeptierte Antwort
Image Analyst
am 23 Mär. 2016
Bearbeitet: Image Analyst
am 23 Mär. 2016
Most likely you're not specifying the full filename properly.
See the FAQ: http://matlab.wikia.com/wiki/FAQ#Why_can.27t_my_standalone_compiled_executable_find_my_files.3F
Also, let's see what you do between calling uigetdir() and imread() or whatever.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!