1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| % Création de l'objet "Traiter une image"
h=uicontrol('style','pushbutton',...
'units','normalized',...
'position',[0.65 0.7 0.25 0.08],...
'string','Traiter une image',...
'callback',@choiximage);
function [filename, pathname]=choiximage(varargin)
[filename, pathname]= uigetfile({'*.jpg;*.tif;*.png;*.gif','All Image Files';...
'*.*','All Files' },'mytitle',...
'C:\');
disp(['Nom du fichier: ',filename, ' Chemin accès: ',pathname]);
nbrimage=1;
end
% Création de l'objet affichage du nom de l'image
handles(5)=uicontrol('style','text',...
'units','normalized',...
'position',[0.65 0.4 0.2 0.075],...
'string', get(h,'callback'),...
'tag','resultat') |
Partager