Effacer les filtres
Effacer les filtres

User selects image in gui and selected image goes into axes??

4 vues (au cours des 30 derniers jours)
lc1994
lc1994 le 25 Fév 2016
Commenté : lc1994 le 25 Fév 2016
I have a gui, and a push button which the user will click, it will then open and the user will select and image. I then want this selected image to go into the axes. So far this is the code i have, but no images goes into axes after selecting.
i = uigetfile({'*.png';});
axes(handles.axes1)
imshow(i);

Réponse acceptée

Kevin Claytor
Kevin Claytor le 25 Fév 2016
The variable 'i' in your code is the filepath to the image, not the image itself, you still have to load the image:
i = uigetfile({'*.png';});
img = imread(i);
axes(handles.axes1);
imshow(img);

Plus de réponses (0)

Catégories

En savoir plus sur Migrate GUIDE Apps 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