Simultaneously display image on two monitors
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Stephen23
el 24 de Feb. de 2019
Editada: Stephen23
el 6 de Mzo. de 2019
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 comentarios
Guillaume
el 8 de Mzo. de 2019
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.
Ver también
Categorías
Más información sobre Environment and Settings en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!