Skip to content

Display image in fullscreen for the projector-camera system.

License

Notifications You must be signed in to change notification settings

elerac/fullscreen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FullScreen

Display image in fullscreen for the projector-camera system.

example3-gif

Python has some GUI tools, but only a few of them are suitable for fullscreen display. In this repository, Tkinter or OpenCV or PyQt5 can be used as the backend. The best backend depends on the environment (i.e., OS, monitor, version of the software), so choose the best one for you.

Note

Recently, I released a new fullscreen program using OpenGL/GLFW in Python. I confirmed it could run at 60 fps, which achieves much faster pro-cam synchronization. You can check it out at https://github.com/elerac/pyglimshow.

Requirement

Tkinter backend (default)

  • Pillow (PIL)

OpenCV backend (optional)

PyQt5 backend (optional)

  • Pillow (PIL) or OpenCV
  • PyQt5

Usage

Basic imshow

import time
import cv2
from fullscreen import FullScreen

screen = FullScreen()

image = cv2.imread("image/himeji_castle.jpg", 1)

screen.imshow(image)

time.sleep(3)

Get the size of the screen

height, width, ch = screen.shape

Choosing backend

screen = FullScreen(backend="tkinter") # default
screen = FullScreen(backend="cv2")
screen = FullScreen(backend="PyQt5")

Testing environment

OS Hardware Python Backend
macOS Catalina MacBook Pro (13-inch, 2017) 3.8 Tkinter 8.6.11
macOS Catalina MacBook Pro (13-inch, 2017) 3.8 OpenCV-Python 4.4
macOS Catalina MacBook Pro (13-inch, 2017) 3.8 OpenCV-Python 4.5
macOS Catalina MacBook Pro (13-inch, 2017) 3.8 PyQt5 5.15
macOS BigSur MacBook Pro (13-inch, 2017) 3.7 Tkinter 8.5.9
macOS BigSur MacBook Pro (13-inch, 2017) 3.9 Tkinter 8.6.11
macOS BigSur MacBook Pro (13-inch, 2017) 3.9 OpenCV-Python 4.4
macOS BigSur MacBook Pro (13-inch, 2017) 3.9 OpenCV-Python 4.5
macOS BigSur Mac Pro (2019) 3.9 Tkinter 8.5.9
macOS BigSur Mac Pro (2019) 3.9 Tkinter 8.6.11
macOS BigSur Mac Pro (2019) 3.8 OpenCV-Python 4.4
macOS BigSur Mac Pro (2019) 3.8 OpenCV-Python 4.5
Windows 10 ThinkPad (L580) 3.9 Tkinter 8.6.9
Windows 10 ThinkPad (L580) 3.9 OpenCV-Python 4.4
Windows 10 ThinkPad (L580) 3.9 OpenCV-Python 4.5
Ubuntu 20 (GNOME) 3.8 Tkinter 8.6.10
Ubuntu 20 (GNOME) 3.8 OpenCV-Python 4.5
🤔 Ubuntu 20 (KDE) 3.8 Tkinter 8.8.10
Ubuntu 20 (KDE) 3.8 OpenCV-Python 4.4

Although I have mainly tested on Mac, it should also work on Windows and Ubuntu as the software is cross-platform.

To summarize the above table, the following cases do not seem to work well ❌,

In some cases, it works but may not be perfect 🤔,

  • On Ubuntu, Tkinter could not display the first image, but the second and later images work well.

About

Display image in fullscreen for the projector-camera system.

Topics

Resources

License

Stars

Watchers

Forks

Languages