S3is, zooming video and focusing - Script Writing - CHDK Forum

S3is, zooming video and focusing

  • 0 Replies
  • 1633 Views
S3is, zooming video and focusing
« on: 26 / April / 2009, 05:13:22 »
Advertisements
I am trying to write a simple LUA script for my S3is that would record a continuous video (about 30min) while changing the zoom level from time to time (quasi-random intervals).
The script works perfectly apart from the focusing. When I change the zoom by hand while filming a video, the focus distance manages to stay more or less constant and the built-in continuous autofocus works correctly but when I use a set_zoom from a script the focus gets completely wrong. Not only does the camera completely lose focus while zooming but it even fails to regain the correct focus after it has finished zooming (even though it tries). Does anyone know how to get the correct focusing while filming a video on the S3is?

Here is the script:
Code: [Select]
--[[
@title AutoMovie
@param s Zoom speed
@default s 10
--]]

repeat
  set_zoom_speed(s)
  sleep(1000*math.random(2,10))
  set_zoom(32*math.random(2,4))
  sleep(1000*math.random(2,5))
  set_zoom(0)
until nil

EDIT:
Press/release zoom_in/out functions seem to be working correctly so I guess the problem is solved.



« Last Edit: 26 / April / 2009, 05:48:57 by dsvilko »

 

Related Topics