#HowTo make a photobooth / Part 4 More slideshow and the photo booth script

#HowTo make a photobooth / Part 4 More slideshow and the photo booth script

Also see:

Part 1: #HowTo make a photobooth with i.MX processor based Utilite and Wandboard, Freedom KL25Z board
Part 2: #HowTo make a photobooth / Part 2 The new starting point
Part 3: #HowTo make a photobooth / Part 3 The new remote display

 

In the last week, all the ordered components arrived. The slideshow script progressed so that it now pulls the images from the web server running on the photo booth kiosk’s camera computer rather than using SAMBA file sharing. In addition, instead of checking the director index for a new image, the camera computer writes the number of the newest composite to a file on the web server.

The latest version of the script copies the image files locally and caches them. This allows the remote display to pull the images files only once, reducing network bandwidth. With SAMBA sharing, the files were transferred through the network every time they were displayed. Only the composite images are copied at this point but the whole set of raw images and print strips can be copied as well for redundant backup.

The camera computer can issue commands to the remote display(s) via a text file containing the command. So far, the commands implemented are clearcache, quit, reboot, and shutdown, all of which should be pretty self explanatory. More commands can be added as the need arises. These commands are issued in one directly only, to the remote displays. The camera computer has no way of knowing (at this point) if an issued command has been received and acted upon.

So here’s a photo of the remote display showing a test image with a Freescale logo’ed emblem for FTF 2015:

slideshow1

Instead of attaching another snapshot of the slideshow script, here’s a link to the github repository instead. There are vestiges of the original booth that remain in the slideshow code because that’s where the slideshow originated – the camera capture part was removed and just the image displaying parts were retained.

Now, moving on to the actual photo booth script… Here’s the link to the companion github repository for the code for the camera computer. There are comments in the code, which are hopefully readable. (It should also be noted that the author has little formal training in good coding practice, so please keep that in mind when perusing his pasta programming…)

Because a DSLR is not being used in this booth, the open source components libgphoto2 and piggyphoto are no longer required. To pull the images off the USB webcam, v4l2capture is used. The camera is put into video mode so that it’s always running. This allows the camera’s auto exposure system to continually adjust so that there need not be a wait for that before each still image is taken. This will have the later advantage of giving users a preview of what’s in the camera’s frame before the photos are snapped (this has yet to be implemented, however).

The webcam’s aspect ratio does not match that of the Nikon DSLR, 1.7778:1 vs 1.5:1. I chose to crop the image from the webcam to the DSLR aspect ratio because it increased the vertical height in the frame with the given background width at FTF. Cropping the image also allowed using the composite generating portion of the photo booth script nearly as-is.

Here’s a shot of the photo booth script running with some branding added in. The Hummingboard can be seen in the center, it has the two orange connectors on it. Between the Hummingboard and the TV is the Teensy3.1.

slideshow2

Here’s a close up of the Teensy board. At the moment, there’s nothing connected to it, but the 52mm arcade button to the right of it soon will be via a custom interface board. The Teensy needs to be connected at the moment because the photo booth script expects a serial port (/dev/ttyACM0) to be connected. I have not yet modified the code so that a command line argument will ignore the serial port.

slideshow3

Some of the things still remaining to do:

  • adjust the timing of the prompts for photo booth script
  • build out the Teensy interface board for the big button and the admin keypad.
  • tweak the images used for prompting
  • add audio prompts and sound effects to the photo booth script
  • designing the clear plastic enclosure for it all so that it can be fabbed
  • add in code that uploads the composite images and post them to an album in Freescale’s social media

David DiCarlo is a hardware applications engineer for Freescale i.MX applications processors.

David DiCarlo
David DiCarlo
The human analog of a Swiss Army knife, David DiCarlo has been by providing hardware systems support for the past 17 years for the i.MX family of applications processors and audio digital signal processors, enabling customers to bring their products to market. Formally schooled as a material scientist (ceramics in particular), he plays an engineer by day and maker/re-maker the rest of the time.

Comments are closed.

Buy now