View on GitHub

Photobooth

A photobooth application for your Raspberry Pi or linux computer build with QT Quick

Overview

This project contains yet another Photobooth. The software is intended to run on a Raspberry Pi 3B and upwards, but it can run on any Linux PC. At least a Raspberry Pi 5 is recommended when using the AI background replacement. A preview image is displayed in capture mode. After countdown, a picture is taken and can be discarded or saved. Saved images can be printed immediately or printed as a collage image with multiple photos. All saved images are shown on the front page when the photobox is idle.

Photo capture is supported via multiple camera backends:

Backend Camera Types Notes
V4L2 USB Webcams, capture cards Standard Linux video interface
libcamera Raspberry Pi Camera Modules Pi Camera v1/v2/v3, HQ Camera
GPhoto2 DSLR, mirrorless cameras See supported cameras

The application is distributed via Flathub. But interested people can compile the software by themselves. The photobooth application used a Yocto Linux deployment in the past. This deployment is deprecated now, because the distribution via Flatpak is more convenient.

Installation

The primary distribution method is via Flatpak. Flatpak can be installed on most x86_64 and aarch64 Linux distributions and includes all dependencies.

# Install from Flathub
flatpak install io.github.saeugetier.photobooth

# Run the application
flatpak run io.github.saeugetier.photobooth

Or launch via the desktop application menu.

Raspberry Pi with libcamera

For Raspberry Pi Camera support, ensure your camera is properly configured:

  1. Enable the camera in /boot/firmware/config.txt:
    # For Pi Camera Module 3
    dtoverlay=imx708
       
    # For Pi Camera Module 2
    dtoverlay=imx219
       
    # For Pi Camera Module 1
    dtoverlay=ov5647
    
  2. Reboot and verify the camera is detected:
    libcamera-hello --list-cameras
    
  3. Install and run the Flatpak as described above.

Configuration

Configuration File

The local configuration file is stored in:

~/.config/saeugetier/qtbooth.conf

The file contains all application settings including:

Template Files

The local template files for your collage images are stored in:

~/.local/share/saeugetier/qtbooth/

It contains:

Templates can be imported from USB storage. All files with extensions xml, jpg, png, svg in the folder layout will be copied to the local template folder.

For instructions on creating custom templates, see the README.

Basic Instructions

Video

(Link to Youtube)

Technology

Software

Framework: Qt 6.5 or higher - https://qt.io

Distribution: Flatpak (primary), native builds supported

Neural Network Runtime: The application supports real-time background removal using neural networks. Available runtimes:

Tested Hardware

Platforms:

Cameras:

Printers:

Light/Flash: LED flash can be driven via Raspberry Pi GPIO. Tested configuration:

Display: A touchscreen connected via HDMI is highly recommended.

I2C RTC: If using a Raspberry Pi, it is recommended to use a realtime clock.

Housing: Plywood 8mm - Cutting via laser cutter. Template generated with http://festi.info/boxes.py/

My own housing is documented in a separate git repository: https://github.com/saeugetier/photobooth_hardware

System Diagram

                                 .------------. Current .---------.
                                 | LED Driver |-------->| 20W LED |
                                 '------------'         '---------'
                                    ^
                                    |
                          ENABLE/PWM|          .-----------------------.
                                    |          |                       |
                                    |          |  Camera               |
                    .------------------.       |  - USB Webcam (V4L2)  |
                    |      Raspi       |<------|  - Pi Camera          |          -.-.-,~ .   
                    |    Application   |       |    (libcamera)        |          )     (     
                    |                  |       |  - DSLR (GPhoto2)     |          |_    |     
                    |     based on     |       '-----------------------'          /(_)---`\   
                    |     QT/Quick     |                                         (_      -'   
                    |                  |           .-------------.                ]      |    
                    |                  |           | Touchscreen |                |    _,')   
                    |                  |  USB/HDMI |             |                [_,-'_-'(   
                    |                  |---------->|             |               (_).-'    \  
                    |                  |           |             |               / /        \ 
                    '------------------'           |             |
                             |                     '-------------'
                         USB |
                             |
                             v 
                          Storage
                         _.-----._   
                       .-         -.
                       |-_       _-|
                       |  ~-----~  |
                       |           |
                       `._       _.'
                          "-----"