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

답변 (1개)

Image Analyst
Image Analyst 2016년 7월 7일

0 개 추천

Just call "figure" anytime in your code that you want a brand new figure to be created.

댓글 수: 5

Laura Sels
Laura Sels 2016년 7월 7일
function simple_gui2
% SIMPLE_GUI2 Select a data set from the pop-up menu, then
% click one of the plot-type push buttons. Clicking the button
% plots the selected data in the axes.
f = figure('Visible','off','Position',[360,500,450,285]);
end
... something like this? How can I specify which figure I want to show?
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
Laura Sels 2016년 7월 7일
편집: Laura Sels 2016년 7월 7일
Ok. I get two graphs with each a linear line. But I want to display an image (from the browse). Where can I put this image?
Laura Sels
Laura Sels 2016년 7월 7일
S.fh = figure('units','pixels',... 'position',[500 500 200 260],... 'menubar','none',... 'name','puppy.fig',... 'numbertitle','off',... 'resize','off');
Something like this will work? Do I have to fill in alle the arguments?
Image Analyst
Image Analyst 2016년 7월 7일
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 ....."

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Display Image에 대해 자세히 알아보기

태그

질문:

2016년 7월 7일

댓글:

2016년 7월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by