Skip to main content

Photobooth python package. Based on QTs Web Interface and gphoto2 package.

Project description

Photobooth

Photobooth application purely written in Python. Controlling a dslr camera and capturing photo.

PyPI - Licence Current version on PyPI PyPI - Python Version

Installation on RaspberryPi

Installing the Photobooth package

$ sudo apt-get -y update && sudo apt-get -y upgrade && sudo apt-get -y autoremove
$ sudo apt-get -y install python3-pip python3-pyqt5 libgphoto2-dev
$ sudo pip install photobooth[dslr,rpi]

Start the photobooth with

$ photobooth -c <path/to/photobooth_config.ini>-d <path/to/dslr_config.ini>

Installing the window manager, if using Raspbian Lite

  1. Install Packages

    $ sudo apt-get install -y --no-install-recommends xserver-xorg x11-xserver-utils xinit openbox
    
    $ sudo apt-get install -y unclutter
    

    The package unclutter is optional. It will prevent showing the mouse curser.

  2. Change the .xinitrc file by adding the following line

    exec openbox-session
    
  3. Create the autostart file unter ~/.config/openbox/autostart

    setxkbmap -option terminate:ctrl_alt_bksp
    
    xset s noblank
    xset s off
    xset -dpms
    
    unclutter -idle 0.5 -root &
    
    photobooth -c <path/to/photobooth_config.ini> -d <path/to/dslr_config.ini>
    

    Remarks:

    • If you like to show the mouse curser remove unclutter -idle 0.5 -root &
    • If you like to use the default configuration remove the options -c and -d.
  4. Start the photobooth with

    $ startx
    
  5. If you like to autostart the photobooth add the following line to ~/.bash_profile and enable auto-login via raspi-config

    startx
    

Configuration

The photobooth can be configured via a configuration file.

; Configuration of the application
[widget]

; Title of the application window
title = Photobooth

; Path to the background image
background_image = ./oak.jpg


; Configuration of the gallery screen
[widget.gallery]

; Label for the right button
right_button = Photo

; Position of the images [<x-position>, <y-position>, <angle>]
; - x- and y-position are in percent relative to the center of the page
; - angle is the degree of image rotation
positions = [[0.0, 0.0, 2], [-0.8, -0.6, -6], [0.7, -0.65, 10], [0.4, 0.8, -4], [-0.5, 0.8, 8], [-0.9, 0.6, -6], [0.05, -0.9, 4], [0.95, 0.95, 2], [0.85, -0.05, -4], [-0.95, -0.95, -4], [-0.1, -0.05, 12], [0.9, -0.95, -10], [0.0, 0.95, 2], [-0.65, 0.95, 4], [0.25, 0.05, 4], [-0.5, -0.5, -10]]


; Configuration of the liveview screen
[widget.liveview]

; Label for the left button
left_button = Back

; Label for the right button
right_button = Photo


; Configuration of the capture screen
[widget.capture]

; Countdown text comma separated
countdown = 3,2,Smile!
; Color of the message
countdown_color = "#333333"

; Messages after image is captured. Placeholder {number} is replaced with the photo number.
file_number_message = "This photo has the number: {number}"
; Color of the message
file_number_message_color = "#333333"


; Configuration of the preview screen
[widget.preview]

; Label for the left button
left_button = Delete

; Label for the right button
right_button = Next

; Time the preview is show in milliseconds
timeout = 5000


; Configuration of the hardware buttons
[hardwarebutton]

; GPIO Pin of the left button
left_button = 23

; GPIO Pin of the right button
right_button = 24

; Configuration of the camera
[camera]

; Image naming pattern to use for extraction as regex expression
file_number_pattern = P\d{2}_(\d{4}).JPG

; Time delay of the camera shutter from signal to actual capturing the photo (used to correct the countdown)
shutter_delay = 800

Warranty

No guaranty or coverage of any kind to damages what so ever.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

photobooth-0.0.1b3.tar.gz (2.9 MB view details)

Uploaded Source

Built Distribution

photobooth-0.0.1b3-py3-none-any.whl (2.9 MB view details)

Uploaded Python 3

File details

Details for the file photobooth-0.0.1b3.tar.gz.

File metadata

  • Download URL: photobooth-0.0.1b3.tar.gz
  • Upload date:
  • Size: 2.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.9

File hashes

Hashes for photobooth-0.0.1b3.tar.gz
Algorithm Hash digest
SHA256 db89a77c27e1e937d5e9147dc294c05d1c2b3c0caa76f149a64ba8a613bf5f52
MD5 08c819a500b6e5c0ea6de6eda7b70ac7
BLAKE2b-256 785fe34428ddb0ccb991078f0d4586fb48b03bc9c364d9b20adadd18e355b849

See more details on using hashes here.

File details

Details for the file photobooth-0.0.1b3-py3-none-any.whl.

File metadata

  • Download URL: photobooth-0.0.1b3-py3-none-any.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.9

File hashes

Hashes for photobooth-0.0.1b3-py3-none-any.whl
Algorithm Hash digest
SHA256 8737a908aaa440d82586ae62d8691557a160f62646edc4f861c7473fc8b885b7
MD5 791cebbaa371e0f7412b3d19ccefa184
BLAKE2b-256 9715dec7806977d367f303a2f6c6ba2890ad21e14bb45979384c7e2cf823dc84

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page