Access image information in multiply pushbuttons-Howto

1 vue (au cours des 30 derniers jours)
as hz
as hz le 6 Fév 2013
Dear All,
I have a GUI pushbutton that allows me to choose an image (I) and shows it in Axes. I wish to use the same image (I) information for another operation using another pushbutton without the necessity to call it again but it can not access it. How can I do it.
Thanks.
  1 commentaire
Jan
Jan le 6 Fév 2013
This is a vague question yet. Without the necessity to call wahat again? And what cannot access what?

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 6 Fév 2013

Plus de réponses (1)

Jan
Jan le 6 Fév 2013
I guess, that you want to store the image data in the GUI figure:
img = imread(FileName);
axes;
image(img);
handles.image_data = img;
guidata(hObject, handles);
Now you can access the image data from each other callback:
function yourcallback(hObject, EventData, handles)
handles = guidata(hObject);
disp(handles.image_data);
But perhaps you want something completely different.

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by