1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| % --- Executes on button press in pushbutton1.
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 fo
global I
Y3='';
[imageo, uc2] = uigetfile( ...
{'*.bmp;*.gif;*.jpg;*', 'All Files (*.bmp, *.gif, *.jpg, *.tif,*.png)'; ...
'*.*', 'All Files (*.*)'}, ...
'ouvrir image');
if isequal(imageo,0) || isequal(uc2,0)
ind==0;
else
fo=imread(imageo);
%fo=double(fo);
ind=1;
axes(handles.axes1);cla;
imshow(fo);
% set(gcf,'position',[1 1 600 600]);
%Y3=im2bw(fo);
end
% --- Executes on button press in pushbutton2.
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 fo
global J
J=fo(:,:,1)>160;
axes(handles.axes2);cla;
imshow(J)
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global K
global J
K=bwmorph(~J,'thin','inf');
imshow(~K)
axes(handles.axes3);cla; |
Partager