How can I insert my foto in the MATLAB GUI?

link|improve this question
3  
Maybe this is a dumb question... is "my foto" some kind of app, or did you mean to say "one of my photographs/images"? – gnovice Dec 7 '09 at 22:21
feedback

migrated from stackoverflow.com Dec 8 '09 at 12:09

This question came from our site for professional and enthusiast programmers.

4 Answers

I work for MathWorks and recently made a video about inserting an image into a MATLAB GUI. You can view the video on the MATLAB blog.

link|improve this answer
feedback

Can't say much with your description, but you'll want to look at

help imageview
link|improve this answer
feedback

I wrote some lines of code for inserting an image into a MATLAB GUI without using the GUIDE.

sites.google.com/site/programmingtipsite/app-dev-w-guide/b-without-guide#Extra1

This particular set of code does not look very clean, but does work, and does not require the Image Processing Toolbox. (The function "imshow" used in Doug's video requires the toolbox.)

link|improve this answer
feedback

This is one of many ways to insert an image in a MATLAB GUI:

function hello_world
fig1=figure(  'Name','Figure with a Background Image','Menu','none', ... NumberTitle','off','Unit','normalized', ... 'Position',[.45 .45 .1 .1]);
load mandrill
image(X);colormap(map); %   <-- Plotting the image in the background...
set(gca,'position',[0 0 1 1]);%   <-- It would be ideal to explicitly specify the axis handle here...
axis off; axis equal

button1=uicontrol(fig1,'Style','pushbutton','Unit','Normalized', ... 'Position',[.2 .1 .6 .4],'String','Close','Callback',{@action_Callback});

function action_Callback(~,~)
    % On an earlier version of MATLAB, type:
    % function action_Callback(a,b)
    % instead, for example...
close(gcbf);
link|improve this answer
feedback

Your Answer

 
or
required, but never shown