Skip to content

Jomy10/photobooth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📸 Photobooth

A photobooth application for the Raspberry Pi and Pi camera


demo.mp4

Navigation

Setup

Hardware

The application has been tested and works on the following configuration:

All three products come with the necesarry pieces to connect them together.

This application has not been tested on other hardware, but I am open to pull requests adding support for them, or simply letting me know this application also works on a different hardware configuration.

In addition to the pi, screen and camera, a USB stick also needs to be connected and mounted on the pi (see the configuration section for auto mounting USB storage devices). Images will be saved on this USB stick for easy transfering to another computer.

back front

Software

  1. Install a new copy of Raspbery Pi OS Lite (64-bit) on your Raspberry Pi's SD-card
  2. For convenience, you can change the font size of the terminal using sudo dpkg-reconfigure console-setup
  3. Enable auto-login on boot:
    • sudo raspi-config
    • go to System Options
    • go to Boot / Auto Login
    • Select Console Autologin
  4. Edit the boot config
  5. Install the photobooth software; either build it from soure or download the latest binary
  6. Configure the photobooth software
  7. Start photobooth at boot: add the following to the end of ~/.bashrc:
    # Replace this with the path to your config file (or comment it out to
    # not apply any configuration)
    export PH_CONFIG=config.yaml
    
    # Replace this with the path to the photobooth executable
    # This line will start the application
    ./photobooth
  8. Reboot the pi: reboot

Install

Install the required dependencies:

sudo apt-get install \
  libinput-dev \
  libcamera-dev \
  libdrm-dev

Now either download the latest binary, or build from source.

Download

Pre-compiled binaries can be found in the the latest release.

You can also use this one-liner to download the latest release:

wget \
    "$( \
        curl -s https://api.github.com/repos/jomy10/photobooth/releases/latest |
        jq -r '.assets[] | select(.name=="Photobooth") | .browser_download_url' \
    )" -o photobooth && chmod +x photobooth

The command requires jq to parse json, which can be downloaded with sudo apt-get install jq.

Building from source

This program uses the experimental mpmc channels, so it requires nightly.

Download Noto Emoji and Space Mono Bold Google fonts (or change the used fonts in code) and place them in the root directory of the project.

Download Noto Emoji, not Noto Color Emoji. Color emojis are not supported.

cargo +nightly build --release

The application will now be located at target/release/photobooth.

Configuration

The PH_CONFIG environment variable can be set to point to a config file (yaml). Definition and defaults can be found in config.rs. Here, translations can be added tailored to the end user of the photobooth.

Automatically mounting USB devices

The photobooth application expects a USB storage device to be mounted. Using the automount utility in this repository, you can set up a service to automatically mount all USB devices connected to the PI.

Permissions

Make sure the user running the application has the write rights to /var/log and the mount point of your USB device.

Boot config

This should be present in /boot/firmware/config.txt

# Automatically load overlays for detected cameras
camera_auto_detect=1

# Automatically load overlays for detected DSI displays
display_auto_detect=1

# Automatically load initramfs files, if found
auto_initramfs=1

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

dtoverlay=cma,cma-256

Reboot if necessary:

sudo reboot

Additional notes

  • I have used a PI with 2GB of RAM, 1GB might not be enough.

Questions

For any questions, feel free to open an issue.

License

GNU GPL.

Photobooth: Photobooth software for touch screen devices
Copyright (C) 2024 Jonas Everaert

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Dependencies may be licensed differently.

About

A photobooth application for the Raspberry Pi and the Pi Camera Module

Topics

Resources

License

Stars

Watchers

Forks

Contributors