Manual focus and presets in video mode - Completed and Working Scripts - CHDK Forum

Manual focus and presets in video mode

  • 7 Replies
  • 11353 Views
*

Offline a710is

  • ****
  • 250
  • A710 IS
Manual focus and presets in video mode
« on: 19 / March / 2008, 07:51:35 »
Advertisements
As video zoom is working great now I modified a script by kamil to configure the buttons for various focus positions.

You can read more in the script's help
It works on my A710, don't know about other

And here's a totally unartistic representation :D

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

« Last Edit: 19 / March / 2008, 10:09:09 by a710is »

Re: Manual focus and presets in video mode
« Reply #1 on: 25 / March / 2008, 12:08:44 »
a auto focus script is better, i think.
because the new allbest's focus in zoom video can not auto change .

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: Manual focus and presets in video mode
« Reply #2 on: 25 / March / 2008, 13:34:56 »
on my cam it does autofocus!?

Re: Manual focus and presets in video mode
« Reply #3 on: 27 / March / 2008, 12:10:13 »
but my a610 can not autofocus
« Last Edit: 27 / March / 2008, 22:29:14 by yunxiang »

Re: Manual focus and presets in video mode
« Reply #4 on: 27 / March / 2008, 22:28:52 »
this sript make zoom out of work
a610
 

*

Offline kamil

  • *
  • 21
  • G7
Re: Manual focus and presets in video mode
« Reply #5 on: 30 / March / 2008, 05:12:24 »
Thanks A710is. I dont have time now for modify my scrips.  :)

*

Offline beq

  • *
  • 4
Re: Manual focus and presets in video mode
« Reply #6 on: 18 / December / 2009, 07:10:41 »
tested on a540. OK.

Is possible to adjust focus manually in steps? for example one key is for focus out and other one is for focus in ? I just want click and hold "focus in" button and focus smooth and slow.
« Last Edit: 18 / December / 2009, 07:19:10 by beq »

Re: Manual focus and presets in video mode
« Reply #7 on: 20 / December / 2009, 04:01:49 »
The script seem to work on my g9(100f).
But I don't understand how to set the various focus values

 

Related Topics


SimplePortal © 2008-2014, SimplePortal