Setting focus from scripts or menus - page 47 - General Discussion and Assistance - CHDK Forum

Setting focus from scripts or menus

  • 601 Replies
  • 214209 Views
Re: Setting focus from scripts or menus
« Reply #460 on: 24 / June / 2014, 17:05:55 »
Advertisements
It seems to me that i've found a "magic" number for the set_focus() command: 5836.
Still not sure if it sets focus to infinite on ixus 125 because now i can test only indoor (nighttime here).
At least focus seems to be forward than previous tests.
I took the liberty of editing your focus3 script (with notepad  :P ) and through trials&errors changed "distance" numbers growing from 5828 to 5848.
On exiftool (Canon Maker Notes) all set_focus() values below 5836 give a "Focus Distance Upper" of 3.83 mt,
all values above 5836 give a "Focus Distance Upper" of 65.53 mt (infinity on regular landascapes shots).
5836 is the first set_focus() value that gives 65.53 mt.

Running the scipt "3.83 mt" returns on screen a get_focus() value of 3805, "65.53 mt" corresponds to -1

Obviously i've to test it again in daylight (tomorrow).

EDIT  ... :( sadly
A bit more testing with all room lights on and i can report that 5836 is not the real infinity value.
There is not any percepible difference in focus among the series. Focus stays locked at a short distance in all shots.
However it remains a sort of "transition" set_focus value

... for sure it's good for the Lottery
« Last Edit: 24 / June / 2014, 18:36:36 by fabri22 »

Re: Setting focus from scripts or menus
« Reply #461 on: 24 / June / 2014, 19:28:00 »
It seems to me that i've found a "magic" number for the set_focus() command: 5836.
That would be 5.8 meter - which could effectively be infinity given the amazing depth of field these little cameras have.

However, as you point out, it's still noy focused at infinity when you look at the saved image.

You mentioned in earlier posts that it seems to focus at close range.  Have you worked out which values cause the focus to move and where it stops actually changing in the images?

Ported :   A1200    SD940   G10    Powershot N    G16

Re: Setting focus from scripts or menus
« Reply #462 on: 25 / June / 2014, 05:07:30 »
That would be 5.8 meter - which could effectively be infinity given the amazing depth of field these little cameras have.
I can't believe that with this small sensor and this wide angle lens i cannot get the infinity whatever set_focus value is given.
That's why i'm full convinced that the lens is acting in macro mode on the ixus 125.

Quote
You mentioned in earlier posts that it seems to focus at close range.  Have you worked out which values cause the focus to move and where it stops actually changing in the images?

From 100 to 2100 the "Focus Distance Upper" on exiftool grows in small steps from 0.1 mt to 1.83 mt
From 2100 to 2920 there are occasional steps up to 2.53 mt, then stuck until 3000  where it reaches 3.83 mt and there remains until the "famous" 5836 where it becomes 65.53 mt.

It's hard to see differences in real focus when set_focus is more than 400-500.

The real focus range of all the above values seems to me less than 1 mt (with the ixus 125)
I took over 600-700 pics to reach these frustrating results (not your fault, but my stubbornness) ... and the battery door is already a bit loosened. When connected via USB i cannot see the chdk folder in explorer (windows 8 ).
« Last Edit: 25 / June / 2014, 06:09:16 by fabri22 »

Re: Setting focus from scripts or menus
« Reply #463 on: 25 / June / 2014, 08:38:25 »
I can't believe that with this small sensor and this wide angle lens i cannot get the infinity whatever set_focus value is given.  That's why i'm full convinced that the lens is acting in macro mode on the ixus 125.
As I suggested earlier, this may be a case of CHDK calling the wrong function in the Canon code. Saying that is a lot easier than proving it - I likely won't get a chance to explore that option before the weekend.

Quote
From 100 to 2100 the "Focus Distance Upper" on exiftool grows in small steps from 0.1 mt to 1.83 mt
From 2100 to 2920 there are occasional steps up to 2.53 mt, then stuck until 3000  where it reaches 3.83 mt and there remains until the "famous" 5836 where it becomes 65.53 mt. It's hard to see differences in real focus when set_focus is more than 400-500.
Just to confirm (because this is very important). If the camera is pointed at a lot of objects close to the camera does the focus point actually change over at least part of the 100 to 2100 range in the images you take (not just the "Focus Distance Upper") ? I like to use a yardstick tilted up through the camera's field of view for these test.  Or is it called a meterstick these days?
Quote
When connected via USB i cannot see the chdk folder in explorer (windows 8 ).
Why do you need to see the CHDK folder?  Images should all be in A/DCIM.  Or are you looking for the log file? 

If you use CHDKPTP you should be able browse and download from all the folders :  http://chdk.wikia.com/wiki/PTP_Extension#chdkptp
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Setting focus from scripts or menus
« Reply #464 on: 25 / June / 2014, 11:20:03 »
Why do you need to see the CHDK folder?  Images should all be in A/DCIM.  Or are you looking for the log file? 
If you use CHDKPTP you should be able browse and download from all the folders :  http://chdk.wikia.com/wiki/PTP_Extension#chdkptp
I edited "distances" in your focus script a lot of times to know those values results. That's why i need to see the CHDK folder and its content without removing the memory card everytime.
Have read about CHDKPTP but it need more "study". Didn't find a simple setup procedure. My aging brain is still trying to learn the huge CHDK potentialities and docs.
ASAP i'll perform the "meterstick" test.

Re: Setting focus from scripts or menus
« Reply #465 on: 25 / June / 2014, 11:27:30 »
Quote from: fabri22 link=topic=11078.msg113922#msg113922
Have read about CHDKPTP but it need more "study". Didn't find a simple setup procedure. My aging brain is still trying to learn the huge CHDK potentialities and docs.
ASAP i'll perform the "meterstick" test.
If you are running on Windows, it installs and runs once you have the USB drivers thing sorted. Which can be a real PITA I admit.

There is also a neat hack that some ports enable to allow the camera to run with the SD card door open.  When it was discussed a little while ago there was not general support for enabling it for all cameras unfortunately.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline mmcon

  • *
  • 10
Re: Setting focus from scripts or menus
« Reply #466 on: 25 / June / 2014, 15:52:58 »
Ptpcamgui though is kindof limited  is working well for me with ixus 200. There is a basic file copy which transfers files to CHDK/scripts folder. Advanced copy is used to update the chdk version with a new version in the form of a zip file.  You can then view transferred files via file browser under misc stuff in your camera's chdk menu. The ptpcam console take lua commands via luar <your command>. You have to have chdk started before connecting to computer.

I couldnt get chdkptp gui working with my ixus 200 though the gui really needs no study and is straightforward.

Re: Setting focus from scripts or menus
« Reply #467 on: 26 / June / 2014, 06:21:22 »
@mmcon
Thanks for the info about Ptpcamgui.

@waterwingz
I tested an edited script with the "meterstick".
First of all i've to say that it's hard to judge the real focus point of a wide angle lens.
I made similar tests to verify if any back-focus problem with my reflex, but they were longer focals on a bigger sensor.

BTW, i did all my best and according to the distance values sequence in the script (attached):
Zoom on wide
pic 1 is focused at 5 centimeter from the front lens
pic 2                at 10 cm
pic 3                at 15 cm
pic 4                at 20 cm
pic 5                at 25-30 cm
from pic 6 to pic 10 it maybe some increments to 40-45 cm
then no percepible focus variation until the end. The max focus distance remains 40-45 cm.

With the zoom on tele the script acts in a different way:
from pic 1 to pic 7 is less then 1 mt
from pic 8 to pic 19  focus grows from 1,5 to 3 mt (please consider that my meterstick is 1,5 mt long and camera was 1,5 mt away from it)
Then the max focus distance remains 3-4 mt
« Last Edit: 26 / June / 2014, 07:02:04 by fabri22 »

Re: Setting focus from scripts or menus
« Reply #468 on: 26 / June / 2014, 07:31:03 »
@fabri22 :  thank you for doing that.  Pretty much positive proof of your conjucture that the ixus125 will only set focus at "macro" distances as the settings do in fact change linearly over that range. 

I guess the next step is all down to me.

WW
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Setting focus from scripts or menus
« Reply #469 on: 26 / June / 2014, 15:29:30 »
I guess the next step is all down to me.

WW

Ages ago they used to say: "Ubi maior minor cessat"

 ;)

 

Related Topics


SimplePortal © 2008-2014, SimplePortal