supplierdeeply

p-mode canon A810

  • 3 Replies
  • 742 Views
p-mode canon A810
« on: 02 / January / 2017, 00:32:02 »
Advertisements
dear chdk members


I am slowly learning how to use the kit to control the camera


i am trying to understand how to use manual focus.


It looked as if manual focus can only work in a non-auto mode.

I have switched the camera to pmode
with


luar set_capture_mode(2)
however, after this
luar press("shoot_full")
produces a beep but does not capture an image.


in capture mode(1) which is auto, this does produce a capture.


I also ran the mftest.lua script and it reports that manual focus should be available, but
I do not seem to be able to confirm this.


in auto mode the camera seems to be auto focusing constantly but in p
-mode this does not happen. set_focus() reports success but I do not see any change in the image on the lcd display and the capture does not work.


could someone advice what Iam doing wrong?


I am trying to get to a situation when I am able to use auto focus to focus the camera and then "freeze" the focus and capture images.


Thank you very much for your help

panda

*

Offline srsa_4c

  • ******
  • 3538
Re: p-mode canon A810
« Reply #1 on: 02 / January / 2017, 09:51:54 »
luar press("shoot_full")
produces a beep but does not capture an image.
Try the shoot() script command instead.
Quote
I am trying to get to a situation when I am able to use auto focus to focus the camera and then "freeze" the focus and capture images.
See the set_aflock() command.

Once in AF lock, set_focus() (if you still need it, as set_aflock(1) runs a focus scan prior to locking the focus) will likely start to work.

See the scripting reference for details on commands: http://chdk.wikia.com/wiki/CHDK_Scripting_Cross_Reference_Page

Re: p-mode canon A810
« Reply #2 on: 02 / January / 2017, 10:18:01 »
i apologize for not being clear...


In Auto mode autofocus is always running . I suspect this is controlled by a setting
in the camera (not in the chdk)


in auto, props.SERVO_AF=2 and props.CONTINUOUS_AF=1


in P-mode, the autofocusing stops props.SERVO_AF=0 and props.CONTINUOUS_AF=0


this is can also be confirmed by using get_focus()


so it does not appear to need set_aflock(). If I use set_aflock(1) then set_focus() returns false and any get_focus() returns old value (which was when the mode was switched to P)
if I set_aflock(0) then set_focus() returns true, but get_focus() still returns the old value.


i am not sure why shoot() will help but will try...


thank you for your help


panda

Re: p-mode canon A810
« Reply #3 on: 02 / January / 2017, 13:28:49 »
In Auto mode autofocus is always running . I suspect this is controlled by a setting
in the camera (not in the chdk). in auto, props.SERVO_AF=2 and props.CONTINUOUS_AF=1 in P-mode, the autofocusing stops props.SERVO_AF=0 and props.CONTINUOUS_AF=0
This is normal for any Canon P&S camera - it has nothing to do with CHDK at all.  However, most cameras will fail to manually focus under CHDK control if either SERVO_AF or CONTINUOUS_AF are enabled.


Quote
so it does not appear to need set_aflock().
Using set_aflock() tells the camera not to focus when you "half press" the shutter button.  It has nothing to do with the continuous auto focus you reported.  And for many cameras,  you will need it enabled for set_focus() to work.

You can learn a lot more about MF here :Setting focus from scripts or menus including the link to what each camera has been reported to support of need here : Google Docs Spreadsheet


Quote
i am not sure why shoot() will help but will try...
shoot() goes through the whole process of taking a picture in the correct order.  Specifically :
  • half press
  • focus
  • set exposure
  • full press
  • make the exposure
  • start storing the jpeg on SD card
  • release full press
  • release half press
  • complete storing the jpeg on SD card
In your example, you were only performing step 4.
Ported :   A1200    SD940   G10    Powershot N    G16


 

Related Topics