Read the Image from the path and display the image in MATLAB GUI axes

3 次查看(过去 30 天)
Hello,
I am using MATLAB GUI guide to to develop the GUI for my project. I need to select the image from the folder (.png images) and display the selected image on axes in GUI. This action has to be done once the push button is clicked by the user.
Please let me know the function which helps me to meet my requirement.
Looking forward to hear from you at the earliest .
Thanks Pankaja
  2 个评论
Adam
Adam 2015-7-3
Have you looked through the help? I'm fairly sure there are examples of this type of thing in there.
doc guide
doc imread
B.k Sumedha
B.k Sumedha 2015-7-3
How many images u want to display in the gui?
Are you selecting any one particular image from your path? Specify the requirements correctly.

请先登录,再进行评论。

采纳的回答

Image Analyst
Image Analyst 2015-7-3
Just use the MAGIC framework to get started. It does all that and has template code for all the possible controls you might want to use.
Description This GUI will help the novice user get up to speed very quickly on using GUI-based applications. Everything is laid out in a very simple Step 1, Step 2, Step 3, etc. layout. It is a very good starting point for a typical image analysis application. This application uses GUIDE to do the user interface design, and has most of the basic controls such as buttons, listboxes, checkboxes, radio buttons, scrollbars, etc. It allows the user to select a folder of images, select one or more images and display them, to select a series of options, and to individually or batch process one or more images. The user can

更多回答(1 个)

Joep
Joep 2015-7-3
编辑:Joep 2015-7-3
If you are using the normal GUI builder, then you create automatically functions for the handles. Put under your buttonfunction the follow commands:
for opening file you can use this function:
for opening a folder you can use:
save the this path. I use for this setappdata.
then you need to recall your figure function and update it.
you can now can get the path by using getappdata
Few work example are given by Doug Hull, you should check these. They explained a lot for me.
Tip: Use a button with a commend Keyboard so you can use this button to debug

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by