i have an image which i call using a pushbutton and i want to use the same image in another pushbutton but with a code to alter its composition like imbinarize

1 vue (au cours des 30 derniers jours)
function pushbutton1_Callback(hObject, eventdata, handles) % hObject handle to pushbutton1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) global I [filename, pathname] = uigetfile({'.jpg';'.tif';'.png'}); I = strcat(pathname, filename); figure imshow(I),title('Original');
function pushbutton2_Callback(hObject, eventdata, handles) % hObject handle to pushbutton2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) %global I; handles.img = imread(FileName); Bw=uint8(handles.img); BW = im2bw(Bw, 0.5); figure,imshow(BW); %imwrite(BW,'im2bw.tif'); guidata(hObject,handles);

Réponse acceptée

Image Analyst
Image Analyst le 10 Juin 2018

Plus de réponses (0)

Catégories

En savoir plus sur Interactive Control and Callbacks 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