CarLapse - LUA Script for timelapse out of a driving car

Based uppon the "Night-time time-lapse" script (which did unfortunalty not work on cameras not offering a dedicated 'M'-Mode) I designed a time-lapse skript which is especially designed to produce time-lapse movies out of a driving car. (no 'M'-Mode enabled camera is needed) For this purpose some requirements have to be met:

-- store script start time and disk space at the beginning:starttick=get_tick_count()startdiskspace=get_free_disk_space()

-- next_shoot keeps the time (in get_tick_count units) when next shot should be taken.-- initialise next_shoot to "shoot now"next_shoot=0

-- force manual focus (does this work?)set_prop(propcase.FOCUS_MODE,1)-- disable IS (dunno if this works either)set_prop(propcase.IS_MODE,3)-- use widest available aperture (I'm assuming that cameras that don't have an aperture won't respond to this in any way)set_prop(propcase.USER_AV,get_prop(propcase.MIN_AV))-- disable flashset_prop(propcase.FLASH_MODE,2)

-- main loop. the program loops forever unless you interrupt itloopcounter=0repeat loopcounter = loopcounter+1 -- now wait for the time to do next shot repeat sleep(1) tick=get_tick_count() until tick>=next_shoot

i realized that the auto-iso adjustment within CarLapseV2 did not work correctly. I fixed the problem by doing it in a more sophisticated and nicer way in CarLapseV3 now and I added some new features:

- you may pause the script now with the "DISP" button and resume it with the "MENU" button. (keep the "DISP"-button pressed until script pauses). This feature is particulary nice when waiting e.g. at a traffic light Helps saving storage ;-)

if startupdelaySec>0 then for remaining=startupdelaySec,1,-1 do print("Sleeping ", remaining, " seconds") sleep(1000) endend

-- enable shot histogramshot_histo_enable(1)

-- start counting framescount_frames=1

-- store script start time and disk space at the beginning:starttick=get_tick_count()startdiskspace=get_free_disk_space()

-- next_shoot keeps the time (in get_tick_count units) when next shot should be taken.-- initialise next_shoot to "shoot now"next_shoot=0

-- force manual focus (does this work?)set_prop(propcase.FOCUS_MODE,1)-- disable IS (dunno if this works either)set_prop(propcase.IS_MODE,3)-- use widest available aperture (I'm assuming that cameras that don't have an aperture won't respond to this in any way)set_prop(propcase.USER_AV,get_prop(propcase.MIN_AV))-- disable flashset_prop(propcase.FLASH_MODE,2)

-- main loop. the program loops forever unless you interrupt itloopcounter=0repeat wait_click(100) if is_pressed "display" then print("Paused by user") repeatwait_click(100) until is_pressed "menu" print("Continued by user") end

loopcounter = loopcounter+1 -- now wait for the time to do next shot repeat sleep(1) tick=get_tick_count() until tick>=next_shoot

-- we are now ready to shoot, calculate the next shot time next_shoot=tick + min_delay*1000

-- return to top, where we will wait to shoot

if (e == loopcounter) then break enduntil 1==2

BTW:I'm desperatly searching for a way to disable the auto-focus so that the camera does not focus on each "half-press" command. Focusing on each picture may damage the focusing system on long timelapse sessions. Even if you set your camera to infinity-focus you will hear that it makes those typical focusing sounds coming from the lens.

On my IXUS 70 i noticed the following:If I force the camera to MF-Mode by "set_prop(propcase.FOCUS_MODE,1)" and setting "set_focus(65535)" it will dothose sounds on each pic... means it refocuses to infinity for each picture. .. BUT... when I stop the script and turn my camera to review Mode and back to photo Mode and run the script again... it will do no focusing any more... meaning that you can't hear anything from the lens. It just triggers the picture.

Is there a way to force the camera showing this behavior right from the start without the dirty trick to change to review mode and back again to photomode?

if startupdelaySec>0 then for remaining=startupdelaySec,1,-1 do print("Sleeping ", remaining, " seconds") sleep(1000) endend

-- enable shot histogramshot_histo_enable(1)

-- start counting framescount_frames=1

-- store script start time and disk space at the beginning:starttick=get_tick_count()startdiskspace=get_free_disk_space()

-- next_shoot keeps the time (in get_tick_count units) when next shot should be taken.-- initialise next_shoot to "shoot now"next_shoot=0

-- force manual focus (does this work?)set_prop(propcase.FOCUS_MODE,1)-- disable IS (dunno if this works either)set_prop(propcase.IS_MODE,3)-- use widest available aperture (I'm assuming that cameras that don't have an aperture won't respond to this in any way)set_prop(propcase.USER_AV,get_prop(propcase.MIN_AV))-- disable flashset_prop(propcase.FLASH_MODE,2)

-- main loop. the program loops forever unless you interrupt itloopcounter=0repeat wait_click(100) if is_pressed "display" then print("Paused by user") repeatwait_click(100) until is_pressed "menu" print("Continued by user") end

loopcounter = loopcounter+1 -- now wait for the time to do next shot repeat sleep(1) tick=get_tick_count() until tick>=next_shoot

I've improved the script a bit further. In CarLapseV4 I introduced the possibility to PAUSE and RESUME the shooting by button-presses. That's a nice feature when you are waiting at red traffic lights or get into a traffic jam. CarLapseV5 now uses "Motion Detection" to automatically realize if you are in movement with your car or not... If you are not (e.g. when you are waiting at traffic lights) it will PAUSE and RESUME shooting instantly when you start driving again. :-)

if startupdelaySec>0 then for remaining=startupdelaySec,1,-1 do print("Sleeping ", remaining, " seconds") sleep(1000) endend

-- enable shot histogramshot_histo_enable(1)

-- start counting framescount_frames=1

-- store script start time and disk space at the beginning:starttick=get_tick_count()startdiskspace=get_free_disk_space()

-- next_shoot keeps the time (in get_tick_count units) when next shot should be taken.-- initialise next_shoot to "shoot now"next_shoot=0

-- force manual focus (does this work?)set_prop(propcase.FOCUS_MODE,1)-- disable IS (dunno if this works either)set_prop(propcase.IS_MODE,3)-- use widest available aperture (I'm assuming that cameras that don't have an aperture won't respond to this in any way)set_prop(propcase.USER_AV,get_prop(propcase.MIN_AV))-- disable flashset_prop(propcase.FLASH_MODE,2)

-- main loop. the program loops forever unless you interrupt itloopcounter=0mdcounter=0repeat mdcounter=mdcounter+1 wait_click(100) if is_pressed "display" then print("Paused by user") repeatwait_click(100) until is_pressed "menu" print("Continued by user") end

loopcounter = loopcounter+1 -- now wait for the time to do next shot repeat sleep(1) tick=get_tick_count() until tick>=next_shoot