필터 지우기
필터 지우기

Access image information in multiply pushbuttons-Howto

조회 수: 1 (최근 30일)
as hz
as hz 2013년 2월 6일
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
Jan
Jan 2013년 2월 6일
This is a vague question yet. Without the necessity to call wahat again? And what cannot access what?

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2013년 2월 6일

추가 답변 (1개)

Jan
Jan 2013년 2월 6일
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.

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by