Manual Focus @ Infinity not working - page 14 - Hello, I'm a NEWBIE - HELP!! (Newbies assistance, User Guides and thank you notes) - CHDK Forum supplierdeeply

Manual Focus @ Infinity not working

  • 151 Replies
  • 52775 Views
Re: Manual Focus @ Infinity not working
« Reply #130 on: 28 / November / 2015, 10:22:23 »
Advertisements
if of interest here are typical results
here are 2 pics from this testing session. JPG direct from camera.
Looking at the embedded "CanonSi Makernote" information in the image shows the AF image with a subject distance of 100.  Same result as srsa_4c! The MF image shows it's subject distance as 6553.  Exactly what CHDK tries to set it to 

I assume the units here are cm,  so the good image reports being focused at about 4 ihnches and the bad image at about  215 ft!

I wonder what the image would look like if you told CHDK (via an easy change to kap_uav.lua) to set the focus at 1000 cm?  Change line 141 (script version 3.6) to infx = 1000 (instead of infx = 50000 ).  No need to actually test with a kite (unless you are looking for an excuse to go flying) - just point the camera at something distant outdoors.

I got my new test script running last night - just needed to wait for daylight today so that the camera has something in the distance that it can actually see before I test.

@srsa_4c : when you posted "my sx280 reaches infinity at around 1000 mm" did you determine that by trial & error using CHDK SD override (script or menu), or is that what the CHDK OSD reports when the built-in AF is allowed to focus at a distant object with the lens at full wide angle, or did you just pull that from the EXIF data of a good image? ?

« Last Edit: 28 / November / 2015, 10:55:34 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 4451
Re: Manual Focus @ Infinity not working
« Reply #131 on: 28 / November / 2015, 10:49:03 »
@srsa_4c : when you posted "my sx280 reaches infinity at around 1000 mm" did you determine that by trial & error using CHDK SD override (script or menu), or is that what the CHDK OSD reports when the built-in AF is allowed to focus at a distant object with the lens at full wide angle, or did you just pull that from the EXIF data of a good image?
I was using the DOF OSD while making shots with decreasing (native) MF distance and finished with an AF shot. The JPEG EXIF does have an entry that is set to about the same values I remember, exiftool calls it "Focus Distance Upper". It seems to max out at 65.53m ...

Re: Manual Focus @ Infinity not working
« Reply #132 on: 28 / November / 2015, 11:12:04 »
I was using the DOF OSD while making shots with decreasing (native) MF distance and finished with an AF shot. The JPEG EXIF does have an entry that is set to about the same values I remember, exiftool calls it "Focus Distance Upper". It seems to max out at 65.53m ...
Thanks for that.   It gets me thinking that,  for a given focal length (i.e. zoom position),  it should be possible to either set a mechanical position (via call_event_proc("MoveFocusLensWithPosition", position)   or  just use set_focus(distance).  You just need to work out what position or distance value to use for each zoom setting on your individual camera.    We were close to get there at this point in Setting focus from scripts or menus but I think we were thrown off track at the time by just how small the distance value needed to be.

Edit :
So this (painfully) gets us with a better scenario for script writers.  If you want to provide a "focus at infinity" function, you need allow the user to set the actual distance value to use and we need something to explain how best to determine that value for your particular camera, and that each value is only good for one zoom position.  Obviously a more complicated script could use a Lua table of zoom_step vs distance values and somethink like the test script I'm playing with to create that table and store it in a file on the SD card.
« Last Edit: 28 / November / 2015, 11:16:42 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Manual Focus @ Infinity not working
« Reply #133 on: 29 / November / 2015, 12:33:24 »
Quote
So this (painfully) gets us with a better scenario for script writers.  If you want to provide a "focus at infinity" function, you need allow the user to set the actual distance value to use and we need something to explain how best to determine that value for your particular camera, and that each value is only good for one zoom position.
If I may comment here, I confirm that the pb gets even more complex because of zoom changes. as far as i remember, the  correct value was not the same for all focal distances. and I would not like to be too negative, but my feeling is that these errors are somewhere "random". In the same kap session, i had good pictures but also lot of out of focus. never succeeded in showing a proper relation. I've spent hours, trying different values for MF, being correct when testing at home, and getting poor results "on the field". Actually I've tried to use the "mecha_value" in script to monitor proper MF at infinity. all tests have led me to....return to AF mode !

However if we could find a solution ...
I will test tomorrow the kap_uav script with distance at 1m and CHDK (currently using SDM  :-[)


*

Offline c_joerg

  • *****
  • 1248
Re: Manual Focus @ Infinity not working
« Reply #134 on: 30 / November / 2015, 03:44:32 »
Does somebody really knows, how the way goes in the cam from set_focus to get_focus?

I notice on my S110, when I set_focus, especially with higher values, that the values from get_focus changing after a while (running get_focus in an endless loop) without touching or moving the camera. From me it looks like that the way back is an analog way and this can’t be very accurate.
M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

Re: Manual Focus @ Infinity not working
« Reply #135 on: 30 / November / 2015, 07:13:19 »
I've tested kap_uav script this morning with 2 cameras.
1. one with bad MF but where infinity seems to be far away from 1 meter. and the resuts are as anticipated. with script set à 1000 for infinity the results are not acceptable.
2. the other focussing at 1-2 meters for infinity gave acceptable sharpness results with 1000. at least at wide angle position. when zooming pics were blurred.
I hope this could help ?

Re: Manual Focus @ Infinity not working
« Reply #136 on: 30 / November / 2015, 10:33:08 »

Quote from: Michel2e link=topic=12062.msg125764#msg125764 date=1448885599,
1. one with bad MF but where infinity seems to be far away from 1 meter. and the resuts are as anticipated. with script set à 1000 for infinity the results are not acceptable.
Does it focus in AF mode?  If so, can you tell from the CHDK OSD display of SD what distance it is using when it does that?

Quote
2. the other focussing at 1-2 meters for infinity gave acceptable sharpness results with 1000. at least at wide angle position. when zooming pics were blurred.
As previously discussed, you will need a different focus setting for each zoom position.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Manual Focus @ Infinity not working
« Reply #137 on: 30 / November / 2015, 11:34:24 »
Quote
Does it focus in AF mode?  If so, can you tell from the CHDK OSD display of SD what distance it is using when it does that?
No I made tests to check wether MF was working correctly. unfortunately night came, so will check in AF tomorrow


Re: Manual Focus @ Infinity not working
« Reply #138 on: 01 / December / 2015, 04:12:51 »
I can now confirm using AF mode,
the camera with "longer infinity" displays infinity when focussing correctly at infinity,
the other "odd" camera is focussing properly, displaying 1.2 m when correctly focussed at infinity, and displaying 0.3 m when focussing at approx 0.3 m ;-)
M.

Re: Manual Focus @ Infinity not working
« Reply #139 on: 01 / December / 2015, 08:26:54 »
I can now confirm using AF mode, the camera with "longer infinity" displays infinity when focussing correctly at infinity, the other "odd" camera is focussing properly, displaying 1.2 m when correctly focussed at infinity, and displaying 0.3 m when focussing at approx 0.3 m ;-)
Assuming the lens is set to maximum wide angle, does this mean you can "trick" those cameras into focussing at infinity using the set_focus function and either a big number ( 60000 ) for the first camera or 1200 for the second camera? 
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics