Photo Booth App For Android Tablet
Photography Control a dSLR camera with your Android phone or tablet. Augment your dSLR camera with an Android app that offers advantages like.
Don’t have a subscription yet?. On the cover: NASA’s JPL is using VR tech to create the next Mars rover.
Illustration by Viktor Koen. These days, cheap single-board computers make it easy to roll your own standalone photo booth that can connect to the internet with no help from your precious PC.
Here’s a simple build that’s based on the Raspberry Pi mini computer and Pi Camera Module. It’s touchscreen-controlled by partygoers, and it automatically emails your photos (if you wish) and uploads them to Google Photos where anyone with the password can see and share. All the software is open source. Our gang at WyoLum originally made a Raspberry Pi photo booth to write custom images for E Ink badges at the Open Hardware Summit in 2013, pairing the Pi with our popular AlaMode Arduino-compatible development board. The touchscreen display we used (also used in the ) was nice, but expensive.
Since then, the official Raspberry Pi Touchscreen has been released, and the new Raspberry Pi Model 3 has integrated Wi-Fi. Perfect for this project! So we redesigned our OpenSelfie photo booth as the TouchSelfie, and tied it all together with a minimal set of mounting brackets you can 3D print (or laser-cut) to mount the whole thing on a tripod.
You can also design and build your own amusing enclosure if you prefer. Build Your Touchscreen Wi-Fi Photo Booth First you’ll set up the Pi with the right software, then connect all the hardware. I like to use a wireless keyboard for setup, but you can use a wired keyboard, or after initial configuration, you can use SSH. Configure the Pi’s operating system If this is your first Pi project,. You’ll need to, the official Linux operating system for Raspberry Pi. Then copy the Raspbian-Jessie.img file onto your SD card (Figure A), using Apple Pi Baker (Mac) or Win32DiskImager (PC). Install the requiredplatforms on the Pi Connect the Pi to your network (Wi-Fi or Ethernet) and type the following commands: sudo apt-get update sudo apt-get install python-imaging sudo apt-get install python-gdata sudo apt-get install python-imaging-tk sudo pip install --upgrade google-api-python-client sudo apt-get install luakit sudo update-alternatives --config x-www-browser This will provide you with a menu of browsers to pick as the default; set it to luakit.
NOTE: We’re using luakit because Raspbian’s default browser doesn’t work with Google 2-part authentication. Download the TouchSelfie scripts Still in Terminal, run: mkdir git cd git git clone NOTE: Be sure that for the following steps you’re continuing to use the web browser on your Raspberry Pi / monitor setup. Set up your Google Photos album and create a Google account (or use your own account if you have one already). Then and create a new Album.
You’ll have to upload at least one photo to create it (Figure C). Figure H Once it’s completed downloading, rename the file OpenSelfie.json (Figure I), then drag and drop it into the /home/pi/git/TouchSelfie/scripts directory. Connect TouchSelfie to Google Photos If you haven’t already, connect the camera board to the Pi. Power up the Pi, open Terminal, and run: cd /home/pi/git/TouchSelfie/scripts python./photobooth_gui.py Since this is your first time running the photo booth interface (GUI), it doesn’t yet have the proper credentials to connect to your Google account. Your web browser will pop up; sign in to Google (with the same email address and password you used to configure everything in the previous steps), and then it will ask you whether your Pi photo booth can manipulate your photos (Figure J). Figure O Fortunately, you only have to do this once!
After this it will remember the credentials and periodically refresh them. The cached credentials are stored in a file called credentials.dat, so if you delete it, you’ll have to do the web dance again, as long as your JSON file is still there.
TROUBLESHOOTING TIPS If you get an error that says “cannot connect to Google Account,” it’s probably because Google periodically invalidates the credentials. To refresh them, try the following: » Double-check that you’re connected to the internet » Remove the file credentials.dat from the scripts file folder » Run: cd /home/pi/git/TouchSelfie/scripts » Run: python./photobooth_gui.py » Allow access to Google Photos » Re-enter credentials in Terminal window 8. Customize messages and logos While you’re still in openselfie.conf (or the GUI configuration screen) you can also create a customized message for your event. Just edit the text shown in italics here: emailsubject = Subject line of your email emailmsg = Message that accompanies email photo caption = Photo caption on Google Photos account logopng = logo.png albumid = XXXXXXXXXX To customize the logo that’s stamped on each photo, just save a new PNG file (1366×235 pixels, with transparency if you wish) in the folder /pi/git/TouchSelfie/scripts.
Then run the photo booth again ( photobooth_gui.py) and click the Customize button. In the pop-up window, next to “Logo File” click the Browse button.
Select your file, and click Open. You should see a preview of your new logo. When you’re done, click Done (Figure P). Enable Fullscreen and Touchscreen Keyboard Reopen the photobooth_gui.py file and remove the # symbol from the beginning of the line #root.attributes(“-fullscreen”,True).
Now the photo booth interface can run fullscreen on the Touch Display. Once you connect your Pi 3 to the touchscreen, you won’t want to be lugging around your USB keyboard to type commands. To install a touchscreen keyboard on your Pi,. Make the mounting brackets (optional) We created simple brackets you can 3D print for standing your photo booth on a tabletop or mounting it on a standard tripod (Figure Q).
You can also laser-cut the camera mount from 1/16″ acrylic if you prefer that look, but the 3D-printed version seems to hold up longer. Figure Q » Tabletop mount Print the files camera_mount.stl and PiTouchScreenStand.stl,.
This requires using two M2.5×14mm and two M2.5×16mm screws. » Tripod mount Jenny Ching at Make: created an updated version of our tripod mount that’s a great improvement. Print the files and. And use 10mm and 6mm M2.5 screws instead.
Assemble your photo booth Fasten the Pi 3 and the Touch Display together using the included screws and standoffs. Connect the touchscreen’s ribbon cable to the Pi headers marked “Display.” Use a red jumper wire to connect the touchscreen’s 5V pin to the Pi’s GPIO pin 2.
Use a black wire to connect touchscreen GND to Pi GPIO pin 6 (Figures R and S). Figure Y Finally, connect the Pi 3 to the wall charger or a portable battery pack using the Micro-USB cable. Your photo booth is complete! NOTE: The portable battery must be able to output 2A at 5V to power both the touchscreen and Pi.
It should also be rated at least 10,000mAh to last through a long party or event. Strike a Pose Your Raspberry Pi Photo Booth is ready for all manner of festivities. Here’s how to use it. START UP Open Terminal and run: cd /home/pi/git/TouchSelfie/scripts python./photobooth_gui.py When the photo booth launches, it will automatically take a photo and upload to Google Photos, to check that everything’s working. (If not, you probably just need to refresh the credentials — see “Troubleshooting Tips” above.) Take and Send Photos To take a photo, tap the touchscreen anywhere on the image. The photo booth will count down from 5 and then snap the picture (Figure Z). Then it will automatically upload the photo to Google Photos on your Google account (Figure AA).
Figure AB Touch the screen again to initiate the next photo. When your party is all said and done, log into your Google account and view all your party photos in Google Photos! Customize Messages You can also edit the photobooth_gui.py script to display different on-screen messages during your party. For example, we uncommented line 165 (remove the # symbol from #can.create_text) and edited it to prompt users “Tap here when ready” — but this could say anything you like! Build Your Own Enclosure Our 3D-printed mounts are very handy, but you might prefer to build a fun enclosure to house your new Raspberry Pi photo booth! To help you design it, you can grab. Jenny Ching at the Make: Labs built an awesome jumbo SLR-style enclosure for our photo booth, using ¼” plywood and round gift boxes from The Container Store.
More Fun Enhancements Of course you’ll want to have props and masks handy, but why not take it further? You could add your own lighting effects, modify the code to take multiple pictures in a row, or even add face detection. We’re excited to see where you’ll take this project.
Parts • Raspberry Pi 3 single-board computer with microSD Card. If you use an older model you’ll need to add a Wi-Fi dongle.
• Raspberry Pi Camera Module, v2 (8MP) or v1 (5MP) • Raspberry Pi Touch Display, 7' with included standoffs, screws, and jumper wires • Micro-USB power supply like a wall phone charger or battery pack — providing at least 2A at 5V for the Pi 3, or 700mA at 5V for earlier, lower-powered Pi models. • Machine screws, M2.5, 10mm (2) for the tripod mount.
Substitute two 16mm if you make the tabletop mount. • Machine screws, M2.5, 6mm (2) for the tripod mount. Substitute two 14mm if you make the tabletop mount. • Machine screws, M2×6mm (4) for mounting the camera. You could also use double-sided foam tape, or M1.5×8mm screws with nuts. • Mounting brackets and/or enclosure (optional) You can 3D print our desktop stand or tripod stand, and print or laser-cut our camera mount; get the files at github.com/wyolum/TouchSelfie/tree/master/fabricate. Or mount the project your own way in an enclosure of your choice.
• Hex nut, ¼-20 (optional) for the 3D-printed tripod stand. For bigger enclosures, try a speaker tripod mounting bracket like Yamaha #ADP138.
I don’t have a drawing and your supplies will likely vary, but here it is in a nutshell. Telecharger American Dad Saison 8 Vf 1fichier. I had a “dead” 9W LED par20 bulb that I liked the look of.
I was able to remove the AC/DC circuit and found the three white LEDs to be working. Working backward from there, I found I could power them through a L293D (quad h-bridge). That’s 600ma per channel but I use all 4 in parallel.
Add a big fat resistor in series with the bulb to limit the current. The value you use will depend on the voltage of your flash power supply. I use a separate 12V power supply for the flash. Pick a value that doesn’t overload the L293 (say no more than 1.5A). If the L293 gets hot, that’s probably too much and it won’t work long. For an extra margin of error, I added a heat sink (superglued it to a scrap of metal) AND, being a flash, the LEDs are not lit for long period of time.
The flash is not as bright as the original bulb but it does fill in the shadows and adds to the effect. Given you have a different voltage, you want to be careful to protect the pi. That’s where the optocoupler comes in. It physically separates the logic circuit(pi) from the high power/voltage flash circuit.
You can use a common ground; I didn’t. I used a PC123 but they fairly similar so buy one or steal one from some old circuit board (it probably be the only 4 pin IC you’ll see and will often have a dashed line running through it).
To the PI, it is a small LED. It needs a current limiting resistor in series (~130 ohm). To the L293, it’ll be a switch. When the LED is on, the switch closes and enables the L293. A high valued resistor will pull the voltage back to ground when the switch opens and the L293 will stop driving the outputs. Note that you need to enable both sides and bring all four inputs HIGH on the L293. You can permanently enable the L293 if you wish.
Create your flash circuit and test it it by hooking the input to the optocoupler to 3.3v. If this works reliably, you’re ready to connect it to a GPIO pin of your pi. Hope that helps.
I have to admit I am still having this issues as well. I’ve logged into Gmail on the pi and sent email through the web interface. Gone through the Google troubleshooting for this issue. All before and after installing the ssmpt agent. (it appeard to be there already. But no change. Disabled two step verification and allowed lower security apps.
None of which has modified the error message at all. I’m going to start again with a fresh Raspbian image. But I’m open to other suggestions if anyone has them.
I found the code boothcam.py about line 99. There is a cmd that seems to set the variable: def snap(can, countdown1, effect=’None’): global image_idx Then there are elifs to determine how the variable effect has: if effect == ‘None’: camera.capture(custom.RAW_FILENAME, resize=(1366, 768)) snapshot = Image.open(custom.RAW_FILENAME) elif effect == ‘Warhol’: # set light to R, take photo, G, take photo, B, take photo, Y, take photo # merge results into one image elif effect == “Four”: # take 4 photos and merge into one image. When I change the line to def snap(can, countdown1, effect=’Four’): It seems to still be doing the NONE option. I have tried to delete the boothcam.pyc file and then running the program again but that didn’t work.
Ideas would be appreciated. Tim Cahoon •. I just removed the buttons and added a test at the beginning of the sendPic method to check for two special emails addresses: “exit” and “customize”. Here’s what the beginning of sendPic looks like now. Search for Customize and comment out the button addition line.
Def sendPic(*args): if email_addr.get() == “exit”: if root.after_id is not None: root.after_cancel(root.after_id) root.quit() elif email_addr.get() == “customize”: custom.customize(root).pack(side=LEFT) elif signed_in: *Discus removed the indentation but you can figure it out •. Two things (1) we want to adapt the tripod mount, but editing an STL file is not easy!
Any chance of getting an editable source file of Jenny’s mount? (Our printer can’t print that flat without supports, so turns a 2 hr print into a 7 hour print), and we’d rather widen/thicken the “plate” that fits on to the tripod. (2) we would also like to process out a green screen. (But due to time constraints, we’ll “do that in post”!) Thanks for a quick project to add to our area at Calgary Mini Maker Faire!
I ended up having our coding guy here at work look at it and fix everything up the way I wanted it. I am running the pi out to a 17″ LCD screen. We removed the buttons and email input line from the top (after running the config for the first time). We then tweaked fullscreen display of images. I now have it setup that you can initiate countdown with a pushbutton. Then it will take photo and upload (while showing preview of last snapped image).
We then tweaked it a bit to change the photo every 7 seconds to a random image from the locally saved directory. Everything works beautifully. The only downside is I for the life of me can not get raspbian to quit going into sleep or screensaver blank screen mode after a few minutes of in-activity.
I have followed just about every guide around and still have to wake it up with a button-press from time to time. Other than that its working great! I built a photobooth based on this Article using the PI camera v2. The quality of the photos received by email is quite low. I do not know if it is my impression but the quality seems lower than what the camera actually produces.
By looking at the code it appears that the original photo is somehow shrunk to the screensize and then this is what is sent be email. Is this correct?
I deleted the customize button and used Steve’s solution to “customize” and “exit” using the email address. Nice and childproof. I would like to have buttons for the effects, so that no code changes are needed and the three modes work at the same time, selected by any user. You’ll need to create a file on your desktop. Let’s call it photo.desktop.
Inside that file, try the following: [Desktop Entry] Name=Photobooth Comment=Shortcut to run photobooth_gui.py Exec=sudo python /home/pi/git/TouchSelfie/scripts/photobooth_gui.py Icon=/home/pi/git/TouchSelfie/Photobooth.png Terminal=True Type=Application Categories=None; So, the issue there is that some of your files will not be directed properly. So, to direct them properly, you should be able to fix that. Go into Boothcam.py and change line 47 to configdir = os.path.expanduser(‘/home/pi/git/TouchSelfie/scripts’) That should do it or at least give you an idea of what you’ll need to do. Question about vertical flip. Building my enclosure I have found that the only way I can get the camera positioned where I want is to have it upside down. I was able to easily correct that in the preview part of the selfie (During the countdown) by adding (vflip=True) after camera.start_preview in boothcam.py. The problem is that while the preview displays right side upthe picture is taken upside down.
I am unable to figure out how to fix that. I’ve messed around with the code where it takes the picture if effect==’None’: camera.capture (etc etc etc) by trying to add vflip=True but then the program won’t run at all. Any ideas on the syntax or where I should edit so I can use this with an upside down camera? Unable to enter Authentication Code: I just spent about three hours working on this and finally got it working. I wanted to share to save others the headache. At step seven, when you start up the photo booth GUI, it will ask you in the terminal window for your Google name and the app specific password.
Then the GUI will pop up full screen and the web browser will pop up too and ask you if you want the program to access your Photos account. When you say yes, it will provide you with the long alphanumeric string (the authentication code). You are supposed to copy that and paste it into the terminal window. However because the GUI is full screen, there is no way to see the terminal window anymore. There might be another way to switch to the terminal window, but I couldn’t determine how to. What I finally figured out is that the GUI is default set to full screen mode.
In step 9, the instructions say in the photobooth_gui.py file, to remove the “#” from the beginning of the line #root.attributes(“-fullscreen”,True) to make the GUI full screen. In the version that I just pulled down from github (2017-01-14) the “#” was already removed. So putting the “#” back in caused the GUI to open in a smaller window and thereby uncovering the terminal window. So this is the 4th time I have done this install. The first time it too the photos and sent them to the google photo album. But I could not send them by email = send failed every time so i started from scratch with the new Raspbian-Jessie.img starting from the beginning.
Now it does not take a picture. It flashes Smile;-) then it “timed out Waiting for Capture to end” see first picture then if I click the TK screen again i get picture pibooth.jpg I have reinstalled the OS and all of the other steps and dont see what i am missing. Any help would be wonderful.
Ok so I got this to work so now how do we get an automated slideshow running at the same time adding the newly uploaded pics to the stream?!?! In other words Create a Slideshow that Updates as You Upload. I have asked the following question all around and have not gotten an answer. I am trying to auto load new content uploaded to a Google Photos Album into a full screen slideshow. If anyone knows of a script/extension that’ll do this automatically keeping the slideshow in full screen without refresh the browser and manually restarting the slideshow on a Raspberry Pi please point in that direction. That is my bet!
Especially after seeing someone else is having the same issues. I just troubleshooted it for 3 hours. Even started from scratch, new developer account, clean install. I also tried it on different networks. Gotta be a change in Googles APIs. They did this right before Christmas with their YouTube APIs without telling anyone and I thought I was going crazy. It wasnt until I opened a ticket I found out from them.
It might work itself out in a couple of days. I just lost 3 hours of my life. Going to bed now. Early snowboarding trip in the am. Thanks for posting •. Image Resolution / Image Quality. Hi, I am struggling to discover the secret of producing a quality image from my photobooth.
I am using the 8meg v2.1 pi camera but at best can only manage to get an image of 80k to 100k. I have tried all the suggestions within the various threads below. Has anybody managed to produce a reasonable quality image, I would love to find out what I am doing wrong or what I can do to fix this. My preferred format is four images up. Any suggestions warmly received.
Many thanks to all, what a great project. Greetings, I gave a shot and was very happy that all went as described until figure K. As a matter of fact, this goes in circles and after deleting credentials.dat many times, recreating Google ID, thinks get very naughty. I gave up because there must be something subtle that I may have missed.
The aim is to be able to use a tablet with wifi even if RPi is cabled, send an email with the photo attached as souvenir and upload somewhere like photos.google.com To-day, If I use Gphoto2 with the following command *manually*: gphoto2 –capture-image-and-download –filename”%Y.%m.%d.%H.%M.%S.jpg” I can take a photo with my Nikon D70s in PTP mode and photo is downloaded to /home/pi/git/TouchSelfie/scripts Kindly help out if at all possible. Our Software Freedom Day is this coming Saturday:) I will take this opportunity to thank you for sharing your work. Best wishes, Jimmy •.
Our school is attempting to build this photo booth and have everything working except for the logo I have tried a couple different.PNG images with different sizes, but after the picture is taken, the screen only shows the grey background. If I remove all of the pictures from the folder, the screen will show the picture with no logo, but our school really wants our logo in the corner. Any help would be greatly appreciated as this is a completely new territory for me. The camera also works perfectly with the Wyolum logo selected. I’m having a hard time.
I installed everything and can get to the step where I’m connected to the google account but it never gives me the opportunity to copy and paste the code This step: lick on Allow, and then it will display a long string of numbers and letters. Copy this string and paste it into the Terminal window after the prompt that says “Enter the Authentication Code” (Figure K). My terminal window does not say Enter the Authentication Code It says “NameError: global name ‘signed_in’ is not defined Exception in Tkinter callback Traceback (most recent call last): File “/usr/lib/python2.7/lib-tk/Tkinter.py”, line 1535, in__call__ return self.func(*args) File “./photobooth_gui.py”, line 234, in sendPic if signed_in: NameError: global name ‘signed_in’ is not definted wrote /home/pi/git/TouchSelfie/scripts/openselfie.cong Any help would be appreciated •. Hi all, after a long time for development (almost 6 month) my photobox had the first use. And what sould I say? It worked perfect for me and the guests.
Thanks for this page and this great example One “problem” that I found during the party we had a very slow internet connection (upstream). With that after each picture the box “freeze” until the picture was uploaded to google. Is there a way to put new pictures in a queue that the box isn’t “freezing”?
And another (parallel) task will upload the pictures in background? Best, Carsten •.
[MUSIC] Christmas celebrations are a great time to capture all those holiday memories on camera, and to make it even more fun, I'm gonna show you two ways on how to make your own DIY photo booth. The first method is using a tablet as your camera. And the second method is for better quality photos using a DSLR and then sending those photos while asleep to a tablet. Make sure that there's a good Christmas-y backdrop, you have some fun props, and your scene has plenty of lights. First, let's set up the tablet option.
Tripod and photo booth app. Mount your tablet to a tripod or a secure surface facing the backdrop. For iPad, I'm using the Studio Proper Tripod Mount, which attaches easily to the back of the dedicated case. Depending on your operating system, choose an app to run your photo booth. I'm gonna use Pocketbooth for this demo, and it runs on both iOS and Android. Like a real photo booth it takes four photos in a row and arranges them in a strip after they've been taken. This method is quick and fun but using the front facing camera doesn't always produce the best quality shots.
So for the best photos you can get I'm gonna show you a DSLR method. Grab your camera and an Eye-Fi Mobi card.
It's got built in wi-fi so it can transfer images to a tablet or smart phone automatically. It's also compatible with the majority of cameras on the market, even older models. Insert the card into your camera and then download the Eye-Fi mobile app for iOS or Android on your. Launch the app and enter the ten digit activation code on the Eyefi case. Now all the photos you take on your camera will automatically transfer to your tablet. On your camera we're going to shoot JPEG images only for speed and disable the auto power off option so we don't lose our wi-fi connection. If your camera has an Eye-Fi setting in the menu, make sure to enable the card like this.
Start taking photos by getting your subjects to press a remote shutter release, or set up your camera's self timer option. You can either have your tablet near the camera so people can see their photos immediately, or have it a short distance away so passers by can see those photos too. One you've taken all your photos it's really easy to send them to a printer straight from the app or save them to your gallery and then send to a printer using Air Print or Google Cloud Print. So there you have it, a DIY Photobooth, two ways. Happy Holidays.
I'm Alexi Sadeedis and I'll catch you next time.