Ok mx3. I want it to work like your toy throwing
Can you post your script please?
@title md split h3
@param a Columns
@default a 8
@param b Rows
@default b 6
@param c Threshold (0-255)
@default c 10
@param d compare Interval (millisecs)
@default d 80
@param e Begin Triggering Delay(secs)
@default e 20
@param f Rows
@default f 1
@param g pix step(speed/accuracy adj)
@default g 8
@param h reg mode(0-no,1-incl,2-excl)
@default h 2
@param i measure mode(1-Y,0-U,2-V)
@default i 1
if a<1 then let a=1
if b<1 then let b=1
if c<0 then let c=0
if g<1 then let g=1
if f<1 then let f=1
let e=e*1000
print ">[";a;",";b;"] threshold: ";c
let x=30000
for z=0 to 10000
let t=0
rem /--/-columns, rows to split picture into
rem | |
rem | | measure mode (Y,U,V R,G,B) - U-0, Y-1, V-2, 3-R, 4-G, 5-B
rem | | |
rem | | | timeout
rem | | | | comparison interval (msec)
rem | | | | | threshold ( difference in cell to trigger detection)
rem | | | | | | draw_grid (0-no, 1-yes)
rem | | | | | | | return variable. number of cells with motion detected
rem | | | | | | | |
rem | | | | | | | | VVVVVV OPTIONAL PARAMETERS: VVVV
rem | | | | | | | |
rem | | | | | | | | region (masking) mode: 0-no regions, 1-include, 2-exclude
rem | | | | | | | | | region first column
rem | | | | | | | | | | region first row
rem | | | | | | | | | | | region last column
rem | | | | | | | | | | | | region last row
rem | | | | | | | | | | | | | parameters- 1-make immediate shoot, 2-log debug information into file. OR-ed values are accepted
rem | | | | | | | | | | | | | | pixels step - speed vs. Accuracy adjustments (1-use every pixel, 2-use every second pixel, etc)
rem | | | | | | | | | | | | | | | number of milliseconds to wait before begin triggering - can be useful for calibration with "draw_grid" option
rem | | | | | | | | | | | | | | | |
rem V V V V V V V V V V V V V V V V
md_detect_motion a, b, i, x, d, c, 1, t, h, 1, 1, a, f , 0, g, e
if t<1 then goto "zzz"
click "shoot_full"
rem sleep 10
rem release "shoot_full"
:zzz
next z
end
I used 8x6 grid
15 msec - comparison interval ( really change occurs every 100 msec. but this can be tweaked to 30 msec. see bellow)
I used delay - 1sec
30 sec - timeout (can be freely increased to hours. only purpose of it to allow execution of other basic commands )
I used allbest's 16 unmodified build
On my A610, the first shot after motion occurs is taken properly. But after that the camera just keeps on taking photos without waiting for motion. The person who posted the general purpose motion detection script said that on their camera, this occurs if they don't use a delay amount of at least 5 seconds, but they don't know why that is. I would like to know.
I'm not sure. maybe they use preview of taken picture or something else
what delay value sutisfied you?
The whole idea of using this to capture lightning is having the shutter open at the correct times, increasing the chance to almost 100% that every shot will have lightning in it. But if I have to set the delay to more than 5 seconds and have a shutter speed of 1 second, well I'll have like a 17% chance of capturing a strike. An intervalometer would do a better job.
I'm not sure I understand thing about 1 second
assume we wait 5 second as a delay (my camera likes 1 sec and don't make continuous shoots)
then md_detect_motion waits for hours for detection
I would say - 99.9% of time detector will do it's work
Your sample shots of throwing the toys? I need to know how you do it. Because that's how I expected it to work. But it doesn't on my A610 with everything I've tried. Like I said before I can slowly wave my hand in front of the camera and by the time the shot is taken the hand has passed. What is your script and what are the camera settings used for the toy throwing examples?
as for tweaking 100msec->30msec
I think for my a630 will do following code change.
void *vid_get_viewport_live_fb(){
void **fb=(void **)0x5230;
return fb[ *((unsigned char*)0x5240) ];
}
for your camera model addresses will be different
code explanation.
current CHDK code for histogram/zebra/md calculations uses only one of three available data buffers
while histogram/zebra/md code tries to make calculations on outdated buffers other buffers are really changed
every buffer is updated in 100msec sequentially
so we are loosing 60 msec interval :-)
I'm not sure - but I have explained this somwhere on dpreview or somwhere else