what code should i make for a reset, bit plane & grayscale push button for the following code?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 .
0 Commenti
Risposte (1)
Geoff Hayes
il 23 Lug 2016
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.
0 Commenti
Vedere anche
Categorie
Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!