Simultaneously display image on two monitors
조회 수: 4 (최근 30일)
이전 댓글 표시
My laptop is connected to two external monitors. I would like an image to appear on each monitor at exactly the same time. When I use this script, the image appears on the monitor for axHandle1 slightly before axHandle2:
figHandle=figure('WindowState', 'fullscreen','MenuBar', 'none', 'ToolBar', 'none','OuterPosition',[4000 0 2560 1440],'color','w');
axHandle1 = axes('Units','normalized','Position',[0 0 1 1],'color','w');
figHandle=figure('WindowState', 'fullscreen','MenuBar', 'none', 'ToolBar', 'none','OuterPosition',[1440 0 2560 1440],'color','w');
axHandle2 = axes('Units','normalized','Position',[0 0 1 1],'color','w');
imshow(rgb1,'Parent',axHandle1);
imshow(rgb2,'Parent',axHandle2);
댓글 수: 0
답변 (1개)
Stephen23
2019년 2월 24일
편집: Stephen23
2019년 3월 6일
Try:
imh(1) = imshow(...., 'Visible','off');
imh(2) = imshow(...., 'Visible','off');
then later:
set(imh, 'Visible','on')
EDIT: Create the figures (or uipanels) with their Visible property set to 'off':
fgh(1) = figure(...., 'Visible','off');
fgh(2) = figure(...., 'Visible','off');
axh(2) = axes(..., 'Parent',fgh(2));
axh(1) = axes(..., 'Parent',fgh(1));
imh(2) = imshow(..., 'Parent',axh(2));
imh(1) = imshow(..., 'Parent',axh(1));
Then, when you want them to both appear simultaneously:
set(fgh, 'Visible','on')
댓글 수: 12
Guillaume
2019년 3월 8일
I have no idea if you can do anything better than what Stephan suggested, but you have to bear in mind that what you want may not be achievable as you only control the first link of a fairly long chain. To get an image displayed, it goes through:
- matlab
- the java virtual machine
- the OS
- the graphics card
- the monitor panels
Any of these can introduce a jitter over which you have no control.
참고 항목
카테고리
Help Center 및 File Exchange에서 Environment and Settings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!