Designed to be as user-friendly as possible and take great photos, without breaking the bank
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
I've added a few cool upgrades and new features to the booth since my last update. One of the biggest is that I decided to upgrade from the Pi 4B to the Pi 5!
The Pi 5 offers a few key improvements:
Each of these on their own isn't enough to justify the switch, but when a new Pi comes out after 5 years of waiting, you can't not put one in a project.
Here's a rundown of the new features I've added to the photo booth.
The officially sanctioned Pi HQ Camera M12 Portrait lens is the best M12 lens with an appropriate focal length that I've found so far, though I've only tested it against two AliExpress lenses that didn't quite measure up. Its main drawback is that it has a surprising amount of barrel distortion for being a portrait lens. This door photo shows how curvy it gets at the edges.
This distortion isn't super noticeable for most photos, but can make people's faces at the edge of the frame look a little weird. In my search for maximum image quality, I decided to take advantage of OpenCV's easy distortion correction functions.
Correcting for the distortion involves printing out a checkerboard, taking a bunch of pictures holding the checkerboard, running a quick script to get the lens intrinsics, and implementing the distortion correction in the main photo booth script.
Here's my quick and dirty script that reads the checkerboard and outputs a file of the lens correction (warning, magic numbers and hardcoded paths abound).
The main booth.py file looks for the the intrinsics file (set in config.yaml) and if it exists, it remaps the image. Here's the result of the remapping on the door photo above.
When testing the photo booth at an NYE party, I discovered that the distinction between the button and camera weren't clear to some users, despite their different locations and appearances. To help make sure that everyone would know where to put their finger, I added a nice button with a blue LED ring surround, and added code to give it a smooth pulsing effect. The best one I could find is on AliExpress, linked below. I went with the 22mm size.
The switch from the 4B to 5 necessitated a few changes to the software. The 5 doesn't support the pigpio library that I was using to control the LEDs and read the button, so I switched to gpiozero. However, I wasn't super happy with the PWM control in this library, so I switched to using the rpi_hardware_pwm library. I had to modify it a bit to get it to work with the pins I wanted, so I submitted a PR to hopefully get that fixed soon.
I discovered that no matter how you name your files, when you upload them to iCloud or Google Photos, they get shuffled randomly in the resulting album. This was pretty annoying, especially when I wanted to upload both the color and monochrome photos to the same album, because the color images wouldn't show up next to their monochrome version. I realized that what they want for chronological sorting is timestamps in the EXIF metadata of the images. I used the piexif library to add the timestamps as EXIF, and voila, the photos are sorted in chronological order!
formatted_datetime = datetime.now().strftime("%Y:%m:%d %H:%M:%S")
zeroth_ifd = {piexif.ImageIFD.Make: "colin",
piexif.ImageIFD.XResolution: (w, 1),
piexif.ImageIFD.YResolution: (h, 1),
piexif.ImageIFD.Software: "colin p"
}
exif_ifd = {piexif.ExifIFD.DateTimeOriginal: formatted_datetime,
piexif.ExifIFD.LensMake: "colin",
piexif.ExifIFD.Sharpness: 65535,
piexif.ExifIFD.LensSpecification: ((1, 1), (1, 1), (1, 1), (1, 1)),
}
exif_dict = {"0th":zeroth_ifd, "Exif":exif_ifd}
exif_bytes = piexif.dump(exif_dict)
img.save(image_path, quality=95, exif=exif_bytes)
Read more »
The enclosure for the Photo booth consists of 4 sides made of acrylic and top and bottom caps 3D printed in ABS that hold the whole thing together. It’s not glued or screwed together, just held together by firmly pressing the sides into slots into the top and bottom caps. This makes it less robust than it could be, but it’s easy to take apart for documentation!
The bottom of the enclosure is a big old 3D printed piece of ABS with a hole so it can sit on the tripod, which is a surprisingly sturdy and cheap monitor stand from Monoprice. I didn’t install the monitor bracket so the photo booth just sits directly on the pole.
The current LED lighting setup is the 4th revision of what started as a $30 light ring from Amazon. Here’s the specs of what I’m using now:
An important constraint to note is that the heatsink probably isn’t big enough to let the LEDs run at a high PWM duty cycle for more than a few seconds. This is acceptable for this application because the LEDs only have to be super bright for long enough to capture the photo. The rest of the time, they’re kept on at about 20% duty cycle to give the photo booth an inviting glow.
Here’s the schematic of the driver circuit. As you can see, it’s quite simple, but so far it’s done the job.
R2 is very important, it pulls the MOSFET gate low when the Pi GPIO pin is not driven so the LEDs don’t stay on and burn out. The Pi GPIOs float when it’s booting up, and this takes long enough that the LEDs could burn out if they were fully switched on during this time. R3 and R4 set the current to the LEDs to about 700mA. The LED strings are switched by a N-Channel MOSFET with a low gate threshold voltage. I chose the DMT6009LCT but I’m sure there are plenty of other options that would work as well.
My top priority when designing the photo booth was that it have a straightforward and appealing user experience. I figured the simplest, most foolproof interface is one big button on the front. You press the button, a countdown starts over the preview on the screen, it takes a picture, and then you see the picture it took.
I made a few more arbitrary decisions to try to up the appeal.
Create an account to leave a comment. Already have an account? Log In.
Become a member to follow this project and never miss any updates