1. Reminder: Please use our affiliate links for holiday shopping!

"Distance to subject" info in EXIF files

Discussion in 'Native Lenses' started by Gwendal, Aug 31, 2010.

  1. Gwendal

    Gwendal Mu-43 Veteran

    300
    Jun 6, 2010
    Hello - recently noticed that this information was recorded when shooting with 4/3 or m4/3 lenses. Looks very helpful (at least for a beginner like me), especially when trying to understand when things are not in focus and where the AF "struck" - the problem is that in many instances, I feel the information is completely wrong - made two shots of a building on the other side of a beach with the 300mm for instance, and got 126 meters in one case (about right), 65 in the other (much too low). Does it mean those measurements are a bit random ? Or am I missing something completely ? Is there any way to correct this ?
     
  2. Muntjack

    Muntjack Mu-43 Veteran

    200
    Jul 26, 2010
    FocusDistance

    Humf.
    I can't see the Olympus:focusdistance Tag in any of my E-P2 photos using Olympus Master or ExifTool?????
    Am I blind or doing something silly? I too would think this a rather helpful measurement from time to time.
    M
     
  3. Gwendal

    Gwendal Mu-43 Veteran

    300
    Jun 6, 2010
    You are right, it doesn't appear in Master, but it does show up in Lightroom ?
     
  4. StephenL

    StephenL Mu-43 Regular

    78
    Sep 1, 2010
    I can't see anything in Lightroom. Only thing in distance-measurement terms is focal length...
     
  5. Gwendal

    Gwendal Mu-43 Veteran

    300
    Jun 6, 2010
    Weird - see below :

    [​IMG]
     
  6. StephenL

    StephenL Mu-43 Regular

    78
    Sep 1, 2010
    Ooh. Never seen that on any of mine!
     
  7. Klorenzo

    Klorenzo Mu-43 All-Pro

    Mar 10, 2014
    Lorenzo
    Very old thread but I have the answer! :)

    The Exif tag is in the "OpympusIp" section and is called 0x0638 and contains millimeters. So 280 means 0.28 meters. And 100000 means some kind of infinity focus.
     
    • Like Like x 1
  8. wjiang

    wjiang Mu-43 Hall of Famer

    Hmm, I wish the camera would display that in the LCD. Would make it useful for hyperfocal/aperture estimation.
     
  9. Ulfric M Douglas

    Ulfric M Douglas Mu-43 Hall of Famer

    Mar 6, 2010
    Northumberland
    Surely only the E-M1 could possibly show focus distance info in the EXIF as it is the only camera (barring DFD : GH4/G7) which employs phase-detect focusing, and then only for frames where that focus type was used.
    Contrast-detect focus does not use distance-to-target in order to achieve focus and my guess would be that the lenses aren't set up to give that kind of feedback reliably to the camera.
     
  10. Klorenzo

    Klorenzo Mu-43 All-Pro

    Mar 10, 2014
    Lorenzo
    I suppose the they get this information from the position of the lenses after the focus is acquired. Once I spent a little time checking this numbers (to see if I had a focus problem) and they looked reasonable (no hard measures).
     
  11. eteless

    eteless Mu-43 All-Pro

    Jun 20, 2014
    Depending on the lens and focusing mode it can be wildly wrong...

    The 35-100mm f2.0 is pretty accurate for all distances (1-40 meters), including while using a teleconverter.
    The 45mm f1.8 is somewhat inaccurate depending on distance. It's accurate up to about 25 meters after which the values are as far as I can tell are completely bogus (doesn't seem to ever decide on infinity rather just chooses a very high value such as 140-330 meters with subject distance at 25~30 meters).
    The 75-300mm value is completely useless as the distance encoder used on it doesn't have enough bit depth so it defaults to infinity very quickly.
    12-40mm f2.8 is extremely accurate at wider focal lengths, longer focal lengths appear to default to "infinity" like the 75-300 past about 15 meters.


    The numbers appear to be limited by the bit depth of the AD converter telling the camera where it's focused combined with the focal length of the lens (zooms appear worse at the long end, more accurate at short).
     
    • Like Like x 1
  12. Klorenzo

    Klorenzo Mu-43 All-Pro

    Mar 10, 2014
    Lorenzo
    With the O60, short distances, was quite accurate. With the 14-42 EZ was reasonable going to "infinity" very quickly.

    Today I used the 75-300, I took a sequence of shots slowly getting close to a hare: 18, 16, 12, 10 meters. Also was correct at minimum focus distance.
    I have three shots of a bird on a tree as: 21635, 21505, 21135, looks reasonable and with good apparent resolution. Why do you think is a "bit depth" problem?

    I think is possible that the resolution of the scale varies with the distance: you can have 11 and 12 cm but then in the distance you step from 130 to 180 meters for example.
     
  13. eteless

    eteless Mu-43 All-Pro

    Jun 20, 2014
    I agree that the resolution would changes with distance so the limiting factor is going to be the bit depth of the AD converter that detects what position the lens elements are currently in, if it only has 1024 or 4096 values to allocate to distances most of them are going to be closer distances (or if using stepper motors/voice coil/whatever, the repeatability of the lens to do X cycles time after time so it knows what position it's actually moved to (errors would build up and compound without a reset at some stage)). I've found several pictures with each of my m4/3 lenses where they've managed to hit "infinity" or give staggeringly large numbers as a result.

    The main reason I'm speculating this is because I haven't found a single shot with the 75-300 which registers more than ~25m out of 2000 shots, they're all closer or infinity. I know that this is partly shooting habit and subject selection however the 35-100mm which was made for PD-AF (and thus needs accurate position sensors) was getting accurate readings with .1m distance scale at 30-50 meters on the same subjects on the same day (windsurfers/kite boarders, I took a few thousand shots over one day so it was the best sample I could think of to look at). I'll try to do some more refined testing when the weather improves at known distances and try to figure out what it's doing or if it's just me being silly.

    I've never looked at the value before today (the picture is the picture, the distance it was taken at rarely matters) however at a first glance all my m4/3 lenses appear scarily accurate at close distances and universally less accurate at larger distances.
     
  14. Klorenzo

    Klorenzo Mu-43 All-Pro

    Mar 10, 2014
    Lorenzo
    The top value seems to be 100000, so it looks like, no matter what, values cannot go beyond 100 meters. I have one with the 14-42 EZ at 97352 and a 51490 with the 40-150 but thus is clearly off. I have a sequence of five well focused shots of the same mountain slope at: 51k, 26k, 900(!), 27k, 27k (no branches in the middle, maybe a passing butterfly? :) ). Maybe those numbers are not to be taken literally but should be mapped through some kind of function (lens dependent?).
    But in the end I agree: whatever :)
     
  15. eteless

    eteless Mu-43 All-Pro

    Jun 20, 2014
    Perhaps it shouldn't go higher, that doesn't mean it doesn't due to errors of some kind :p

    The highest reading I've seen is 327,670. I'll PM a link if you're bored and want to have a look (it's not a good picture, it's just the best example I've seen of the distance being higher than it should be).
     
  16. jyc860923

    jyc860923 Mu-43 Hall of Famer

    Feb 28, 2012
    Shenyang, China
    贾一川
    not only the E-M1, at least I found the info too back when I was using the E-PL5. CDAF doesn't detect subject distance that's true, but the focal distance info from the lens does translates to, well, usually correct subject distance. I think that value max out at 126m as I remember seeing that a lot in the shots I aimed at really distant subjects.
     
  17. Klorenzo

    Klorenzo Mu-43 All-Pro

    Mar 10, 2014
    Lorenzo
    I'll take your word for it :)

    With short lenses I get it: the DoF is so huge that contrast is probably detected at almost any distance so the AF stops quite randomly. It's with the longer lenses that it's strange.
    With a 300mm f8 the hyperfocal distance is around 700 meters, with a 150 f5.6 is near 250 meters. So values bigger than these limits are never used by AF?
    Yes, you could theoretically get better results focusing behind this distance but with a subject at 1200 meters I think is quite hard to do exact focus even manually and I do not know if the gears are precise enough to allow it.
     
  18. Ulfric M Douglas

    Ulfric M Douglas Mu-43 Hall of Famer

    Mar 6, 2010
    Northumberland
    With all this observation it'd be nice to have a table/list of which lenses (or lens-body combinations?) have fairly accurrate EXIF focus distance entries...
     
  19. Drdul

    Drdul Mu-43 Regular

    104
    May 16, 2015
    Vancouver, BC
    Richard
    This is interesting. I had no idea my E-PL5 was recording the focus distance. When I examine the .ORF file with an EXIF viewer (Softmatic EXIF for Mac), it shows a "Focus Distance" item in the "ExifAux" section, and reports it in metres (e.g. 3.17), not millimetres, but whatever, the information is there. The annoying thing is that it doesn't appear in Lightroom, and if I look at the accompanying .XMP sidecar file (to which I have Lightroom automatically save all metadata), it's not there either. Has anyone successfully figured out how to get Lightroom to extract and display the focus distance information?
     
  20. Drdul

    Drdul Mu-43 Regular

    104
    May 16, 2015
    Vancouver, BC
    Richard
    As a follow-up to my previous question, I have found out how to access focus distance information through Lightroom. Jeffrey Friedl has a couple of plugins that can access additional metadata in a RAW file that are not extracted by default by Lightroom. His Data Explorer plugin can sort images into separate collections by focus distance (select "User-Specified Master-File Data Field" and fill in "FocusDistance" with no space between the two words). His Metadata Viewer plugin shows all extra metadata in a RAW file, including "Focus Distance" (this time there's a space between the words). BTW, Jeffrey says that "Lightroom used to display this (in Lightroom 1), but I think Adobe was asked to remove it by some camera manufactures because the data is so very unreliable to the point of being almost random."