Manual Focus in video on A560 - Script Writing - CHDK Forum

Manual Focus in video on A560

  • 0 Replies
  • 2025 Views
Manual Focus in video on A560
« on: 07 / December / 2009, 18:36:31 »
Advertisements
I'm trying to do manual focus while recording a video. I found a similiar script to what I need, but this one is for A710 and it doesn't work good with my A560.

Here it is:
Code: [Select]
rem script by kamil modified by a710is
@title focus in video
@param a auto focus /erase/
@default a 11
@param b auto focus /left/
@default b 3
@param d auto focus /set/
@default d 5
@param e auto focus /right/
@default e 7
@param f auto focus /up/
@default f 9
@param g auto focus /down/
@default g 1


@param j help (1-on)

if j=1 then gosub "help"

get_prop 12 q
if q=0 then set_prop 12 1

get_focus u
o=0

do
o=o+1
p=o*o*(o+1)*(o+1)+90
until u<p

v=o

press "shoot_half"
sleep 800
click "shoot_full"
print "HALF SHOOT - stop record"
:loop
wait_click
if is_key "up" then goto "focus_5"
if is_key "down" then goto "focus_6"
if is_key "left" then goto "focus_2"
if is_key "set" then goto "focus_3"
if is_key "right" then goto "focus_4"
if is_key "erase" then goto "focus_1"
if is_key "shoot_half" then goto "end"
if is_key "menu" then goto "add_focus"
if is_key "display" then goto "min_focus"


goto "loop"


:focus_1
v=a
gosub "focus_dance"
goto "loop"

:focus_2
v=b
gosub "focus_dance"
goto "loop"

:focus_3
v=d
gosub "focus_dance"
goto "loop"

:focus_4
v=e
gosub "focus_dance"
goto "loop"

:focus_5
v=f
gosub "focus_dance"
goto "loop"

:focus_6
v=g
gosub "focus_dance"
goto "loop"

:add_focus
v=v+1
gosub "focus_dance"
goto "loop"

:min_focus
v=v-1
gosub "focus_dance"
goto "loop"

:focus_dance
u=(v*v*v*v)+90
if v>=11 then u=65535
if v<1 then let v=1
if v>11 then let v=11
set_focus u
get_focus t
print "focus", v; "/11 ("t; " mm)"
return

:end
click "shoot_full"
end

end

:help
print "Use with CAUTION"
print "working on A710 IS"
print "maybe others too"
print "or you need modify this"
print " - [ click ANY KEY ] - "
wait_click
print "this script allows"
print "to configure buttons"
print "to toggle between"
print "11 focus steps"
print " - [ click ANY KEY ] - "
wait_click
print "keys: UP/DOWN/"
print "/LEFT/SET/RIGH and"
print "ERASE are configurable"
print "focus positions"
print " - [ click ANY KEY ] - "
wait_click
print "DISPLAY and MENU"
print "increase/ decrease focus"
print "You can disable focus"
print "assignment by entering"
print " - [ click ANY KEY ] - "
wait_click
print "0 parameter"
print "to stop recording"
print "Press SHOOT HALF"
print "Enjoy"
print " - [ click ANY KEY ] - "

wait_click
cls
return

I want to rewrite it for A560.
The first thing is that A560 doesn't have an "ERASE" button.
get_focus doesn't seem to work (always gives 0)
Now, when I put it into the 11th focus step, the picture becomes blurred. The best picture is when I put it on the 5th focus step in this script. Any higher steps gives me blurred picture. The lower steps than 5th works fine. Can someone help me with this? (sorry for my english)
« Last Edit: 07 / December / 2009, 18:38:25 by Dale65 »

 

Related Topics


SimplePortal © 2008-2014, SimplePortal