Getting Started - bitcraft/PURIKURA GitHub Wiki
Introduction
Purikura is meant to run on a very specific hardware setup and may require modifications to run. Your best bet will be to fork this repo and work with a local copy.
Hardware
- 1.6 ghz Intel Dual-Core Processor with 2GB ram
- 17in Planar touchscreen display
- Arduino (for input and tilt)
- Sinfonia CS2 dye-sub printer
- Canon XS dslr camera, connected via usb tether
Software
- Debian Linux 7.2
- Python 2.7
- Pygame 1.9
- python-twisted
- python-kivy
- libgphoto2
- image magick
- iii (for eye-fi wireless sd cards)
Notes about virtualbox
I require virtualbox for my particular setup since the printer driver is not supported in Linux. If your printer is supported, then you will not need the virtual machine. I highly recommend a dual-core cpu if running a virtual machine for the printer.
Notes about the arduino
My photobooth has a physical trigger in the form of a pull string. An arduino is used to interface a simple microswitch to the computer and communicates over a virtualized serial port. In your particular setup, you can use pygame's keyboard or mouse interface to trigger the photobooth.
Notes on the live slideshow
The dual monitor live slideshow technically works, but due to the buggy nature of both the intel and nvidia graphics drivers in linux, it doesn't work well. In a dual-head configuration, it is possible to run both the photo booth touch kiosk and the slideshow, but your configuration may not run well. It is beyond the scope of this article to describe how to run two graphics adapters or monitors. If you want to try it out, open a bug report and let me know how it goes.
Building your own
Any reasonable modern computer system will work. The software can work "headless", but will benefit greatly with a touchscreen display, or lesser so, with a mouse. The arduino is used to get input from the user to start the photo session. This can be a simple pushbutton, or something wacky like a oversized lever or foot switch.
Configuration
This describes files that will have to be customized for your application.
kiosk.py
Change these lines to match the folder where you want to store photos
- thumbnails = '/home/mjolnir/events/{}/small'.format(event)
- detail = '/home/mjolnir/events/{}/medium'.format(event)
- originals = '/home/mjolnir/events/{}/originals'.format(event)
- composites = '/home/mjolnir/events/{}/composites/'.format(event)
Plugin Information
Common Plugins
- Arduino - IO with an arduino over a virtualized serial port
- ShutterCamera - Connects to a camera to trigger captures and get preview images
- FileCopy - Accepts a filename and destination, then copies a file
- Thumbnailer - Accepts a filename and thumbnails an image
- Twitter - Posts and image and message to a twitter account
- Composer - Uses a template to process multiple images and create one from them.
- FileDelete - Accepts a message and deletes the filename
- FileSpool - Accepts a filename and prints using linux printing services
Templates
Templates are used by the composer broker to create your final product...the photo strip or image. The format is similar to Windows .ini files.
The [general] section is required in all templates. The composer will read the template and sort them alphabetically. So [Albatross] comes before [Banana], but [00Zebra] will be first. This is important because the name doesn't matter, just the order. The current format is simply [XXname] where XX is a two-digit number and name is just a note of where the image is placed.
The composer will read any section with "filename = auto" and will layer them in sorted order. Transparent sections will be transparent. Think of layering physical photos on top of eachother. When all of the sections have been placed, the composer will create a image and emit it to another broker.
Let's examine polaroid0.template:
[general]
dpi = 300
units = inches
size = 4,6
[00portrait]
filename = auto
area = .31,1.44,3.74,4.98
autocrop = true
filter = toaster
[99frame]
filename = polaroid0.png
area = 0,0,4,6
scale=true
[general]
The final product is a 300dpi 4x6in image
[00portrait]
The filname will be taken from another broker (auto) and will be placed in roughly the center of the image, as defined in "area". Autocrop means that the image will be sized so that it fills the area, even if it crops the sides or top and bottom. Finally, it is processed with a filter called "toaster"
[99frame]
This will be the last image and the filename is already defined (polaroid0.png). The image, being last will be placed over 00portrait. This is fine since polaroid0.png has a large transparent area right in the middle. the area is defined as 0,0,4,6 meaning it will start at the upper-left corner and extend the entire size of the final image...so it fills the "page".
Here are some keywords and their use:
- dpi - dpi of final image
- units - what units are used to compose the pictures (pixel/inches). do not mix units.
- size - size of final image in the units specified