Sx40 motion detection - General Help and Assistance on using CHDK stable releases - CHDK Forum

Sx40 motion detection

  • 1 Replies
  • 3977 Views
Sx40 motion detection
« on: 26 / December / 2012, 10:34:30 »
Advertisements
Hi everyone, tried doing a search but was t able to find what I was looking for. Basically I want to use the motion detection to take one picture when there is motion. But at the moment the two scripts already on, seem to constantly take photos once it has detected motion!

Can anyone explain why and how to resolve?!

Thanks very much,

Matt

Re: Sx40 motion detection
« Reply #1 on: 26 / December / 2012, 11:09:17 »
Can anyone explain why and how to resolve?!
That's a fairly simple script,  intended as an example rather than a fully functional shooting script.

Documentation for the motion detect function can be found here :

http://chdk.wikia.com/wiki/Motion_Detection

Typically,  to solve your problem you want to increase the threshold value (f) and start delay (p).   This will respectively change the amount of image change necessary to trigger a shot and add a small delay for the camera to "settle" before looking for motion after each shot.

Try f=40 and p=1000 as a starting point.  You will need to edit the script file.  It might be better to convert the script to set those as user parameter like this :

Code: [Select]
@title Motion Detect
@param f = sensitivity
@default f 40
@param p = interval (msec)
@default p 1000

a=6
b=6
c=1
d=300000
e=200
g=1
h=0
i=0 
j=0
k=0
l=0
m=0
n=0
o=2

do

md_detect_motion a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p

if( h > 0 ) then
shoot
endif

until (0)


HTH

« Last Edit: 26 / December / 2012, 11:13:47 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics


SimplePortal © 2008-2014, SimplePortal