This is the repository for OpenGhost, an open-source Pepper's Ghost display that uses a Raspberry Pi 5 with a camera, square screen, and a beam splitter cube as the transparent reflector, which sits on top of the screen. Additional peripherals, such as microphones, speakers, etc., can be added for some more interactivity via the USB ports.
OpenGhost intends to be a futuristic and aesthetic display medium that can run all sorts of visual and interactive programs, so feel free to get creative by adding your own scripts or modifying the hardware/designs!
![]() |
![]() |
|---|---|
| 50 mm beam splitter cube | 70 mm beam splitter cube |
- Raspberry Pi 5 (other versions should work, but the software installation may differ) + SD card
- HyperPixel 4.0 Square - Hi-Res Display for Raspberry Pi (touchscreen version). Any 4-inch square screen that can attach to the Raspberry Pi 5 pins should work as well
- 70 mm beam splitter cube or 50 mm beam splitter cube (I got them off Aliexpress)
- 5V 5A USB-C power supply (5V 3A is suitable as well, but the former is recommended)
- 4x M2.5x14 mm screws
- 3D printed STL files in
/stl_files - Camera (optional). The one shown is the Raspberry Pi Camera Module 3
I'm using the Python library py5 to display graphics. If you are planning to do the same, follow these instructions:
- Install Raspberry Pi OS Bookworm (uses Python 3.11)
- Enable the square display on the Pi by following these instructions. If you used a different display, follow the manufacturer's instructions to enable it
- Install a virtual environment with system site packages
python -m venv .venv --system-site-packages - Install Java headless using
sudo apt update && sudo apt install default-jdk - Install py5 using
pip install py5(requires Java) - Clone this repo
- Downgrade numpy to
numpy==1.26.4(any numpy version less than 2.0) - Install dependency
sudo apt install libcap-dev - Install picamera2 using
pip install picamera2 - Install libcamera
sudo apt install libcamera-apps python3-libcamera python3-picamera2
- Open a terminal and activate the virtual environment
- Run
export DISPLAY=:0.0if the terminal session is new - Run the desired Python file

