Set focus question - page 2 - General Help and Assistance on using CHDK stable releases - CHDK Forum supplierdeeply

Set focus question

  • 29 Replies
  • 4278 Views
Re: Set focus question
« Reply #10 on: 04 / August / 2020, 08:31:55 »
Advertisements
I've spent a few hours today trying to experimentally work out what CHDK does with focus, eg DoF reporting etc.

My conclusion is that CHDK does what it wants and randomly!

I've experimented with the G7X and G5X and played around with setting the DoF flags, ie 'Canon Subj Dist as Near' and 'Use EXIF Subj Dist, (PC65).  BTW none of these appear to have any real meaning: at least to me.

I started with the G7X and used auto focus to lock focus, on a focus target, and then switch to MF to see the CHDK DoF reporting. BTW I simply can't get CHDK to display the DoF reporting in AF mode, ie only in MF mode. : but that may be me ;-)

The distances reported are way out, eg focused at around 350, CHDK DoF reports some 500+ mm. Clearly way out. Plus it does this repeatedly.

The G5X was not that much better.

Bottom line: CHDK focusing and reporting remains a mystery (at least to this user) and it seems our 'CHDK corporate memory' doesn't help our understanding: unless a CHDK guru can write the definitive piece on CHDK focus.

Bottom-bottom line: I would love to see us resolve the mysteries of CHDK focus, ie reporting and moving.

Re: Set focus question
« Reply #11 on: 04 / August / 2020, 11:11:03 »

*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: Set focus question
« Reply #12 on: 04 / August / 2020, 13:13:32 »
 :blink: :-[ 
Code: [Select]
D:\hostluaPortable\CHDK-Shell\trunk\trunk-5535\platform\g5x\platform_camera.h (2 hits)
Line 176:     #undef  CAMERA_MAX_DIST
Line 177:     #define CAMERA_MAX_DIST                     16990       // Override max subject distance; manually checked up to 1550388, with MF max 1369863 (double step)
  D:\hostluaPortable\CHDK-Shell\trunk\trunk-5535\platform\g7x\platform_camera.h (2 hits)
Line 170:     #undef  CAMERA_MAX_DIST
Line 171:     #define CAMERA_MAX_DIST                     177552     // Override max subject distance, max get_focus() value at max zoom using MF before it goes to -1

All lifetime is a loan from eternity.

*

Offline reyalp

  • ******
  • 14079
Re: Set focus question
« Reply #13 on: 04 / August / 2020, 15:15:19 »
Bottom line: CHDK focusing and reporting remains a mystery (at least to this user) and it seems our 'CHDK corporate memory' doesn't help our understanding: unless a CHDK guru can write the definitive piece on CHDK focus.
You seem to expect that there is a "CHDK guru" somewhere who knows exactly what it does. There is not.

Outside Canon, there is no specification for the underlying firmware behavior, only more or less educated guesses and observations. The only way we could write a definitive description would be to do rigorous experiments, and the applicability to other cameras would still not be well specified.

It has been observed many times that the subject distance values are not particularly well calibrated to real world values. The details of how they relate are not well defined.
Quote
I started with the G7X and used auto focus to lock focus, on a focus target, and then switch to MF to see the CHDK DoF reporting. BTW I simply can't get CHDK to display the DoF reporting in AF mode, ie only in MF mode. : but that may be me ;-)
FWIW if you set the DoF display to "in misc" and set "misc values" to show always, it should display all the time. The "Separate" setting displays on half press or MF. (The + variants have some color coding)
Don't forget what the H stands for.


Re: Set focus question
« Reply #14 on: 04 / August / 2020, 15:46:56 »
@reyalp

Quote
You seem to expect that there is a "CHDK guru" somewhere who knows exactly what it does. There is not.

Sorry if I gave that impression. Definitely not expecting, ‘just’ hoping ;-)

I’ve given up trying to implement a spilt thin lens model into CHDK, other than in the M3, as it’s simply not worth it. The thin lens model works ok, as long as you don’t get too close to macro.

I also had a model to incorporate pupillary magnification into the spilt thin lens model, but once again, for landscape, ie non macro, photography it’s not worth it.

Thanks for educating me on the DoF display: my ignorance.

Cheers

Garry

*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: Set focus question
« Reply #15 on: 04 / August / 2020, 15:57:44 »
Is there a need or 'easy' way  :( for finding out optimized CAMERA_MAX_DIST ?
All lifetime is a loan from eternity.

Re: Set focus question
« Reply #16 on: 05 / August / 2020, 05:02:27 »
@reyalp or anyone who can help.

For my own education I'm trying to dive deeper into the CHDK c code.

I'm starting in a place I know: shooting.c.

In this piece of code we see 'lens_get_focus_pos_from_lens'.

The question is: where do I look to find out how lens_get_focus_pos_from_lens is calculated. It doesn't appear to be defined in shooting.c.

Any help welcome.

*

Offline c_joerg

  • *****
  • 1248
Re: Set focus question
« Reply #17 on: 05 / August / 2020, 07:30:34 »
I would search global over all sources...
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: Set focus question
« Reply #18 on: 05 / August / 2020, 08:26:44 »
@c_joerg

If only I knew how  ;)

*

Offline c_joerg

  • *****
  • 1248
Re: Set focus question
« Reply #19 on: 05 / August / 2020, 08:58:58 »
If only I knew how 
Download the complete CHDK trunk including sources as ZIP file.
https://app.assembla.com/spaces/chdk/subversion/source/HEAD/trunk
Then look for a search and replace tool like here
 http://www.funduc.com/search_replace.htm
« Last Edit: 05 / August / 2020, 09:07:45 by c_joerg »
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

 

Related Topics