フィルターのクリア

Why my GUI (made with guide) opens with a specific image on my computer, and gives error while loading another one?

1 回表示 (過去 30 日間)
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 件のコメント
Adam
Adam 2016 年 3 月 22 日
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.
Arif ul Maula
Arif ul Maula 2016 年 3 月 23 日
AIM: OK, I am developing a GUI on MATLAB for image analysis. It should be able to work on other computers with no MATLAB. This means it should be able to read data present in the different folders on other computers.
PROBLEMS: I have created one GUI with GUIDE and created a window app using deploytool in MATLAB 2016b. It worked fine with images in the same folder as my .exe file for that app is present after deployment, but not for other directories. I put 3 different images in the same folder as the .exe. It worked fine with images for some days. It always load with the default graph with axis. So, normally I load one of 3 images and do analysis. But some days ago, it always open up with one of the images and when I read a second image through it, the image is loaded and errors as written in previous post keep on appearing.
THINGS TO DO:
I would like to know what could have possibly happened. If you would like to see the code, I can share with you.
Secondly, I would really like to know why I am not able to read the images from other directories. I am using: foldername = uigetdir(); However, I noted one thing that it runs this command and only add directory of app , no matter what I select.
I would really appreciate your help.
best regards.

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

採用された回答

Image Analyst
Image Analyst 2016 年 3 月 23 日
編集済み: Image Analyst 2016 年 3 月 23 日
Most likely you're not specifying the full filename properly.
Also, let's see what you do between calling uigetdir() and imread() or whatever.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by