Fullscreen Image Display and Looping
9 次查看(过去 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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Entering Commands 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!