A lightweight C++ photobooth for Raspberry Pi that:
- captures a still image via
rpicam-still
- composes a 1x1 framed print with Arm branding using OpenCV
- emails the framed image using a small Python helper
- Raspberry Pi 4B / 5
- Raspberry Pi Camera Module (libcamera/rpicam compatible) enabled
- OpenCV (C++):
libopencv-dev
- Python 3
- python-dotenv (for .env credential loading)
Connect the camera module by:
- Locate the Camera Module port
- Gently pull up on the edges of the port’s plastic clip
- Insert the Camera Module ribbon cable; make sure the connectors at the bottom of the ribbon cable are facing the contacts in the port.
- Push the plastic clip back into place
- Reboot your Raspberry Pi
System packages:
sudo apt-get update
sudo apt-get install -y \
libopencv-dev \
python3 python3-venv python3-pip \
pkg-config
Dependencies:
cd scripts
python3 -m venv .venv
source .venv/bin/activate
pip install python-dotenv
Create a .env
file in the scripts
folder:
SENDER_EMAIL=[email protected]
SENDER_PASSWORD=your_app_password # e.g., Gmail App Password if 2FA
Build the project:
make clean
make build
Run:
make run
Flow:
- Enter your name.
- Confirm capture (y) and wait for a 3-second countdown.
- Outputs (default):
- Raw photo: ./out/_.jpg
- Framed PNG: ./out/framed/__framed.png
- Enter an email address to send the framed image (if .env is set)