boi222
Posts: 13
Joined: Wed Jun 26, 2013 1:48 pm

Assistance with making photobooth

Wed Jun 26, 2013 1:55 pm

Hi,

I am trying to make a photo-booth using my raspberry pi. Does anyone have any guidance on where to start?

Components:
pi
SLR
monitor
button
printer (optional)

My vision, when the user pushes the button, the monitor will display a timer and count-down, picture will be taken and displayed on the screen for x secs then it gets published to instagram and possibly also printed.

I played around with gphoto2 but getting that annoying usb reset bug. but I think I can get around with that by writing a script that auto-resets each time before it takes the picture.

So my challenges right now, as I'm new to all of this:
-How to keep the SLR from going into standby
-How do I provide the GUI for this interaction? I see python is mainly command based, any tips on how to make it GUI with the count-down and display of picture?
-How do I publish to instagram?

Any guidance or help is greatly appreciated!

User avatar
BirchJD
Posts: 159
Joined: Tue Nov 13, 2012 7:43 pm

Re: Assistance with making photobooth

Wed Jun 26, 2013 10:34 pm

Rather than using an SLR, consider the Raspberry Pi camera board, it's cheap, hi-res and there is a command line utility you can use to control it and take pictures. It may solve several of your problems, and you can afford to leave it unatended.
http://www.newsdownload.co.uk/

boi222
Posts: 13
Joined: Wed Jun 26, 2013 1:48 pm

Re: Assistance with making photobooth

Wed Jun 26, 2013 10:57 pm

hm...the pi camera board looks to be sold out everywhere. I want to make this for my wedding that's coming up soon.

also, not sure if the pi camera board will be good enough for low-light pictures

dan3008
Posts: 1172
Joined: Wed Aug 15, 2012 1:05 pm

Re: Assistance with making photobooth

Thu Jun 27, 2013 12:09 am

I'm not the only one having this problem lol (for the same reasons, My wedding is end of august)

Unfortunately, looks like youve got quite a big job on your hands if you want to get it done with an SLR
dan3008 wrote:Pays your money, takes your choice

boi222
Posts: 13
Joined: Wed Jun 26, 2013 1:48 pm

Re: Assistance with making photobooth

Thu Jun 27, 2013 12:30 am

lol... I seen a time-lapse project that uses the pi and utilizes a mobile UI
http://blog.davidsingleton.org/introducing-piui/
but it doesn't really give too much instructions on how to customize the mobile the UI for beginners

I think I can get around the camera standby but using a shutter and connecting to the GPIO, I think I seen that done before and having a power source directly plugged into the camera

I just need some guidance on how to get this all setup together. and how hard would the output to instagram be?

PiGraham
Posts: 3678
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Assistance with making photobooth

Thu Jun 27, 2013 5:01 am

I haven't used it, but there is an Instagram API and you should find example code for basic authorisation and uploading.

On my Canon DSLR, If I connect an external shutter release then closing the first contact (focus) wakes the camera from sleep almost instantly and it will last a long time in sleep (weeks). If you anticipate lots of pictures being taken with flash that will be your battery limit.

DSLR is a better choice than PiCam for this because you will have a better lens,and flash but it might be worth experimenting with PiCam.

User avatar
ChromeBlue
Posts: 19
Joined: Wed Jun 26, 2013 3:26 pm
Location: Hannibal, MO

Re: Assistance with making photobooth

Thu Jun 27, 2013 6:11 am

PiGraham wrote:On my Canon DSLR, If I connect an external shutter release then closing the first contact (focus) wakes the camera from sleep almost instantly and it will last a long time in sleep (weeks). If you anticipate lots of pictures being taken with flash that will be your battery limit.
Both Canon and Nikon DSLR shutters can be controlled by Android apps so I'm sure there must be an API available so that you can do this. Check out the apps available for some additional ideas, i.e. where to focus, shutter delay, even control camera effects (B&W, HDR, etc) all from from a touch screen.

Great idea. Don't know why I didn't think of a photo booth using an Android tablet and a DSLR (sorry Pi)
Frito: Yah I know this place pretty good, I went to law school here.

Pvt. Joe Bowers: In Costco?
----------
From Idiocracy - funniest/scariest move ever.

PiGraham
Posts: 3678
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Assistance with making photobooth

Thu Jun 27, 2013 7:15 am

ChromeBlue wrote:Both Canon and Nikon DSLR shutters can be controlled by Android apps so I'm sure there must be an API available so that you can do this.
Yes, there is. gphoto2 should do the job (I haven't used it). But for that to work you will have to provide external power because the camera will not sleep and wake to preserve battery on USB. If it sleeps you can't control it over USB. If it stays awake it will run the battery down. You can use a remote shutter cable to wake the camera when you want to talk to it.

Some cameras may power the USB control from USB, but my Canon doesn't seem to do that. It goes to sleep.

amofok17
Posts: 11
Joined: Sun Dec 30, 2012 5:47 pm

Re: Assistance with making photobooth

Fri Jul 19, 2013 12:02 pm

Hi there.

I did something very similar to this my friends wedding, the raspberry pi cameras were not in stock then so I used a normal digital camera.
I wanted mine to be a ‘fortune telling mini photo booth’ taking inspiration from this project ( http://www.raspberrypi.org/archives/2953 ) which would take a photo, produce a fortune and print both on the printer and upload to twitter.

What I ended up with was:
Hardware:
Canon A320 digital camera - to take the photo
Raspberry pi - to run everything.
Red and green LEDs - simple ‘ready’ ‘not ready’ indicators
16x2 LCD - to display messages so people know it’s working
A big button on a wire - press to take the photo
Mini thermal printer - to print the photo on
Wooden box and tripod - for it all to sit on

Software (all on Raspian OS):
gphoto2 - to get the camera to take a photo
imagemagick - to process the image so it could be printed on the mini till roll printer
Python:
scripts as per the box of geek link above - to produce fortune and print image
Scripts to send text to the LCD display
Scripts to turn LEDs on and off
Shell scripts to bring everything together in the right order.
twython modules to use update_with_media to send photo + text to twitter

I choose not to have a display in the end, but when I was deciding how to set everything up I would have used the composite out of the camera to display the photo on a small display (like you get for in car DVD players)

There was a setting on my camera that stopped it going in to sleep or standby and could be powered by mains socket instead of batteries.


Main obstacles:
Processing the image to produce something that would look ok printed out on the mini printer.
After much experimenting I decided to go with a ‘sketch’ style image for printing on the mini printer (I also used this one for the twitter bit, but would be easy enough to send the unprocessed image from the camera.)
My other option was to send a ‘dithered’ image to the mini printer (I think this is how dot matrix printers printed images in the past) but on Raspbian the image just came out as scrambled foreign characters. On Arch ARM OS they came out really well, but gphoto2 would not work for my camera on Arch so had to go Raspbian!

It turned out that the wedding venue didn’t have internet, so the twitter part never got used, maybe that was a good thing!
Attachments
IMG_0420s.jpg
Example output
IMG_0420s.jpg (10.74 KiB) Viewed 16665 times
IMG_0419s.jpg
Finished 'photo booth'
IMG_0419s.jpg (10.92 KiB) Viewed 16665 times

boi222
Posts: 13
Joined: Wed Jun 26, 2013 1:48 pm

Re: Assistance with making photobooth

Fri Jul 19, 2013 2:23 pm

Thanks amofok17 for the info!

After some extensive digging, it looks like instagram api does not allow you to upload to instagram, it only has read privileges. The only way to upload a picture to instagram is via their own app.

So i decided to use Flickr now, i got a python script that will check a directory for any new files and upload to Flickr and that is working now. So now, i need to piece together the gphoto piece. Amofok17, did you encounter the usb reset issue?

My challenge right now is in the GUI, as i want instructions and prompts on the monitor and display of the image after it is taken and im not familar with how to do this. I only know VB and C++ languages.

Does anyone have any sample code that is well documented that i can modify for my purposes?

Thanks!

amofok17
Posts: 11
Joined: Sun Dec 30, 2012 5:47 pm

Re: Assistance with making photobooth

Fri Jul 19, 2013 3:01 pm

Hi there.

On my Arch ARM setup I think I did encounter the 'USB reset' issue with gphoto, I certainly couldn't get it to work what ever I tried.

On my Raspbian setup gphoto worked straight away with the same camera. Not much I can suggest I'm afraid, perhaps if you have a spare SD card and the time you could try a different OS and see if you can find one it works on.

steeth
Posts: 7
Joined: Sun Aug 04, 2013 11:00 pm
Location: Tiverton, Devon
Contact: Website

Re: Assistance with making photobooth

Sun Aug 04, 2013 11:09 pm

This is a project that I would like to do, I have a friends wedding coming up in October. But I am a complete noob to Linux & the Pi!

I have the Pi Camp, and I want to set up something simple. You press a button and it will take a simple picture, and then you press another butter and it will capture a short video message. I have experimented with the GPIO, when you press a button an LED will come on - so hopefully, I can change it to run a script?

If anyone can help, I would appreciate it and I will share what I have learnt too!

Many thanks

Steve

esturniolo
Posts: 10
Joined: Sun Feb 10, 2013 2:41 pm

Re: Assistance with making photobooth

Sun Aug 25, 2013 12:19 am

boi222 wrote: So i decided to use Flickr now, i got a python script that will check a directory for any new files and upload to Flickr and that is working now. So now, i need to piece together the gphoto piece. Amofok17, did you encounter the usb reset issue?
Hi!
Sorry for the offtopic.
Can you share with us yoru script to upload the photos to flickr?

Thanks!

blanius
Posts: 35
Joined: Mon Jan 21, 2013 6:48 pm

Re: Assistance with making photobooth

Sun Sep 15, 2013 2:51 am

Just started in on this now that I have the Pi Camera Module,

So far the hardest part has been installing the printer :)

here's what I have so far and it's a crude test but it is working and printing out image with background and 4 stills

Code: Select all

import Image
import ImageDraw
import os, sys
import subprocess

var=raw_input("Press Enter")
os.system("raspistill -awb auto -ISO 800 -q 50 -w 250 -h 250 -o /media/IMAGES/1.jpg")
os.system("raspistill -awb auto -ISO 800 -q 50 -w 250 -h 250 -o /media/IMAGES/2.jpg")
os.system("raspistill -awb auto -ISO 800 -q 50 -w 250 -h 250 -o /media/IMAGES/3.jpg")
os.system("raspistill -awb auto -ISO 800 -q 50 -w 250 -h 250 -o /media/IMAGES/4.jpg")


try:
  im=Image.open("/media/IMAGES/1.jpg")
  im2=Image.open("/media/IMAGES/2.jpg")
  im3=Image.open("/media/IMAGES/3.jpg")
  im4=Image.open("/media/IMAGES/4.jpg")
except:
    print "Unable to load 1"
    exit(1)
print "Image loaded"


try:
  final=Image.open("/media/IMAGES/BG.png")
except:
  print "Unable to load 2"
  exit(1)
    
print "BG Loaded"
#im.thumbnail((250,300))
draw=ImageDraw.Draw(im)

final.paste(im,(40,100))
final.paste(im2,(350,100))
final.paste(im3,(40,350))
final.paste(im4,(350,350))
final.thumbnail((300,650))
final.save("/media/IMAGES/2.png")
#os.system("lp /media/IMAGES/2.png")
Image

blanius
Posts: 35
Joined: Mon Jan 21, 2013 6:48 pm

Re: Assistance with making photobooth

Thu Oct 03, 2013 4:18 pm

Update:

Now working quite well, Installed CUPS so I can use printer, installed Canon Selphy printer,

Using a 12v LED light ring that I had on hand, 12v power supply with 5v converter suppling everything including the Pi
GPIO triggering the light, reading Button to take photos....

Next big part is getting it all in a housing

blanius
Posts: 35
Joined: Mon Jan 21, 2013 6:48 pm

Re: Assistance with making photobooth

Fri Oct 18, 2013 1:55 am

Ok if anyone is interested I have this working with buttons, light etc.....

I have a large button on GPIO 22 a small button on GPIO 4 that will shutdown the Pi gracefully a relay on GPIO 17 that turns on a 12v Led Light ring and a Canon Printer prints out the composted image....

This code is still being worked on but I thought I'd share

Code: Select all

# Raspberry Pi PhotoBooth by Bret Lanuis
# Using Pi Camera Module
# Requires PIL and picamera libraries
# http://github.com/waveform80/picamera
# Pythonware.com/prosucts/pil
# bret Lanius bret@bretlanius.com http://bretlanius.com
# assumes Flashdrive at /media/IMAGES for data storage


import PIL.Image
import ImageDraw
import os, sys
import picamera
import time
from Tkinter import *
import RPi.GPIO as GPIO


#Track Prints
print_count=0
max_prints=25


#Setup GPIO
GPIO.setmode(GPIO.BCM)
shutdown=4
photo_btn=22
light=17


GPIO.setup(shutdown,GPIO.IN)
GPIO.setup(photo_btn,GPIO.IN)
GPIO.setup(light,GPIO.OUT)

off=False
shutter=False
test=True #True no printout and Shutdown only warns

def checkButton():
    #checkShutdown()
        
    shutter=GPIO.input(photo_btn)
    if shutter==TRUE:
        takephotos()
        shutter=FALSE
    else:
        root.after(10,checkButton)

def checkShutdown():
    off=GPIO.input(shutdown)
    print off
    if off==TRUE and test==TRUE:
        os.system("sudo shutdown -k now Shutdown Button pressed [testing]")
    if off==TRUE and test==FALSE:
        os.system("sudo shutdown -h now Shutdown Button pressed")
        sys.exit(0)
        
def printout(filename):
    os.system("lp "+filename)
    global print_count
    print_count +=1
    print "Count="+str(print_count)

def lightOn():
    GPIO.output(light,1)

def lightOff():
    GPIO.output(light,0)
         
def takephotos():
    #Start taking Photos
    today = time.strftime("%d-%m-%Y")
    path="/media/IMAGES/"+today+"/"
    print os.path.isdir(path)
    if not (os.path.isdir(path)):
     print "making it"
     os.mkdir(path)
    else:
     print "Already made"
    print path
    
    now=time.strftime("%H%M%S")
    lightOn()
    camera.hflip=TRUE
    camera.start_preview()
    time.sleep(5)
    camera.hflip=FALSE
    camera.capture(path+now+"A.jpg")
    camera.stop_preview()
    lightOff()
    time.sleep(0.5)

    lightOn()
    camera.hflip=TRUE
    camera.start_preview()
    time.sleep(5)
    camera.hflip=FALSE
    camera.capture(path+now+"B.jpg")
    camera.stop_preview()
    lightOff()
    time.sleep(0.5)

    lightOn()
    camera.hflip=TRUE
    camera.start_preview()
    time.sleep(5)
    camera.hflip=FALSE
    camera.capture(path+now+"C.jpg")
    camera.stop_preview()
    lightOff()
    time.sleep(0.5)

    lightOn()
    camera.hflip=TRUE
    camera.start_preview()
    time.sleep(5)
    camera.hflip=FALSE
    camera.capture(path+now+"D.jpg")
    camera.stop_preview()
    lightOff()

    try:
        imagename1=path+now+"A.jpg"
        im=PIL.Image.open(path+now+"A.jpg")
        im2=PIL.Image.open(path+now+"B.jpg")
        im3=PIL.Image.open(path+now+"C.jpg")
        im4=PIL.Image.open(path+now+"D.jpg")
    except:
        print sys.exc_value
        print "Unable to load Images"
        print (imagename1)
        exit(1)
    print "Images loaded"

    try:
      final=PIL.Image.open("/media/IMAGES/BG.png")
    except:
      print "Unable to load BG"
      exit(1)
        
    print "BG Loaded"

    draw=ImageDraw.Draw(im)

    final.paste(im,(30,180))
    final.paste(im2,(420,180))
    final.paste(im3,(30,570))
    final.paste(im4,(420,570))
    
    final.save("/media/IMAGES/final_"+now+".png")
    time.sleep(0.5)
    if not test:
        printout("/media/IMAGES/final_"+now+".png")
    
    root.after(10,checkButton)
    
    
root=Tk()
root.title("photoBooth")
w, h = root.winfo_screenwidth(), root.winfo_screenheight()
root.overrideredirect(1)
root.geometry("660x440+0+0")

pane1 = Frame(root,relief=RAISED,borderwidth=2)
pane1.pack(side=TOP,expand=YES,fill=BOTH)

def btn_click():
    GPIO.cleanup()
    sys.exit(0)
    

bgImage=PhotoImage(file="photoboothbackground.gif")
bg=Label(pane1,image=bgImage)
bg.image=bgImage
#bg.place(x=0,y=0,relwidth=1,relheight=1)
bg.pack()
btn1=Button(pane1,text="quit",command=btn_click)
btn1.place(x=0,y=0)
#btn1.pack()


camera=picamera.PiCamera()
camera.preview_fullscreen = False
camera.preview_window=(290,100,350,350)
#camera.color_effects = (128,128)
camera.resolution = (350,350)
#camera.crop=(0.5,0.5,1.0,1.0)

root.after(10,checkButton)
root.mainloop()

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: Korea

Re: Assistance with making photobooth

Fri Oct 18, 2013 2:50 am

Here's an instructable about building something similar. Maybe you can get some ideas.
http://www.instructables.com/id/DIY-Por ... /?ALLSTEPS

cjmverweij
Posts: 1
Joined: Thu Jan 09, 2014 6:36 pm

Re: Assistance with making photobooth

Thu Jan 09, 2014 7:00 pm

hey blanius,

I'm very interested in what kind of Selphy you used?
I've been trying to get my Selphy cp720, but i haven't had any succes. it won't do anything. but the thing is that the driver for this one also isn't listed in CUPS, so i don't think it is supported.
so i'm planning on buying another model, but i can't really find any conformation on the internet of which models might work with a Pi.

so maybe you can help me out with that!

blanius
Posts: 35
Joined: Mon Jan 21, 2013 6:48 pm

Re: Assistance with making photobooth

Thu Jan 09, 2014 11:34 pm

I'm using the 740.

Might want to look at HP as they have the best linux support. Also there are no spare parts available for the 740

safay
Posts: 3
Joined: Fri Mar 07, 2014 6:35 pm

Re: Assistance with making photobooth

Fri Mar 07, 2014 6:38 pm

Just posted an Instructable about how to build a photobooth controller with a Raspberry Pi.

See it here:
http://www.instructables.com/id/Raspber ... ontroller/

Thanks for checking it out!

tadzoa
Posts: 10
Joined: Mon Oct 15, 2012 11:36 am

Re: Assistance with making photobooth

Sat May 24, 2014 8:15 pm

Hi,

I am working on a photobooth for my wedding.

I started from the code posted by blanius (Thanks a lot !) and changed some things, but I have still have some questions :

- is it be possible to display text during the process of photo capture ? I saw that it is not possible to lay text over the camera preview because of camera limitation),but as in my case the preview is smaller than the background, I have some space where I would like to display acountdown during preview, then another message, and maybe a final message.
- How can I display the photo just taken for some seconds right after capture ?

Thanks,

blanius
Posts: 35
Joined: Mon Jan 21, 2013 6:48 pm

Re: Assistance with making photobooth

Sat May 24, 2014 11:34 pm

Actually I did some thing like that in current version. Issue I had is that tkinter doesn't update when I needed. But I think it could be done. I'll upload my current code and that might help. Notice where I force the text to update right after seeing the text variable.

blanius
Posts: 35
Joined: Mon Jan 21, 2013 6:48 pm

Re: Assistance with making photobooth

Sat May 24, 2014 11:37 pm

Code: Select all

 # Raspberry Pi PhotoBooth by Bret Lanuis
# Using Pi Camera Module
# Requires PIL and picamera libraries
# http://github/waveform80/picamera
# Pythonware.com/prosucts/pil
# bret Lanius bret@bretlanius.com http://bretlanius.com
# assumes Flashdrive at /media/IMAGES for data storage


import PIL.Image
import ImageDraw
import os, sys
import picamera
import time
from Tkinter import *
import RPi.GPIO as GPIO


#Track Prints
print_count=0
max_prints=25


#Setup GPIO
GPIO.setmode(GPIO.BCM)
shutdown=4
photo_btn=22
light=17
flash=14


GPIO.setup(shutdown,GPIO.IN)
GPIO.setup(photo_btn,GPIO.IN)
GPIO.setup(light,GPIO.OUT)
GPIO.setup(flash,GPIO.OUT)

off=False
shutter=False
test=True #True no printout and Shutdown only warns
BlackAndWhite=False
def checkButton():
    checkShutdown()
        
    shutter=GPIO.input(photo_btn)
    if shutter==TRUE:
        global v
        v.set("Smile!!                      ")
        root.update_idletasks()
        takephotos()
        shutter=FALSE
    else:
        v.set("Press Button to take 4 Photos")
        root.update_idletasks()
        root.after(10,checkButton)

def checkShutdown():
    off=GPIO.input(shutdown)
    #print "Shutdown ="+str(off)
    if off==TRUE and test==TRUE:
        os.system("sudo shutdown -k now Shutdown Button pressed")
    if off==TRUE and test==FALSE:
        v.set("Shutting down!!!             ")
        root.update_idletasks()
        os.system("sudo shutdown -h now Shutdown Button pressed")
        sys.exit(0)
        
def printout(filename):
    os.system("lp "+filename)
    global print_count
    print_count +=1
    print "Count="+str(print_count)
    
def takephotos():
    #Start taking Photos
    today = time.strftime("%d-%m-%Y")
    path="/media/IMAGES/"+today+"/"
    print os.path.isdir(path)
    if not (os.path.isdir(path)):
     print "making it"
     os.mkdir(path)
    else:
     print "Already made"
    print path

    v.set("Taking Photo 1                     ")
    root.update_idletasks()
    now=time.strftime("%H%M%S")
    GPIO.output(light,1)
    camera.hflip=TRUE
    camera.start_preview()
    time.sleep(5)
    camera.hflip=FALSE
    camera.capture(path+now+"A.jpg")
    camera.stop_preview()
    GPIO.output(light,0)
    time.sleep(0.5)

    v.set("Taking Photo 2                   ")
    root.update_idletasks()
    GPIO.output(light,1)
    camera.hflip=TRUE
    camera.start_preview()
    time.sleep(5)
    camera.hflip=FALSE
    camera.capture(path+now+"B.jpg")
    camera.stop_preview()
    GPIO.output(light,0)
    time.sleep(0.5)

    v.set("Taking Photo 3                    ")
    root.update_idletasks()
    GPIO.output(light,1)
    camera.hflip=TRUE
    camera.start_preview()
    time.sleep(5)
    camera.hflip=FALSE
    camera.capture(path+now+"C.jpg")
    camera.stop_preview()
    GPIO.output(light,0)
    time.sleep(0.5)

    v.set(" #4   Last one!                     ")
    root.update_idletasks()
    GPIO.output(light,1)
    camera.hflip=TRUE
    camera.start_preview()
    time.sleep(5)
    camera.hflip=FALSE
    camera.capture(path+now+"D.jpg")
    camera.stop_preview()
    GPIO.output(light,0)
    v.set("Please wait while I finish up   ")
    root.update_idletasks()
    
    try:
        imagename1=path+now+"A.jpg"
        im=PIL.Image.open(path+now+"A.jpg")
        im2=PIL.Image.open(path+now+"B.jpg")
        im3=PIL.Image.open(path+now+"C.jpg")
        im4=PIL.Image.open(path+now+"D.jpg")
    except:
        print sys.exc_value
        print "Unable to load Images"
        print (imagename1)
        exit(1)
    print "Images loaded"

    try:
      final=PIL.Image.open("/media/IMAGES/BG.png")
    except:
      print "Unable to load BG"
      exit(1)
        
    print "BG Loaded"

    draw=ImageDraw.Draw(im)
    #im.thumbnail((450,450),PIL.Image.ANTIALIAS)
    final.paste(im,(265,200))
    im.thumbnail((150,150),PIL.Image.ANTIALIAS)
    final.paste(im,(74,115))
    im2.thumbnail((150,150),PIL.Image.ANTIALIAS)
    final.paste(im2,(74,283))
    im3.thumbnail((150,150),PIL.Image.ANTIALIAS)
    final.paste(im3,(75,451))
    im4.thumbnail((150,150),PIL.Image.ANTIALIAS)
    final.paste(im3,(75,619))
    final.save("/media/IMAGES/final.jpg")

    print "Saving /media/IMAGES/final_"+now+".jpg"
    final.save("/media/IMAGES/final_"+now+".jpg")
    time.sleep(0.5)
    if not test:
        printout("/media/IMAGES/final_"+now+".jpg")
    
    v.set("Done!!                               ")
    root.update_idletasks()
    time.sleep(1)
    root.after(10,checkButton)
    
    
root=Tk()
root.title("photoBooth")
w, h = root.winfo_screenwidth(), root.winfo_screenheight()
root.overrideredirect(1)
root.geometry("660x440+0+0")

pane1 = Frame(root,relief=RAISED,borderwidth=2)
pane1.pack(side=TOP,expand=YES,fill=BOTH)

def btn_click(event):
    GPIO.cleanup()
    sys.exit(0)
    
bgImage=PhotoImage(file="photoboothbackground.gif")
bg=Label(pane1,image=bgImage)
bg.image=bgImage
bg.bind("<Double-Button>",btn_click)
bg.pack()
v=StringVar()
l=Label(pane1,bg="white",font=("Verdana",30),textvariable=v).place(x=0,y=0)

v.set("Press Button to take 4 photos")


camera=picamera.PiCamera()
camera.preview_fullscreen = False
camera.preview_window=(10,70,640,360)
camera.led=False
camera.awb_mode="sunlight"

if BlackAndWhite:
    camera.color_effects = (128,128)
camera.resolution = (350,350)
#camera.crop=(0.5,0.5,1.0,1.0)

root.after(10,checkButton)
root.mainloop()
 

tadzoa
Posts: 10
Joined: Mon Oct 15, 2012 11:36 am

Re: Assistance with making photobooth

Wed May 28, 2014 9:55 am

Thanks ! I will look at that tonight.

I saw that you also added a flash in addition to the Led Ring.
I am wondering how to get decent lighting on my photobooth, have you succeeded to trigger a real photo flash using gpio output ?

Also I am curious about the led ring you used. Do you have a picture that shows what it looks like ?

blanius
Posts: 35
Joined: Mon Jan 21, 2013 6:48 pm

Re: Assistance with making photobooth

Wed May 28, 2014 10:42 am

The ring ended up not being enough. I completely rehoused this whole thing. I took led light ribbon and inserted it into translucent hose and ran it all the way around the perimter of the box. The flash in the code is something I havent actually added yet. What I intended was to have the main leds come on and stay on durning the whole time and to add a second small array of leds that come on just before the photo is taken and off between shots. This gives a little more light and people would be aware that the photo had happened. I'll look for some more current pictures

Return to “Other projects”