Fullscreen Image Display and Looping
5 ビュー (過去 30 日間)
古いコメントを表示
Hi all, Doing some work with multiple images and trying to get them to display fullscreen. I'm a beginner programmer and haven't used functions but am aware of the "fullscreen.m" function which is discussed in such posts (but don't know how to implement if it's the best solution). My code is shown below, where images are read from the PWD as "image 1.bmp", "image 2.bmp", etc, then displayed in the created figure. Matlab typically resizes the figure to fit the screensize, but this is much smaller than the fullscreen (eg 67% of the screensize).
Inp1_Quest = {'How many images are to be loaded?','How long should each image display for (sec)?','How many loops are required?','Image Zoom (%)'};
Inp1_Default = {num2str(5),num2str(0.5),num2str(50),num2str(75)};
Inp1_Main = inputdlg(Inp1_Quest, 'Input Params', 1, Inp1_Default);
NbrImg = str2double (Inp1_Main{1});
DispTime = str2double (Inp1_Main{2});
NbrRpts = str2double (Inp1_Main{3});
SzScl = str2double(Inp1_Main{4}) / 100;
CntPTS = 1;
figure;
for CntPTS = 1:NbrRpts
for i = 1 : NbrImg
iFileName = ['Image ' num2str(i) '.bmp'];
ResizedImg = imresize(imread(iFileName),SzScl);
imshow(ResizedImg);
pause(DispTime);
end
end
Any help would be appreciated!
0 件のコメント
回答 (1 件)
Image Analyst
2015 年 1 月 21 日
Use Yair Altman's code for maximizing the window, attached. Works with both R2014b and earlier versions.
2 件のコメント
Image Analyst
2015 年 1 月 22 日
Pete's "Answer" moved here since it's not an "Answer" to his original question
Hi ImageAnalyst,
Using this code appears to maximise the figure window, but I want it to replicate essentially the "full-screen" preview so the image fills the complete screen without borders etc...
I might be doing it wrong, but this topic seems to keep coming up!
Cheers
Image Analyst
2015 年 1 月 22 日
I don't know how to get a figure up with no standard window borders and title bars. You might somehow have to use DirectX or something.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!