You'll have to get into script writing a bit to actually do the kind of shot you desire. But below is a quick example script that demonstrates a way to do it. It first zooms to wide angle, then starts taking a photo and after 100ms of exposure it starts zooming to full tele.I tried it with Tv mode about 1,5 s exposure and it appears to work. Code: (Lua) [Select]--[[Test zooming during long exposure.1) Set camera to shoot a very long exposure (either M or Tv mode orCHDK Tv override).2) run the script--]]max_zoom = get_zoom_steps() - 1if get_zoom() ~= 0 then set_zoom(0) sleep(5000)endpress("shoot_half")repeat sleep(1) until get_shooting() == truepress("shoot_full")sleep(100)set_zoom(max_zoom)repeat sleep(1)until get_shooting() ~= truerelease("shoot_full")release("shoot_half")
--[[Test zooming during long exposure.1) Set camera to shoot a very long exposure (either M or Tv mode orCHDK Tv override).2) run the script--]]max_zoom = get_zoom_steps() - 1if get_zoom() ~= 0 then set_zoom(0) sleep(5000)endpress("shoot_half")repeat sleep(1) until get_shooting() == truepress("shoot_full")sleep(100)set_zoom(max_zoom)repeat sleep(1)until get_shooting() ~= truerelease("shoot_full")release("shoot_half")
That script assumes you have setup the camera to take a long exposure ( or "B"ulb or "M"anual) exposure using the Canon setup menus.
Measure the zoom time. That's the basis for the exposure time. Choose the exposure time not too short, e.g. zoom time is 2.2 s, choose not 2.5 s but 3.2 s.msl
Play also with the time in line 22.
Quote from: msl on 26 / July / 2012, 16:31:33Measure the zoom time. That's the basis for the exposure time. Choose the exposure time not too short, e.g. zoom time is 2.2 s, choose not 2.5 s but 3.2 s.mslYes, I tried it from 0.5 s to 10 s, but not much difference. The problem persists. Zoom is too fast and shutter lags behind it. I'm going to try set_zoom_speed. let's see what happens.
--[[@title Z-Shoot@param a wait shoot x 0,1 s@default a 1@param b zoom time x 1 s@default b 5]]function get_zoom_time() local time1 = get_tick_count() set_zoom(max_zoom) local time2 = get_tick_count() - time1 + 250 set_zoom(0) return time2endfunction zoom_shoot(tv) set_tv96_direct(tv) press("shoot_half") repeat sleep(10) until get_shooting() == true press("shoot_full") sleep(wait) set_zoom(max_zoom) release("shoot_full") release("shoot_half") repeat sleep(10) until get_shooting() ~= true set_zoom(0)endfunction print_tv(nn) local tv_output = {"64","50","40","32","25","20","15","13","10","8","6","5","4", "3.2","2.5","2","1.6","1.3","1.0","0.8","0.6","0.5","0.4","0.3","1/4","1/5", "1/6","1/8","1/10","1/13","1/15","1/20","1/25","1/30","1/40","1/50","1/60", "1/80","1/100","1/125","1/160","1/200","1/250","1/320","1/400","1/500", "1/640","1/800","1/1000","1/1250","1/1600","1/2000","1/2500","1/3200", "1/4000","1/5000","1/6400","1/8000","1/10000"} if (nn +19) > table.getn(tv_output) or (nn +19) < 1 then return "n/a" else return tv_output[nn +19] endend function restore() cls() set_zoom(0) set_console_autoredraw(1)endif a < 1 then a = 1 endwait = a*100if b < 1 then b = 1 endzoom_time = b*1000finish = 0tv = -160/32max_zoom = get_zoom_steps()-1set_console_autoredraw(0)if get_mode() == true then if get_zoom() ~= 0 then set_zoom(0) sleep(zoom_time) end repeat cls() print("[\26] get zoom time") print("zoom time:",zoom_time,"ms") print("[SET] zoom shoot") print("[\18] ", print_tv(tv)) print("[MENU] end") console_redraw() wait_click(0) if is_pressed("right") then zoom_time = get_zoom_time() elseif is_pressed("set") then zoom_shoot(tv * 32) elseif is_pressed("up") then tv = tv - 1 elseif is_pressed("down") then tv = tv + 1 elseif is_pressed("menu") then finish = 1 end until finish == 1else print("no record mode") sleep(2000)endrestore()
I've updated an older script based on fudgey's zoom shoot script. You can measure the zoom time and set the exposure time via script. Play with the parameter 'wait shoot'. This is the wait time in 1/10 s between start shutter and zoom. I think, this is dependent of the camera.The script works fine for me, tested with the A720 (7 zoom steps).I think however that this script is not suitable for super-zoom cameras!!!Code: (lua) [Select]--[[@title Z-Shoot@param a wait shoot x 0,1 s@default a 1@param b zoom time x 1 s@default b 5]]function get_zoom_time() local time1 = get_tick_count() set_zoom(max_zoom) local time2 = get_tick_count() - time1 + 250 set_zoom(0) return time2endfunction zoom_shoot(tv) set_tv96_direct(tv) press("shoot_half") repeat sleep(10) until get_shooting() == true press("shoot_full") sleep(wait) set_zoom(max_zoom) release("shoot_full") release("shoot_half") repeat sleep(10) until get_shooting() ~= true set_zoom(0)endfunction print_tv(nn) local tv_output = {"64","50","40","32","25","20","15","13","10","8","6","5","4", "3.2","2.5","2","1.6","1.3","1.0","0.8","0.6","0.5","0.4","0.3","1/4","1/5", "1/6","1/8","1/10","1/13","1/15","1/20","1/25","1/30","1/40","1/50","1/60", "1/80","1/100","1/125","1/160","1/200","1/250","1/320","1/400","1/500", "1/640","1/800","1/1000","1/1250","1/1600","1/2000","1/2500","1/3200", "1/4000","1/5000","1/6400","1/8000","1/10000"} if (nn +19) > table.getn(tv_output) or (nn +19) < 1 then return "n/a" else return tv_output[nn +19] endend function restore() cls() set_zoom(0) set_console_autoredraw(1)endif a < 1 then a = 1 endwait = a*100if b < 1 then b = 1 endzoom_time = b*1000finish = 0tv = -160/32max_zoom = get_zoom_steps()-1set_console_autoredraw(0)if get_mode() == true then if get_zoom() ~= 0 then set_zoom(0) sleep(zoom_time) end repeat cls() print("[\26] get zoom time") print("zoom time:",zoom_time,"ms") print("[SET] zoom shoot") print("[\18] ", print_tv(tv)) print("[MENU] end") console_redraw() wait_click(0) if is_pressed("right") then zoom_time = get_zoom_time() elseif is_pressed("set") then zoom_shoot(tv * 32) elseif is_pressed("up") then tv = tv - 1 elseif is_pressed("down") then tv = tv + 1 elseif is_pressed("menu") then finish = 1 end until finish == 1else print("no record mode") sleep(2000)endrestore()msl
The IXUS 115 has only 10 positions of the zoom stepper motor and a fairly short zoom range so it's not surprising that it can go from one end of the zoom range to the other quickly.You could try a loop from 1 to max_zoom instead of lines 22 & 23 - you can then vary the sleep delay in the loop for each step and also the loop increment amount to control the zoom timing. If you make these parameters to the script then you can play with the values without constantly editing the script.Phil.
but I got error while running the script. Please tell me how to solve that?
Started by fudgey Feature Requests
Started by Terry325 Feature Requests
Started by c_joerg « 1 2 » LUA Scripting
Started by blenderbach General Chat