matlab code for automated images slideshow?
Mostra commenti meno recenti
hi all, i want images sledeshow in my gui but make sure that images slides must be change automatically..kindly help
Risposta accettata
Più risposte (2)
Mischa Kim
il 1 Feb 2014
0 voti
Shivaputra Narke
il 1 Feb 2014
0 voti
% if you want to use with timer %% create a timer %%% create a new file with following code and name it as main .
global indx indx=1; showTimer=timer('timerFcn',@slideshow); set(a,'ExecutionMode','fixedRate'); set(a,'Period',2) %% 2 sec delay start(a)
%%% create a function function slideshow(varargin) global indx imgNameList= char('img1.tif','img2.tif','img3.tif'); indx=indx+1; if indx> length(imgNameList) indx=1; end imshow(a); drawnow;
%%% Now run main file
5 Commenti
romasha
il 1 Feb 2014
Shivaputra Narke
il 1 Feb 2014
what is the error?
Shivaputra Narke
il 1 Feb 2014
You have two create two files. one that is your main file normal script other is function file.
create a new file and save it as slideshow and enter following code
function slideshow(varargin) global indx imgNameList= char('img1.tif','img2.tif','img3.tif'); indx=indx+1; if indx> length(imgNameList) indx=1; end imshow(a); drawnow;
%%% End of function %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Now create new file and save it as you want with following code,
global indx indx=1; showTimer=timer('timerFcn',@slideshow); set(a,'ExecutionMode','fixedRate'); start(a)
romasha
il 1 Feb 2014
Shivaputra Narke
il 2 Feb 2014
replace a by showTimer
Categorie
Scopri di più su Fluid Dynamics in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!