Disable focusing... - Script Writing - CHDK Forum

Disable focusing...

  • 8 Replies
  • 7934 Views
Disable focusing...
« on: 16 / November / 2008, 15:46:55 »
Advertisements
Hello folks,

I'm desperatly searching for a way to disable the auto-focus so that the camera does not focus on each "half-press" command. Focusing on each picture may damage the focusing system on long timelapse sessions. Even if you set your camera to infinity-focus you will hear that it makes those typical focusing sounds coming from the lens.

On my IXUS 70 i noticed the following:
 1) If I force the camera to MF-Mode by "set_prop(propcase.FOCUS_MODE,1)" and setting "set_focus(65535)" it will do
those sounds on each pic... means it refocuses to infinity for each picture. .. BUT...

2) ...when I stop the script and turn my camera to review Mode and back to photo Mode and run the script again... it will do no focusing any more... meaning that you can't hear anything from the lens. It just triggers the picture.

Is there a way to force the camera showing this behavior right from the start without the dirty trick to change to review mode and back again to photomode?

Any help is welcome!
Cheers

careyer

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Disable focusing...
« Reply #1 on: 16 / November / 2008, 17:02:42 »
First, I don't have a solution. Other people know more about the ixuses, but I believe you may have discovered something new. I only have my a570is which has manual focus in Canon's firmware, but as you see in the timelapse script comments I too had some problems forcing manual focus from the script. I just didn't spend much time on it because to me that feature was just to prevent me from screwing up by forgetting to set MF.

It's very much possible that there's another way, maybe even one that's already scriptable. You are forcing the camera to manual focus using a propcase. It's common that changing procases do what we wish, but that the changes aren't quite as widespread as they are when you change the same feature from Canon's user interface. The typical example is that Canon's OSD will usually not be updated by our overrides, because we aren't changing the actual software setting at the high user interface level. Instead, we are changing low level things, i.e. something that the change made via the user interface eventually changes, but not directly. So often our changes are overwritten by the original firmware without a warning.

When changing between play and rec modes, Canon's firmware executes some initialization stuff to prepare for shooting or playback. From what you say it very much sounds like that there's something that makes the manual focus mode become more strongly into effect and that it actually reads the propcase value during that process. It's possible that whatever this is could be called at will by CHDK or duplicated (not now, but in the future), but don't get your hopes up.

It's also possible that something else that we can already do in lua and/or ubasic has the same effect. For example hitting the display button (or whatever key stroke combination is needed for your camera) to disable the LCD and the sensor and then coming back from that state could cause some of this initialization to be called. I'd also test zooming in and out a step by button presses. Think about it for a while and you'll probably think of a couple of more things you can test.

Oh and changing between rec and play modes is also possible from scripts in some custom builds for some camera models (probably not yours), but I know that -- like many other overrides -- this particular way of switching is also not complete and it may skip this thing that's helping you; but can't know without trying.

And lastly, does your camera have an auto focus lock feature? If you set that before starting the script and remove all focus related things from it, what happens?

*

Offline fe50

  • ******
  • 3147
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Disable focusing...
« Reply #2 on: 16 / November / 2008, 19:35:38 »
As i know, all Ixus modells have AFL (auto focus lock), normally you get it with shutter-half-press + left key.
--> AFL is only available in manual (M) mode !

With AFL enabled the camera don't focus; AFL stays active until you zoom or switch to another mode (play, scene or just from manual to auto).

AFL can also be used in a script, simply emulate the short key.With AEL it's the same...

Re: Disable focusing...
« Reply #3 on: 16 / November / 2008, 23:45:27 »
Thank you for your quick answers! ;-)

fe50 was right! The IXUS has:
 - AFL (autofocus lock) on halfpress+left
 - AEL (Exposure Lock) on halfpress + up

Great thing!
Where did you get that information from? It's not even explained in the manual?
That helps a lot :-)
Anyway let's hope that CHDK will include those initalization stuff in near future!

Cheers!
careyer


Re: Disable focusing...
« Reply #4 on: 07 / December / 2008, 04:47:09 »
Wow this is great!!!!

I was just looking for a similar script to fix my panorama problems but I suppose I don't need one since there's AEL and AFL.

I noticed that often my stitch pictures have different exposures, or focal points (without adjusting thru CHDK) and this solves the 'wow i can clearly tell you stitched these photos because half the picture's different than the other half' comment.

Thanks!
« Last Edit: 07 / December / 2008, 04:49:48 by aydn »

*

Offline fe50

  • ******
  • 3147
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Disable focusing...
« Reply #5 on: 07 / December / 2008, 08:01:56 »
Haha - with CHDK you'll find all the 'hidden' Canon features - they are 'hidden' until you write a feature request in the CHDK forum or you read the manual the first time after you bought the camera years ago  :haha

Re: Disable focusing...
« Reply #6 on: 14 / April / 2009, 14:43:03 »
i am not sure if this thread is dead, but since it is so closely related to my problem i give it a try... i am aware of the AFL, but my problem is that it does not work in combination with display off. is there a way to do that, or a hack around it? (i am using sd 800is with chdk built 0.9.7-729). i am a newbie, and so far my tinkering with script did not bring the result i wanted (using "click display" in the script does not work probably because while in alt-mode for running a script the display button does not work that way). any ideas?

Re: Disable focusing...
« Reply #7 on: 29 / November / 2009, 01:45:06 »
I'm attempting to use this in my time lapse script on my a650. Unfortunately I'm not certain that any of the techniques mentioned are working. Further, its my goal to produce this programmatically.

currently the code that i'm using pertaining to focusing -

Code: [Select]
press("shoot_half")
  repeat
    sleep(1)
  until get_shooting() == true
 
set_focus(65535)

press("shoot_full")

if i'm interpreting my camera sounds correctly, this still produces some focus motors to move although it is minimal. the goal is no movement to focus.

is there a programmatic method of initiating focus lock?


*

Offline reyalp

  • ******
  • 14086
Re: Disable focusing...
« Reply #8 on: 29 / November / 2009, 02:20:57 »
Yes, AFlock is available from script on most cameras. See set_aflock. You can also do it with button presses, see page 98 of the a650 manual.

Since your camera has MF, you could also use that via button presses.

Newer cameras actually have a "focus at infinity" mode which is very handy ;)
Don't forget what the H stands for.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal