Photobooth

  • 10 Replies
  • 5373 Views
*

Offline Naito

  • *
  • 19
Photobooth
« on: 21 / June / 2012, 15:08:35 »
Advertisements
Hi all, just thought I'd post up something I'd been working on for my own wedding.  It's a CHDK powered motion-detection-triggered photobooth.  It's intended to be operator free, just set it up and copy the pictures off the SDcard at the end of the night.  Idea is that people can just come up to a camera and backdrop set up to the side, camera will detect and automatically shoot a series of photos, then reset and wait for next group.

Parameters are:
a: Number of shots to take in a row
b: Delay before each shot (seconds)
c: Timeout before re-arming motion detection (seconds)
d: Time to verify that there really is a person/group in the frame and not just someone walking past
e: MotionDetection threshold (Parameter F in http://chdk.wikia.com/wiki/Motion_Detection)
f: Debug mode, don't actually take a picture, just play shutter sound

Developed and tested on a SX110 IS, I'll test it on a couple older cameras later as well.
update: tested with SD1000, works fine!

My first time writing a CHDK script, comments and suggestions welcome!
edit: updated script slightly.
« Last Edit: 21 / June / 2012, 21:48:21 by Naito »

*

Offline Naito

  • *
  • 19
Re: Photobooth
« Reply #1 on: 22 / June / 2012, 12:45:15 »
Found a bug that I can't figure out how to fix.  If I turn picture review on, the motion detect script that runs between each shot to make sure the group hasn't left will always trigger, even if there is no motion.  With review off, it functions properly.

I've tried increasing the modect delay, adding some sleep time, checking more camera ready flags etc, no luck.  Any ideas?

*

Offline Naito

  • *
  • 19
Re: Photobooth
« Reply #2 on: 02 / July / 2012, 20:26:26 »
Working with reyalp, managed to implement face detection trigger on the SX110.  This is an updated version specific to the SX110, fixed the above bug I had too (was a stupid logic error on my part, will update the main script shortly).  It automatically starts the photobooth on power on if you use autostart, so it should be very hands off.

Enjoy!


*

Offline Naito

  • *
  • 19
Re: Photobooth
« Reply #3 on: 02 / July / 2012, 20:32:40 »
Updated "general" version, same as above post but using the "continuous motion" routine in the original rather than face detection.  Tested on SX110, SD1000, and SD630.


Re: Photobooth
« Reply #4 on: 31 / May / 2013, 02:17:13 »
I have tested this script on the IXUS 85 (aka SD770) and it does not work. The camera crashes after the first shot has been taken. Am I doing sth. wrong?

Re: Photobooth
« Reply #5 on: 31 / May / 2013, 07:18:28 »
I have tested this script on the IXUS 85 (aka SD770) and it does not work. The camera crashes after the first shot has been taken. Am I doing sth. wrong?
I took a quick look and the script looks mostly okay.  There are three things in the script that are "camera specific" though -  multiple calls to set_led(9,0,0)  ,  play_sound(3)  , and set_prop_str(105,1)

So set_led might be poking the wrong LED for your camera.  Play_sound might be broken.  And set_prop_string has potential issues (see below).   Do you see an LED turn on & off when the script runs?  Is there any sound?  Does the Canon overlay on the LCD screen change?

You could comment those functions all out and see if the script runs properly (they are not needed for script functionality - they just make the camera seem more interactive).

Also, the set_prop_string(105,1) is suspicious. In the wiki documentation, propcase 105 (DISP_MODE) is listed as being "Read Only". So setting it doesn't seem right.  And I'm not sure why he did a set_prop_string instead of a simple set_prop.  Regardless,  comment that line (124) out and try that.

*

Offline Naito

  • *
  • 19
Re: Photobooth
« Reply #6 on: 31 / May / 2013, 09:30:36 »
Sorry I hadn't touched this script since I used it for my own wedding last year.  I plan to update it in the next couple weeks to use at a friend's wedding though.  Are you using the "general" script or the SX110 specific one?

Secondly, these scripts were last tested on CHDK versions from last year, there may have been changes since then.  If I have time this weekend I'll take a look and update these.

I started a Git repo yesterday here:
https://github.com/carlchan/chdk-photobooth

So development updates will go there before I update them here.

Glad to see someone's using this! Feedback is always welcome.

Re: Photobooth
« Reply #7 on: 31 / May / 2013, 10:49:14 »
Sorry I hadn't touched this script since I used it for my own wedding last year.  I plan to update it in the next couple weeks to use at a friend's wedding though.  Are you using the "general" script or the SX110 specific one?
My comments were about the "general" one.  Like most scripts, there are several ways to do things.

For example, if my comment about set_prop_str(105,1) for most camera's is correct, you can do the equivalent function this way :

Code: [Select]
   count = 5
   repeat
        disp = get_prop(props.DISPLAY_MODE)
        if ( disp ~= 1 ) then
            click("display")
            sleep(500)
        end
        count=count-1
    until (( disp==1 ) or (count==0))

Also, lines 111 to 121 could be accomplished like this :

Code: [Select]
set_record(1)
Whatever works for you is good.


*

Offline Naito

  • *
  • 19
Re: Photobooth
« Reply #8 on: 19 / June / 2013, 20:52:44 »
Updated the SX110 version on GitHub, I seem to have uploaded an outdated version previously.

My comments were about the "general" one.  Like most scripts, there are several ways to do things.

For example, if my comment about set_prop_str(105,1) for most camera's is correct, you can do the equivalent function this way :

Code: [Select]
   count = 5
   repeat
        disp = get_prop(props.DISPLAY_MODE)
        if ( disp ~= 1 ) then
            click("display")
            sleep(500)
        end
        count=count-1
    until (( disp==1 ) or (count==0))
Honestly I forget what that block did (ugh I should've had more comments), will give that a try and test it on my other P&S cam for the general script.

Also, lines 111 to 121 could be accomplished like this :

Code: [Select]
set_record(1)
Whatever works for you is good.

Thanks waterwingz.  I think I separated all the various focus and shoots into separate lines with delays because of a bug with the SX110, it always starts in playback mode and either I didn't know of set_record or it didn't work.  I'll try it again soon though.

*

Offline Naito

  • *
  • 19
Re: Photobooth
« Reply #9 on: 19 / June / 2013, 20:56:03 »
Ah.  The set_prop_str was for disabling the Canon display:
http://chdk.wikia.com/wiki/PropertyCase#Digic_III_.26_Digic_IV_.28propset2.29

 

Related Topics