Skip to content

Commit 132dcc9

Browse files
committed
update README.md to enhance camera support details and clarify features
1 parent a6c2682 commit 132dcc9

1 file changed

Lines changed: 173 additions & 67 deletions

File tree

README.md

Lines changed: 173 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,37 @@
22

33
## Overview
44

5-
The goal of the project is to provide a configurable photobooth software for Raspberry Pi or a PC.
5+
The goal of the project is to provide a configurable photobooth software for Raspberry Pi or a PC.
66

77
Main features are:
88
- User Interface with touchscreen input (input via mouse is not recommended). Control via buttons may be added in future.
9-
- Photo preview and capture via V4L2 (Raspberry Pi Camera or Webcam) ~~or via GPhoto2 supported cameras.~~ (currently GPhoto2 is not supported. Will be backported later.)
10-
- Printout with Canon Selphy photo printer or standard printer via CUPS.
9+
- Photo preview and capture via multiple camera backends:
10+
- **V4L2** - USB Webcams and other Video4Linux2 compatible cameras
11+
- **libcamera** - Raspberry Pi Camera Modules (Pi Camera v1, v2, v3, HQ Camera)
12+
- **GPhoto2** - DSLR and mirrorless cameras connected via USB
13+
- **Neural Network background removal** - Remove or replace photo backgrounds in real-time
14+
- Printout with Canon Selphy photo printer or standard printer via CUPS
1115
- Configurable image collages with own templates. User can select current template in application.
1216
- Password protected settings menu:
13-
- Copy all photos to USB storage. (currently not supported via flatpak)
14-
- Copy collage templates form USB storage. (currently not supported via flatpak)
15-
- Disable printing.
16-
- Brightness of LED preview and flash lights can be adjusted.
17+
- Copy all photos to USB storage (currently not supported via Flatpak)
18+
- Copy collage templates from USB storage (currently not supported via Flatpak)
19+
- Disable printing
20+
- Brightness of LED preview and flash lights can be adjusted
1721

22+
```
1823
.------------. Current .---------.
1924
| LED Driver |-------->| 20W LED |
2025
'------------' '---------'
2126
^
2227
|
2328
ENABLE/PWM| .-----------------------.
2429
| | |
25-
| | |
26-
.------------------. | USB webcam |
27-
| Raspi |<------| via v4l2 | -.-.-,~ .
28-
| Application | | | ) (
29-
| | '-----------------------' |_ |
30-
| based on | /(_)---`\
30+
| | Camera |
31+
.------------------. | - USB Webcam (V4L2) |
32+
| Raspi |<------| - Pi Camera | -.-.-,~ .
33+
| Application | | (libcamera) | ) (
34+
| | | - DSLR (GPhoto2) | |_ |
35+
| based on | '-----------------------' /(_)---`\
3136
| QT/Quick | (_ -'
3237
| | .-------------. ] |
3338
| | | Touchscreen | | _,')
@@ -47,88 +52,157 @@ Main features are:
4752
| |
4853
`._ _.'
4954
"-----"
50-
55+
```
56+
5157
## Technology
58+
5259
### Software
53-
Framework: Qt 6.5 or higher - https://qt.io
60+
- **Framework:** Qt 6.5 or higher - https://qt.io
61+
- **Distribution:** Flatpak (primary), native builds supported
62+
- **Neural Network Runtime:** ONNX Runtime or NCNN for background removal
5463

55-
~~Used camera: Photo camera connected via USB with GPhoto2 - See supported cameras: http://www.gphoto.org/proj/libgphoto2/support.php
56-
Qt GPhoto2 plugin: https://github.com/dept2/qtmultimedia-gphoto~~ (will be backported later)
64+
### Camera Support
5765

58-
Flatpak: The main target of this software is the distribution via flatpak. Flatpak can be installed on most of the x86_64 and Aarch64 Linux distributions. It comes with all dependencies needed for execution.
66+
| Backend | Camera Types | Notes |
67+
|---------|-------------|-------|
68+
| V4L2 | USB Webcams, capture cards | Standard Linux video interface |
69+
| libcamera | Raspberry Pi Camera Modules | Pi Camera v1/v2/v3, HQ Camera |
70+
| GPhoto2 | DSLR, mirrorless cameras | See [supported cameras](http://www.gphoto.org/proj/libgphoto2/support.php) |
5971

6072
### Tested Hardware
61-
Platform: Tested on PC plattform, Raspberry Pi 3B and Raspbarry Pi 4 (Raspberry Pi 3 might also work)
6273

63-
Camera: Tested with ~~Canon EOS 450D and Raspberry Pi camera~~ USB Webca,. Every camera compatible ~~with gPhoto2 ~~or~~ v4l2 will do.
74+
**Platforms:**
75+
- PC (x86_64)
76+
- Raspberry Pi 3B, 4, 5 (aarch64)
77+
78+
**Cameras:**
79+
- USB Webcams (V4L2)
80+
- Raspberry Pi Camera Module v2, v3 (libcamera)
81+
- Canon EOS 450D (GPhoto2)
6482

65-
Printer: Tested Canon Selphy Photo Printer CP910 over wifi via https://github.com/saeugetier/go-selphy-cp. Tested with standard inkjet printer via CUPS.
83+
**Printers:**
84+
- Canon Selphy Photo Printer CP910 over WiFi via https://github.com/saeugetier/go-selphy-cp
85+
- Standard inkjet/laser printers via CUPS
86+
- Fake printer implementation for testing
87+
- Printing can also be disabled
6688

67-
Light/Flash:
89+
**Light/Flash:**
90+
LED flash can be driven via Raspberry Pi GPIO. Tested configuration:
6891
- LED Driver: https://www.aliexpress.com/item/14-37-Inch-LED-LCD-Universal-TV-Backlight-Constant-Current-Board-Driver-Boost-Structure-Step-Up/32834942970.html
6992
- 20W LED: https://www.aliexpress.com/item/1Pcs-High-Power-10W-20W-30W-50W-100W-COB-Integrated-LED-Lamp-Chip-SMD-Bead-DC/32822371892.html
7093

71-
Display: A touchscreen connected via HDMI is highly recommended.
94+
**Display:** A touchscreen connected via HDMI is highly recommended.
7295

73-
I2C RTC: If using a Raspberry Pi, it is recommended to use a realtime clock.
96+
**I2C RTC:** If using a Raspberry Pi, it is recommended to use a realtime clock for timestamping the photos.
7497

7598
### Housing / Electronics
76-
My own housing is documented in a seperate git repository: https://github.com/saeugetier/photobooth_hardware
77-
78-
Housing: Plywood 8mm - Cutting via lasercutter. Template generated with http://festi.info/boxes.py/
7999

80-
## Deployment / Installation
100+
My own housing is documented in a separate git repository: https://github.com/saeugetier/photobooth_hardware
81101

82-
### Flathub ###
102+
Housing: Plywood 8mm - Cutting via laser cutter. Template generated with http://festi.info/boxes.py/
83103

84-
Install via `flatpak install io.github.saeugetier.photobooth`. Run with `flatpak run io.github.saeugetier.photobooth` or via desktop item.
104+
## Installation
85105

86-
### Raspbian an a Raspberry Pi
106+
### Flathub (Recommended)
87107

88-
Minimum Raspbian Buster must be used, which provides QT 6.5 development packages. In order to use GPhoto2 cameras, the Qt GPhoto2 plugin (https://github.com/saeugetier/qtmultimedia-gphoto) must be installed.
108+
The primary distribution method is via Flatpak. Flatpak can be installed on most x86_64 and aarch64 Linux distributions and includes all dependencies.
89109

90-
For now there is no further support for deployment on Raspbian. Please compile the program yourself from sources.
110+
```bash
111+
# Install from Flathub
112+
flatpak install io.github.saeugetier.photobooth
91113

92-
### Local PC
93-
94-
At least QT 6.5 development packages must be installed in order to compile the application. In order to use GPhoto2 cameras, the Qt GPhoto2 plugin (https://github.com/saeugetier/qtmultimedia-gphoto) must be installed.
114+
# Run the application
115+
flatpak run io.github.saeugetier.photobooth
116+
```
95117

96-
For now there is no further support for deployment on local pc. Please compile the program yourself from sources.
118+
Or launch via the desktop application menu.
119+
120+
### Raspberry Pi with libcamera
121+
122+
For Raspberry Pi Camera support, ensure your camera is properly configured:
123+
124+
1. Enable the camera in `/boot/firmware/config.txt`:
125+
```
126+
# For Pi Camera Module 3
127+
dtoverlay=imx708
128+
129+
# For Pi Camera Module 2
130+
dtoverlay=imx219
131+
132+
# For Pi Camera Module 1
133+
dtoverlay=ov5647
134+
```
135+
136+
2. Reboot and verify the camera is detected:
137+
```bash
138+
libcamera-hello --list-cameras
139+
```
140+
141+
3. Install and run the Flatpak as described above.
142+
143+
### Building from Source
144+
145+
#### Requirements
146+
- Qt 6.5 or higher development packages
147+
- OpenCV
148+
- For GPhoto2 support: libgphoto2-dev
149+
- For libcamera support: libcamera-dev
150+
- For neural network: ONNX Runtime, NCNN
151+
152+
#### Build Steps
153+
154+
```bash
155+
git clone https://github.com/saeugetier/photobooth.git
156+
cd photobooth
157+
mkdir build && cd build
158+
cmake ..
159+
make -j$(nproc)
160+
./qtbooth
161+
```
97162

98-
### Yocto Linux on a Raspberry Pi
163+
## Configuration
99164

100-
**Deprecated**
165+
### Configuration File
101166

102-
In order to get the best performance and integration, the recipes for Yocto can be used: https://github.com/saeugetier/poky-photobooth
103-
104-
Prebuild images will be available soon. For more information how to create an own image for deployment on SD card, please look into the repository.
167+
The local configuration file is stored in:
168+
```
169+
~/.config/saeugetier/qtbooth.conf
170+
```
105171

106-
## Configuration
172+
The file contains all application settings including:
173+
- Selected camera backend and device
174+
- Neural network runtime settings
175+
- Printer configuration
176+
- PIN code for settings menu (default: `0815`)
107177

108-
### Configuration file
109-
The local configuration file is stored in /home/<user>/.config/saeugetier/qtbooth.conf
110-
The file contains all application settings and the pin code for the settings menu password protection (only numbers are supported). Default pin code is: 0815
178+
### Template Files
111179

112-
### Template files
113-
The local template files for your collage images are stored in /home/user/.local/share/saeugetier/qtbooth
180+
The local template files for your collage images are stored in:
181+
```
182+
~/.local/share/saeugetier/qtbooth/
183+
```
114184

115185
It contains:
116186
- Background images for the image collages
117-
- The "Collages.xml" describing all image collages
187+
- The `Collages.xml` describing all image collages
118188
- Border images
119189

120-
The templates can be imported from USB storage. All files with extension "xml,jpg,png,svg" in the folder "layout" will be copied to local template folder.
190+
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.
191+
192+
### How to Create Own Templates
121193

122-
### How to create own templates
123-
Create your own "Collages.xml" file. You can use the file "XmlData.xml" to customize.
194+
Create your own `Collages.xml` file. You can use the existing file as a reference.
124195

125-
The root node of the XML is named "catalog". It contains nodes for the templates for collages named "collage". The collage must contain at least one "image", a "name", a "background", a "foreground" and an "icon". You can use builtin backgrounds like "WhiteBackground.png" or create your custom one. Forground will be painted in the front layer. So it is highly recommended to have an alpha channel and some cutouts for your photos.
196+
The root node of the XML is named `catalog`. It contains nodes for the templates for collages named `collage`. Each collage must contain at least one `image`, a `name`, a `background`, a `foreground` and an `icon`.
126197

127-
Images will need information about the position and size. The range of the values for position and size is between 0.0 and 1.0. It is possible to define a image boarder for each image.
198+
You can use built-in backgrounds like `WhiteBackground.png` or create your custom one. The foreground will be painted in the front layer, so it is highly recommended to have an alpha channel and some cutouts for your photos.
128199

129-
There are optional properties like "printable", which generates a none printable collage (just a single image). So you can use the photobox as an simple camera without printing capabilities.
200+
Images require position and size information. The range of values for position and size is between `0.0` and `1.0`. It is possible to define an image border for each image.
130201

131-
Example for "Collages.xml":
202+
Optional properties:
203+
- `printable` - Set to `false` to create a non-printable collage (single image mode)
204+
205+
#### Example `Collages.xml`:
132206

133207
```xml
134208
<?xml version="1.0" encoding="UTF-8"?>
@@ -140,7 +214,10 @@ Example for "Collages.xml":
140214
<background>WhiteBackground.png</background>
141215
<foreground>ExampleForeground.png</foreground>
142216
<images>
143-
<image><position x="0.0" y="0.0"/><size width="1.0" height="1.0"/></image>
217+
<image>
218+
<position x="0.0" y="0.0"/>
219+
<size width="1.0" height="1.0"/>
220+
</image>
144221
</images>
145222
</collage>
146223
<collage>
@@ -149,25 +226,54 @@ Example for "Collages.xml":
149226
<background>StarsBackground.jpg</background>
150227
<images>
151228
<image>
152-
<position x="0.0" y="0.0"/><size width="0.5" height="0.5"/>
153-
<border><file>RedBorder.png</file><margin top="10" left="10" right="10" bottom="10"/></border>
229+
<position x="0.0" y="0.0"/>
230+
<size width="0.5" height="0.5"/>
231+
<border>
232+
<file>RedBorder.png</file>
233+
<margin top="10" left="10" right="10" bottom="10"/>
234+
</border>
154235
</image>
155236
<image>
156-
<position x="0.5" y="0.0"/><size width="0.5" height="0.5"/>
157-
<border><file>RedBorder.png</file><margin top="30" left="30" right="30" bottom="30"/></border>
237+
<position x="0.5" y="0.0"/>
238+
<size width="0.5" height="0.5"/>
239+
<border>
240+
<file>RedBorder.png</file>
241+
<margin top="30" left="30" right="30" bottom="30"/>
242+
</border>
158243
</image>
159244
<image>
160-
<position x="0.0" y="0.5"/><size width="0.5" height="0.5"/>
161-
<border><file>RedBorder.png</file><margin top="20" left="20" right="20" bottom="20"/></border>
245+
<position x="0.0" y="0.5"/>
246+
<size width="0.5" height="0.5"/>
247+
<border>
248+
<file>RedBorder.png</file>
249+
<margin top="20" left="20" right="20" bottom="20"/>
250+
</border>
162251
</image>
163252
<image>
164-
<position x="0.5" y="0.5"/><size width="0.5" height="0.5"/>
165-
<border><file>RedBorder.png</file><margin top="50" left="50" right="50" bottom="50"/></border>
253+
<position x="0.5" y="0.5"/>
254+
<size width="0.5" height="0.5"/>
255+
<border>
256+
<file>RedBorder.png</file>
257+
<margin top="50" left="50" right="50" bottom="50"/>
258+
</border>
166259
</image>
167260
</images>
168261
</collage>
169262
</catalog>
170263
```
171264

172-
## Issue reporting
173-
Please use the [issue tracker](https://github.com/saeugetier/photobooth/issues) for bug reporting and feature request. If there are specific bugs or feature request belonging to the Yocto image, please use [the issue tracker for poky-photobooth](https://github.com/saeugetier/poky-photobooth).
265+
## Neural Network Background Removal
266+
267+
The application supports real-time background removal using neural networks. Available runtimes:
268+
- ONNX: currently only CPU supported. Runs best on X86 CPU with more than 4 threads.
269+
- NCNN: runs best on ARM platform (linited to 4 threads)
270+
271+
Configure the neural network runtime in the settings menu.
272+
273+
## Issue Reporting
274+
275+
Please use the [issue tracker](https://github.com/saeugetier/photobooth/issues) for bug reporting and feature requests.
276+
277+
## License
278+
279+
See [LICENSE](LICENSE) for details.

0 commit comments

Comments
 (0)