rem Fudgey's Fast/Slow/Video Motion Detector with masks.rem Requires a build with "dm_movie" included.rem (At the time of writing only a570is KAP test build has this feature).rem rem Changes to MDFB 080411: rem Burst/Review time is now burst/review/video time.rem In video mode it specifies how long in seconds to film.rem rem Fast/Slow mode is now fast/slow/video mode. Video mode isrem never fast, mode change takes some time. To optimize it try decresingrem sleep times in video_md_loop to whatever minimum values your camerarem allows. The most important one is after the line 'press "dm_movie"'rem because that delay is waited between detection and start of record.rem rem If you set video time 0 s, about 1 second of video will be shot.remrem Shortened the title a bit.rem rem Developed on A570IS by fudgey. May work on all Digic III cameras.rem Allbest build 34 or higher (or compatible md_detect_motion) is required forrem fast/slow MD modes, a build with dm_movie is required for video mode.rem Digic II needs a small modification: "get_prop 206 p" -> "get_prop 205 p"@title Fast MD 080414@param a Columns@default a 6@param b Rows@default b 4@param c Threshold (0-255)@default c 10@param g Burst/Review/Video time (s)@default g 0@param d Compare Interval (ms)@default d 7@param h Pixel Step (pixels)@default h 6@param f Channel (0U,1Y,2V,3R,4G,5B)@default f 1@param n Timeout (10s of seconds)@default n 30@param e Trigger Delay (0.1 sec)@default e 5@param i Masking (0=No 1=Mask 2=Use)@default i 0@param j Mask Columns Left@default j 0@param k Mask Columns Right@default k 0@param l Mask Rows Top@default l 0@param m Mask Rows Bottom@default m 0@param o Shoot fast=0 slow=1 video=2@default o 0if a<1 then a=1if b<1 then b=1if i<0 then i=0if i>2 then i=2if j<0 then j=0if k<0 then k=0if l<0 then l=0if m<0 then m=0if j>a then j=aif k>a then k=aif l>b then l=bif m>b then m=bif g<0 then g=0if f<0 then f=1if f>5 then f=1if f=0 then print "Channel: U chroma"if f=1 then print "Channel: Luminance"if f=2 then print "Channel: V chroma"if f=3 then print "Channel: Red"if f=4 then print "Channel: Green"if f=5 then print "Channel: Blue"if n<1 then n=1e=e*100g=g*1000n=n*10000if o=1 then goto "slow_md"if o=2 then goto "video_md"print "Fast shoot mode":fast_md_loop press "shoot_half" t=0 do do get_prop 206 p until p=1 md_detect_motion a, b, f, n, d, c, 1, t, i, j+1, l+1, a-k, b-m, 9, h, e until t>0 let X=get_tick_count :contloop1 let U=get_tick_count let V=(U-X) if V<g then goto "contloop1" release "shoot_full" do get_prop 206 p until p<>1goto "fast_md_loop":slow_mdprint "Slow shoot mode":slow_md_loop t=0 do md_detect_motion a, b, f, n, d, c, 1, t, i, j+1, l+1, a-k, b-m, 0, h, e until t>0 if g>1 then goto "contshoot2" else shoot goto "slow_md_loop" :contshoot2 press "shoot_full" let X=get_tick_count :contloop2 let U=get_tick_count let V=(U-X) if V<g then goto "contloop2" release "shoot_full" do get_prop 206 p until p<>1goto "slow_md_loop":video_mdif g<1 then g=1print "Video clip mode":video_md_loop do md_detect_motion a, b, f, n, d, c, 1, t, i, j+1, l+1, a-k, b-m, 0, h, e until t>0 press "dm_movie" sleep 1000 press "shoot_full" print "starting video record" sleep 300 release "shoot_full" let X=get_tick_count :videowaitloop let U=get_tick_count let V=(U-X) if V<g then goto "videowaitloop" press "shoot_full" print "ending video record" sleep 300 release "shoot_full" sleep 1000 release "dm_movie" sleep 1000 do get_prop 206 p until p<>1goto "video_md_loop"
as the camera needs processing time to close a video file
Quoteas the camera needs processing time to close a video filein future builds this can be found out via ubasic, i guess i will add it. as in my recent dev thread we now have a way to find out status of video recording. you can ask the status of that special variable and you can directly see: video in progress? video stopped? video stopped but not finished writing to card?sorry for offtopic, just wanted to tell barney.
hm, dont know how s3is is focusing during/before recording video. will make a test someday.in this post http://chdk.setepontos.com/index.php/topic,978.msg9804.html#msg9804 i built such a version that has a ubasic way of finding out status of movierecording. i may add a command to find out current mode dial position (prop 230 doesnt seem to work on my s3is?), as chdk does find that out (camera independent) i only need to include that "check" into ubasic.
Started by LjL
« 1 2 »
Started by fudgey
Started by A630Lover
Started by Mushin
Started by waspinator