Extended README
This commit is contained in:
33
README.md
33
README.md
@@ -67,7 +67,7 @@ A brief description on how to set-up a Raspberry Pi to use this photobooth softw
|
||||
hdmi_cvt=1024 600 60 6 0 0 0
|
||||
```
|
||||
|
||||
2. Insert the SD-card into your Raspberry Pi and fire it up. Use the `rpi-config` tool that is shown automatically on the first boot to configure your system (e.g., expand partition, change hostname, password, enable SSH, configure to boot into GUI, etc.).
|
||||
2. Insert the SD-card into your Raspberry Pi and fire it up. Use the `raspi-config` tool that is shown automatically on the first boot to configure your system (e.g., expand partition, change hostname, password, enable SSH, configure to boot into GUI, etc.).
|
||||
|
||||
3. Reboot and open a terminal. Type `sudo rpi-update` to install the latest software versions. Reboot.
|
||||
|
||||
@@ -75,28 +75,36 @@ A brief description on how to set-up a Raspberry Pi to use this photobooth softw
|
||||
|
||||
5. Install any additionally required software:
|
||||
* Pillow:
|
||||
|
||||
```
|
||||
sudo apt-get install python-dev python-pip libjpeg8-dev
|
||||
sudo pip install Pillow
|
||||
```
|
||||
* gPhoto2: Unfortunately, the version in the repositories is too old to work (some USB-bugs), hence one must use [Gonzalos installer script]()
|
||||
|
||||
* gPhoto2: Unfortunately, the version in the repositories is too old to work (some USB-bugs), hence one must use [Gonzalos installer script](https://github.com/gonzalo/gphoto2-updater)
|
||||
|
||||
```
|
||||
git clone https://github.com/gonzalo/gphoto2-updater
|
||||
sudo gphoto2-updater/gphoto2-updater.sh
|
||||
```
|
||||
|
||||
To ensure the camera can be controlled properly via USB, remove some files:
|
||||
|
||||
```
|
||||
sudo rm /usr/share/dbus-1/services/org.gtk.Private.GPhoto2VolumeMonitor.service
|
||||
sudo rm /usr/share/gvfs/mounts/gphoto2.mount
|
||||
sudo rm /usr/share/gvfs/remote-volume-monitors/gphoto2.monitor
|
||||
sudo rm /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
|
||||
```
|
||||
* xinput_calibrator to calibrate touchscreens:
|
||||
|
||||
* [xinput_calibrator](https://www.freedesktop.org/wiki/Software/xinput_calibrator/) to calibrate touchscreens:
|
||||
|
||||
```
|
||||
wget http://adafruit-download.s3.amazonaws.com/xinput-calibrator_0.7.5-1_armhf.deb
|
||||
sudo dpkg -i -B xinput-calibrator_0.7.5-1_armhf.deb
|
||||
```
|
||||
Calibrate by calling `xinput_calibrator` and pasting the showed snippet to a new file `/etc/X11/xorg.conf.d/99-calibration.conf` (Create the directory if necessary).
|
||||
|
||||
Calibrate by calling `xinput_calibrator` and pasting the shown snippet to a new file `/etc/X11/xorg.conf.d/99-calibration.conf` (Create the directory if necessary).
|
||||
|
||||
6. Reboot.
|
||||
|
||||
@@ -106,10 +114,27 @@ A brief description on how to set-up a Raspberry Pi to use this photobooth softw
|
||||
```
|
||||
and run `photobooth.py`
|
||||
|
||||
8. Optionally make the software run automatically on startup. To do that, you must simply add a corresponding line in the autostart file of LXDE, which can be found at `~/.config/lxsession/LXDE-pi/autostart`. Assuming you cloned the Photobooth repository into `/home/pi/photobooth`, add the following line into the autostart-file:
|
||||
```
|
||||
lxterminal -e "/home/pi/photobooth/photobooth.sh set-time"
|
||||
```
|
||||
For this to work you must install `gnome-control-center` by running `sudo apt-get install gnome-control-center` (Unfortunately, this brings along a lot of dependencies - however, I haven't found any lightweight alternative that would allow to simply set date and time using the touch screen).
|
||||
|
||||
9. Alternatively, you can also add a Desktop shortcut. Create a file `/home/pi/Desktop/Photobooth.desktop` and enter the following:
|
||||
```
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Type=Application
|
||||
Name=Photobooth
|
||||
Exec=lxterminal -e /home/pi/photobooth/photobooth.sh set-time
|
||||
```
|
||||
|
||||
## Modifications
|
||||
In the beginning of `photobooth.py` a number of config options are available. Change them to your liking.
|
||||
|
||||
The GUI-class is separated from the entire functionality. I'm using Pygame because it's so simple to use. Feel free to replace it by your favorite library.
|
||||
|
||||
Instead of gPhoto2 you can also use OpenCV to capture pictures. This is the preferred way if you want to use a webcam and is particularly useful for debugging on a different machine. For that you must install OpenCV and its Python bindings (run `sudo apt-get install python-opencv`) and then change the `CameraModule`: edit `photobooth.py` and replace `Camera_gphoto as CameraModule` by `Camera_cv as CameraModule`.
|
||||
|
||||
## License
|
||||
I provide this code under AGPL v3. See [LICENSE](https://github.com/reuterbal/photobooth/blob/master/LICENSE).
|
||||
|
||||
Reference in New Issue
Block a user