what code should i make for a reset, bit plane & grayscale push button for the following code?

as i have 2 axes one is for original image & 2 is for processed image. the code for loading the image by the user on 1 axis is mentioned below:
axes(handles.org);
[fn pn] = uigetfile('*.jpg','select image');
if fn == 0
msgbox('NO FILE SELECTED');
else
handles.I = imread(fullfile(pn,fn));
imshow(handles.I);
set(handles.proce,'visible','off');
set(handles.text5,'String','');
end
now i want code for all the 3 push buttons that i mentioned in my question bt remember one thing that the code for reset button should be like this so that when i clicked on it it will give original image on 2 axis. whenever i used this code for grayscale push button nothing is going to be done.
handles.grayscale =im2gray(handles.I);
axes(handles.proce);
imshow(handles.grayscale);
similarly when i m using this code for reset button also nothing done.
axes(handles.proce);
imshow(handles.I);
is their anything wrong with this code? if it is mention the code for all the 3 buttons .

답변 (1개)

Abhishek - are you observing any problems with the above code? If so, what are they? If you are using GUIDE to create your GUI, then every time you update the handles structure, you will need to save those changes to it using
guidata(hObject,handles);
This way, the original image I will be available to the other callbacks.

카테고리

도움말 센터File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

태그

질문:

2016년 7월 11일

답변:

2016년 7월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by