CHDK Wiki
No edit summary
(I added my Camera on which it works fine)
Tag: Visual edit
 
(3 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
Although this theoretically allows you to take time-lapse photos as large as you like, I recommend setting the image size down a bit, especially if you're shooting under 2 sec/shot, cause the camera takes a while to process/save the image, which might screw up your timing.
 
Although this theoretically allows you to take time-lapse photos as large as you like, I recommend setting the image size down a bit, especially if you're shooting under 2 sec/shot, cause the camera takes a while to process/save the image, which might screw up your timing.
   
Works great on A560, S90 with the 100c fw and with the IXUS 60. Worked great!
+
Works great on A560, S90 with the 100c fw and with the IXUS 60 and IXUS 132. Worked great!
   
 
NOTE: On my PowerShot SD1000, you can only shoot pics that require flash in auto-flash mode and pics that don't require flash in no-flash mode. It does not take photos if your camera is in auto-flash mode but does not need to flash. If you try, the camera kind of stalls and doesn't do anything. Solution: set the flash mode to whatever you're expecting on your route. If you're attaching your camera to your bike, turn flash '''off''' before you start taking photos.
 
NOTE: On my PowerShot SD1000, you can only shoot pics that require flash in auto-flash mode and pics that don't require flash in no-flash mode. It does not take photos if your camera is in auto-flash mode but does not need to flash. If you try, the camera kind of stalls and doesn't do anything. Solution: set the flash mode to whatever you're expecting on your route. If you're attaching your camera to your bike, turn flash '''off''' before you start taking photos.
Line 17: Line 17:
 
@default b 0
 
@default b 0
 
 
i=a*1000 + b*100
+
i=a*1000 + b*10
 
if i<100 then let i=100
 
if i<100 then let i=100
 
t=get_tick_count
 
t=get_tick_count
Line 43: Line 43:
 
sleep d
 
sleep d
 
goto "shot"</code>
 
goto "shot"</code>
  +
User add >>
 
  +
   
 
Improvement, to save energy between shots (last shot is displayed) and exit by SET. Created for A480, not tested on others. Also worked on A460, SX130IS.
 
Improvement, to save energy between shots (last shot is displayed) and exit by SET. Created for A480, not tested on others. Also worked on A460, SX130IS.
Line 67: Line 68:
 
 
 
:shot
 
:shot
t=get_tick_count
+
t=get_tick_count
print "Shot", n
+
print "Shot", n
shoot
+
shoot
n=n+1
+
n=n+1
rem Wait i msecs, including the
+
rem Wait i msecs, including the
rem time it takes to shoot.
+
rem time it takes to shoot.
rem Shoots as fast as possible if
+
rem Shoots as fast as possible if
rem each shot takes longer than
+
rem each shot takes longer than
rem i msecs.
+
rem i msecs.
d= i - get_tick_count + t
+
d= i - get_tick_count + t
if d<0 then let d=0
+
if d<0 then let d=0
click "display"
+
click "display"
sleep d
+
sleep d
if is_key "set" then goto "exit"
+
if is_key "set" then goto "exit"
goto "shot"
+
goto "shot"
+
 
:exit
 
:exit
print "End"
+
print "End"
end</code>
+
end</code>
User add >>
 
 
I changed the 9th line, where i is calculated, from "i=a*1000 + b*100" to "i=a*1000 + b*10" since b*100 would actually be 1/10 second rather than 1/100 second.
 
 
[[Category:Scripts]]
 
[[Category:Scripts]]

Latest revision as of 19:22, 2 February 2015

A really simple script for time lapse photography (as a replacement for the one in movie mode). Takes pictures at the given interval (using get_tick_count for accuracy), or as fast as it can (if the interval is too short).

Although this theoretically allows you to take time-lapse photos as large as you like, I recommend setting the image size down a bit, especially if you're shooting under 2 sec/shot, cause the camera takes a while to process/save the image, which might screw up your timing.

Works great on A560, S90 with the 100c fw and with the IXUS 60 and IXUS 132. Worked great!

NOTE: On my PowerShot SD1000, you can only shoot pics that require flash in auto-flash mode and pics that don't require flash in no-flash mode. It does not take photos if your camera is in auto-flash mode but does not need to flash. If you try, the camera kind of stalls and doesn't do anything. Solution: set the flash mode to whatever you're expecting on your route. If you're attaching your camera to your bike, turn flash off before you start taking photos.

rem Time Lapse Photography
 rem Step 1: Mount camera on bike
 rem Step 2: Click "shoot" button
 rem Step 3: Profit!
 
 @title Time Lapse Photos
 @param a Interval (secs)
 @default a 1
 @param b Interval (1/100 sec) 
 @default b 0
  
 i=a*1000 + b*10
 if i<100 then let i=100
 t=get_tick_count
 
 rem Shot counter
 n=1
 
 print "Time Lapse Photos"
 
 sleep 1000
 goto "shot"
 
 :shot
   t=get_tick_count 
   print "Shot", n 
   shoot
   n=n+1
   rem Wait i msecs, including the
   rem time it takes to shoot. 
   rem Shoots as fast as possible if
   rem each shot takes longer than
   rem i msecs. 
   d= i - get_tick_count + t
   if d<0 then let d=0
   sleep d
   goto "shot"


Improvement, to save energy between shots (last shot is displayed) and exit by SET. Created for A480, not tested on others. Also worked on A460, SX130IS.

rem Time Lapse Photography (OQ 4)
 
 @title Time Lapse Photos (OQ 4)
 @param a Interval (secs)
 @default a 10
 @param b +Interval (1/100 sec) 
 @default b 0
 
 i=a*1000 + b*10
 if i<100 then let i=100
 t=get_tick_count

 rem Shot counter
 n=1

 print "Time Lapse Photos"

 sleep 1000
 goto "shot"

 :shot
   t=get_tick_count 
   print "Shot", n 
   shoot
   n=n+1
   rem Wait i msecs, including the
   rem time it takes to shoot. 
   rem Shoots as fast as possible if
   rem each shot takes longer than
   rem i msecs. 
   d= i - get_tick_count + t
   if d<0 then let d=0
   click "display"
   sleep d
   if is_key "set" then goto "exit"
   goto "shot"
   
 :exit
  print "End"
  end