Implement a figure in GUI
Show older comments
Hello,
I want to implement different images (from the web) (which will pop up separately) in GUI. Is this possible? I have no experience with GUI so it is very hard to find.
Can anybody help me?
Laura
Answers (1)
Image Analyst
on 7 Jul 2016
0 votes
Just call "figure" anytime in your code that you want a brand new figure to be created.
5 Comments
Laura Sels
on 7 Jul 2016
Image Analyst
on 7 Jul 2016
You can pass the handle back into the figure function.
f1 = figure('Visible','off','Position',[360,500,450,285]);
f2 = figure('Visible','off','Position',[500,300,650, 985]);
% Switch to figure 1
figure(f1);
plot(1:10, 'r*-'); % Plot in figure 1
% Switch to figure 2
figure(f2);
plot(1:20, 'bs-'); % Plot in figure 2
Laura Sels
on 7 Jul 2016
Edited: Laura Sels
on 7 Jul 2016
Laura Sels
on 7 Jul 2016
Image Analyst
on 7 Jul 2016
Instead of calling plot(), call imshow() to display an image. Or display anything you want with bar(), surf(), or whatever.
Perhaps you want to get up to speed quickly with a framework that is already built: http://www.mathworks.com/matlabcentral/fileexchange/24224-magic-matlab-generic-imaging-component
"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 ....."
Categories
Find more on Display Image in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!