Universal Manual Focus - page 2 - Feature Requests - CHDK Forum

Universal Manual Focus

  • 47 Replies
  • 24139 Views
*

Offline jbourgui

  • *
  • 15
  • SD500 & G9
Re: Universal Manual Focus
« Reply #10 on: 08 / July / 2008, 22:49:48 »
Advertisements
cyril42e, thanks for digging out that info...  definitely a bummer, tho.  I wonder if it is something that is known not possible, or if nobody has found out how to do it from the firmware dumps...  realize I'm saying this as someone who has never tried porting CHDK, much less digging through the firmware...  just curious if it is _at all possible_ that some day, some intrepid coder with an SD500 will figure this out...  Cheers!  :)

-joe

*

Offline cyril42e

  • ***
  • 111
  • SD1000/Ixus70 1.02a
    • CR-TEKnologies
Re: Universal Manual Focus
« Reply #11 on: 09 / July / 2008, 05:44:29 »
I wonder if it is something that is known not possible, or if nobody has found out how to do it from the firmware dumps...

Yes I was wondering that too, I tried to find some info on the forum about SD500 porting, but didn't find much info...

Strange, it seems that SD500 is the ONLY camera that cannot SD override... although it seems to have Canon's MoveFocusLensToDistance defined... Maybe we should try to enable it and see what happens...

Edit: you can try http://crteknologies.free.fr/publish/chdk/ixus700_sd500-101a_sdover.tar.gz or http://crteknologies.free.fr/publish/chdk/ixus700_sd500-101b_sdover.tar.gz. There should be a menu entry for sd override, tell us if it doesn't work, crash the camera, or maybe works :)
« Last Edit: 09 / July / 2008, 06:10:15 by cyril42e »

Re: Universal Manual Focus
« Reply #12 on: 09 / July / 2008, 12:04:10 »
I wonder if it is something that is known not possible, or if nobody has found out how to do it from the firmware dumps...

Yes I was wondering that too, I tried to find some info on the forum about SD500 porting, but didn't find much info...

Strange, it seems that SD500 is the ONLY camera that cannot SD override... although it seems to have Canon's MoveFocusLensToDistance defined... Maybe we should try to enable it and see what happens...

Edit: you can try http://crteknologies.free.fr/publish/chdk/ixus700_sd500-101a_sdover.tar.gz or http://crteknologies.free.fr/publish/chdk/ixus700_sd500-101b_sdover.tar.gz. There should be a menu entry for sd override, tell us if it doesn't work, crash the camera, or maybe works :)

Hi i have a IXUS 700 and firmware 1.01a. Tried your build and it works great. I can do manual focus after pressing up when in ALT mode. Hope to see this added in allbest and Jucifers build.

I can do some more testing if you requier it.
« Last Edit: 09 / July / 2008, 12:15:42 by Nickman »

*

Offline jbourgui

  • *
  • 15
  • SD500 & G9
Re: Universal Manual Focus
« Reply #13 on: 09 / July / 2008, 15:00:25 »
hmm!  now we're possibly getting somewhere...  Nickman tested it with an IXUS700 and it worked;  I tested with my SD500 and every time I attempt to adjust Subject Distance with the zoom rocker, the camera powers down with lens out.  I am running cyril's build, with fw 101a.   I'm not sure why there would be a difference between the IXUS and SD, but if you can give me detailed testing steps, I'll trace this down and hopefully we'll have something usable for all SD500 owners... 

Let me know the specific steps to take and any memory dumps, etc that you require (and how to do them, since I'm new to CHDK troubleshooting...) 

Cheers!

-joe
« Last Edit: 09 / July / 2008, 15:10:25 by jbourgui »


*

Offline jbourgui

  • *
  • 15
  • SD500 & G9
Re: Universal Manual Focus
« Reply #14 on: 09 / July / 2008, 20:51:15 »
Well, I've done some further testing, all of which has resulted in no manual focus control.  I wrote the script below to try to figure out what was going on (be gentle, it's my first script!!) with the Property Cases 65 & 66, as well as what happens with the get/set_focus command.   Setting props 65/66 to alternate values never changes any focus outcome.  using the set_focus command doesn't appear to change anything at all.   When I use cyril's build and do the Alt-up, and then zoom rocker, I can actually hear the lens trying to re-focus before it shuts down with the lens out...  Any advice for me?? 

Does this script work for anybody else to manually set focus?  I was testing by: point camera at something ~1meter away, then adjust numbers to something like ~3m away, set focus, take photo.

Keys:
Up: moves focus out 100mm
Down: moves focus in 100mm
Left: attempts to set focus to what you've defined
Set: takes photo
Right: quits
Zoom rocker goes between updating Property Case 65 & 66

(fyi, due to a limited knowledge of ubasic on my part, this script will only take 1 photo;  2nd photo always crashes it.  I'm pretty sure it is a problem with how I used click "shoot_full"??  Any and all advice or edits to this code are welcome!!)

Code: [Select]
@title Manual Focus
@param a propcase
@default a 65
@param b focus mm
@default b 2000
press "shoot_half"
rem not sure if click "mf" works on cams without mf button?
click "mf"
:loop
  wait_click
  is_key k "zoom_in"
    if k=1 then a=65
  is_key k "zoom_out"
    if k=1 then a=66
  is_key k "up"
    if k=1 then b=b+100
  is_key k "down"
    if k=1 then b=b-100
  is_key k "left"
    if k=1 then goto "setfocus"
  is_key k "set"
    if k=1 then click "shoot_full"
  is_key k "right"
    if k=1 then goto "lend"
  get_prop a c
  get_focus f
  print a,"=",c ,"b=",b, "F=", f
goto "loop"
:lend
end
:setfocus
set_prop a b
set_focus b
  get_prop a c
  get_focus f
  print a,"=",c ,"b=",b, "F=", f
goto "loop"

I know we'll figure this out eventually!!    :D

Cheers! 

-joe
« Last Edit: 09 / July / 2008, 20:53:08 by jbourgui »

*

Offline LjL

  • ****
  • 266
  • A720IS
Re: Universal Manual Focus
« Reply #15 on: 10 / July / 2008, 07:58:21 »
I don't think that click "mf" will work on cameras without a MF button. It just simulates the button press. My camera has manual focus but no MF button, and I need to use another command.

On my camera, set_focus doesn't seem to have any effect if I'm not in MF mode, anyway - and neither do the shortcuts to go to hyperfocal and infinity.

I think I recall (but I'm not sure) that the shooting_set_focus(x, SET_NOW) function works even in autofocus mode, but easily results in camera crashes.

Can you set AF lock on these cameras? Perhaps it might help.
« Last Edit: 10 / July / 2008, 08:04:11 by LjL »

*

Offline jbourgui

  • *
  • 15
  • SD500 & G9
Re: Universal Manual Focus
« Reply #16 on: 10 / July / 2008, 13:05:51 »
@LjL, yes, AF lock is set with Half_Shoot, then Left.  I'm not sure how to make a useful MF script using just that, though... 

is the "shooting_set_focus(x, SET_NOW)" something that can only be called in the build?  that isn't usable in ubasic, right? 

What I generally do to "manual focus" is point, Half_Shoot over and over until the cam picks something near the focal plane of my target, then AFL, then reframe, then shoot.  Obviously, a real MF would save time and hassle with this, and give reproducible results, not to mention allow focus bracketing, etc, etc...  I just inquired with Nirschi on this thread (http://chdk.setepontos.com/index.php/topic,321.15.html) about his progress on MF for the IXUS cameras...  keep your fingers crossed...

-joe

*

Offline LjL

  • ****
  • 266
  • A720IS
Re: Universal Manual Focus
« Reply #17 on: 10 / July / 2008, 15:39:15 »
No, shooting_set_focus() cannot be called from uBasic. uBasic's set_focus is similar, but I think it uses the SET_LATER flag.

Anyway, try setting AF lock in a script and then using set_focus, something like this perhaps:


press "half_shoot"
click "left"
rem try with and without this
rem release "half_shoot"
set_focus 10
click "shoot_full"


Re: Universal Manual Focus
« Reply #18 on: 11 / July / 2008, 04:19:52 »
man, thanx to all people working on CHDK. Smiley

i have spent hours experimenting with my IXUS70 and CHDK, but one thing was troubling me, and that is focus.
it would be really great if something like review mode after photographing a picture to see if you have good focus, with 1:1 pixel window, could be seen during focusing, and fixing good focus before taking a picture. having 65535 positions for focusing is really great, but it is very  hard to get proper focus on display without many tryes/errors.

superb work! 10x to you all!

*

Offline LjL

  • ****
  • 266
  • A720IS
Re: Universal Manual Focus
« Reply #19 on: 11 / July / 2008, 07:01:04 »
I feel your pain, even the 2x focusing window is really too little.

But I'm afraid you shouldn't hold your breath until the day we'll be able to use a 1:1 focus window... that involves asking the sensor to give the full output for a region of pixels, and I've recently learned that we have no clue how to do that, or talk to the sensor at all to begin with.

One thing that could be nice (and doable) is an overlay mode (sort of like Zebra) where shades of gray would highlight the more contrasty parts of the image. The resolution would be the same as always, but it would make it easier to spot correct focus.

One little tip I can give right now is: look for aliasing. When your subject (at least certain well-contrasted subject) is well in focus, you'll likely start to see aliasing on the viewport, in the form of single pixels that "stick out" with the "wrong" color. And if you don't have the 2x focusing window, use digital telephoto to that purpose.

 

Related Topics