Focus function for EOS M3 / M10 - page 2 - General Help and Assistance on using CHDK stable releases - CHDK Forum supplierdeeply

Focus function for EOS M3 / M10

  • 72 Replies
  • 27823 Views
*

Offline Ant

  • *****
  • 509
Re: Focus function for EOS M3 / M10
« Reply #10 on: 15 / April / 2019, 15:26:25 »
Advertisements
@srsa_4c
for EOS M10 110d pointer to SubjectDistanceFar can be found at 0xFC2D9D22
« Last Edit: 15 / April / 2019, 15:54:18 by Ant »

Re: Focus function for EOS M3 / M10
« Reply #11 on: 15 / April / 2019, 15:35:16 »
@Ant

There is a difference between the far DoF reporting and the focus limit.

The focus is ‘limited’ to 65535. But the far DoF is not limited, just reported.

Unless I’ve misunderstood you.

*

Offline Ant

  • *****
  • 509
Re: Focus function for EOS M3 / M10
« Reply #12 on: 15 / April / 2019, 15:43:43 »
I am not talking about DoF

I mean Subject Distance.
Unfortunately in EOS M3 firmware event procedures GetFocusLensSubjectDistance and GetFocusLensSubjectDistanceFromLens always return 0.
« Last Edit: 15 / April / 2019, 15:52:38 by Ant »

Re: Focus function for EOS M3 / M10
« Reply #13 on: 15 / April / 2019, 16:52:04 »
The focus is ‘limited’ to 65535.
While the CHDK wiki documentation says there is a 65.535 metre limit, I don't believe that is in fact true. It's probably time to update that really old section of the scripting function descriptions.  Somebody was probably incorrectly assuming the use of 16 bit integer math.
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline reyalp

  • ******
  • 14111
Re: Focus function for EOS M3 / M10
« Reply #14 on: 15 / April / 2019, 17:06:50 »
Somebody was probably incorrectly assuming the use of 16 bit integer math.
In fact, it was a 16 bit number for vxworks and early dryos cameras, there's an ifdef for it in camera.h.
« Last Edit: 16 / April / 2019, 22:57:55 by reyalp »
Don't forget what the H stands for.

*

Offline c_joerg

  • *****
  • 1250
Re: Focus function for EOS M3 / M10
« Reply #15 on: 16 / April / 2019, 02:14:36 »
The focus is ‘limited’ to 65535. But the far DoF is not limited, just reported.
 
While the CHDK wiki documentation says there is a 65.535 metre limit, I don't believe that is in fact true.

Metre limit?
My SX50 delivers values > 350000mm

Then I can produce slightly modified function EFLensCom.DistanceInfo which will return the arithmetic mean value between near and far subject distance.

Maybe @pigeonhill will correct me now…

I don’t think that the arithmetic mean value between near and far subject distance is a good estimate for the focus distance. The values themselves are already a great help. Maybe the values can flow directly into get_dofinfo.

Code: [Select]
dof = get_dofinfo()
dof.near
dof.far


The EXIFtool uses the arithmetic mean value between near and far subject distance for distance. As you can see in the EXIF Data, the DOF calculator calculates then different value for near and far
Presumably, there is a formula that can be used to calculate the distance better.

Code: [Select]
Lens Model                      : EF24mm f/2.8 IS USM
Focus Distance Lower     : 2.1 m
Focus Distance Upper      : 3.67 m
Depth Of Field                  : 2.97 m (2.03 - 5.00 m)

The variable at 0x00244916(0x00244918) is updated regularly only with my Canon lenses.
You can check its behaviour with your lenses.

These addresses are only for M3 101a?
How do I have access to it? Just a ram dump in chdkptp?


I played something with MoveFocus.
Code: [Select]
lua call_event_proc("EFLensCom.MoveFocus",2500,10)
On small steps, the Focus Distance in the EXIF did not change. But that could also be due to the accuracy of EXIF data.

I find it interesting that I can move the focus with in manual lens setting. This has the advantage that the focus peaking works.

I would be interested to know where a tool, for example, helicon focus remote gets the distances.
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: Focus function for EOS M3 / M10
« Reply #16 on: 16 / April / 2019, 14:05:18 »
Quote
I don’t think that the arithmetic mean value between near and far subject distance


I must say I am confused when reading the posts, eg references to near and far subject distances.


As far as I’m concerned, if I know focus, everything follows by calculation  ;)

*

Offline c_joerg

  • *****
  • 1250
Re: Focus function for EOS M3 / M10
« Reply #17 on: 16 / April / 2019, 14:21:45 »
if I know focus, everything follows by calculation  ;)
Yes of course ...
But it looks like focus distance is not available on EOS M Cams.
Also, in the EXIF stands only near and far and not the focus. Same on my 6D
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


*

Offline Ant

  • *****
  • 509
Re: Focus function for EOS M3 / M10
« Reply #18 on: 16 / April / 2019, 17:21:21 »
These addresses are only for M3 101a?
How do I have access to it? Just a ram dump in chdkptp?

These addresses valid only for M3 101a.
For 120F it should be 0x0024495A/0x0024495C.
You can use peek(0x00244916, 2) command to get this values.
Also this variable can be displayed using Memory browser or Misc debug values
« Last Edit: 16 / April / 2019, 17:22:57 by Ant »

Re: Focus function for EOS M3 / M10
« Reply #19 on: 16 / April / 2019, 17:24:05 »
@c_joerg

I know we are talking apples and pears, but Canon reports focus distance as upper and lower in maker's EXIF.

I can read this in LR from the CR2 using http://regex.info/blog/lightroom-goodies/metadata-viewer

Or in ExifToolGui outside of LR.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal