Forgot Password
Pentax Camera Forums Home
 

Reply
Show Printable Version Search this Thread
04-29-2016, 12:37 AM   #1
Forum Member




Join Date: Apr 2014
Posts: 56
Focal Lengths and EXIF

In answer to a question asked in another thread...

The EXIF standard includes a tag for focal length. This tag is used by Pentax bodies to store the focal length as it is mentioned on the lens.

In the Pentax Makernotes, there is a tag that stores (almost) the same value. This other tag is named LensFocalLength by ExifTool, and may be different from the other one by a fraction of integer. For example, the smc PENTAX-DA 21mm F3.2 AL Limited stores 21.25 in LensFocalLength but 21 in FocalLength.

In the Pentax Makernotes, there is another tag that has a different meaning. This tag is named SRFocalLength by ExifTool and stores the focal length used for Shake Reduction. For example, the smc PENTAX-DA* 60-250mm F4 [IF] SDM being an internal focus length, its focal length reduces when at short focus distances. At 250mm and minimal focus disance (1.1m), the SR focal length is 148mm.

Phil Harvey (the author of ExifTool) has done a very good work in analysing the Pentax Makernotes, but currently ExifTool does not know where this SRFocalLength is stored by the K-3 and similar cameras.

04-29-2016, 01:39 AM   #2
Administrator
Site Webmaster
Adam's Avatar

Join Date: Sep 2006
Location: Arizona
Photos: Gallery | Albums
Posts: 51,608
Great info! I'm sure the ExifTool will eventually be updated to support that tag. Phil pushes out updates pretty often.

Adam
PentaxForums.com Webmaster (Site Usage Guide | Site Help | My Photography)



PentaxForums.com server and development costs are user-supported. You can help cover these costs by donating or purchasing one of our Pentax eBooks. Or, buy your photo gear from our affiliates, Adorama, B&H Photo, KEH, or Topaz Labs, and get FREE Marketplace access - click here to see how! Trusted Pentax retailers:
04-29-2016, 09:17 AM   #3
Otis Memorial Pentaxian
stevebrot's Avatar

Join Date: Mar 2007
Location: Vancouver (USA)
Photos: Gallery | Albums
Posts: 42,007
Thanks for the note. I think I probably made the suggestion for a new thread. There are a number of forum users who dip into the EXIF at times and any wisdom regarding the evolution of the Pentax makernotes and their interpretation is much appreciated. Phil Harvey and his helpers are heroes IMHO, though there is often some misunderstanding as to how ExifTool handles the makernotes section.

As an "aside", the tag names used by ExifTool for these data are semi-arbitrary and represent the software authors' best guess/assumptions as to function, data type, and acceptable values. The values are simply parsed out by position in the file and interpreted to suit. When the values are no longer consistent with the previous thinking or when behavior branches with a new camera model, the authors issue a revision to ExifTool. Changes to to SR-related tags for the K-3 is probably a good example. As noted Ptitboul above, there is no SRFocalLength tag for the K-3 at the location where that value is stored on other models. Whether the data are missing or inconsistent is not clear, though the developer may have left notes somewhere in the code or bug-tracking system explaining the action. For all we know, the values written to multiple locations may represent be stuff used for debug or other forensic/calibration purposes and not representative of camera working state.


Steve

Last edited by stevebrot; 04-29-2016 at 10:01 AM.
04-29-2016, 10:20 AM   #4
Veteran Member




Join Date: Jan 2010
Location: Michigan
Photos: Gallery
Posts: 2,207
It is avaliable on the K-01:

$ exiftool *0.DNG |grep Focal
Focal Length : 28.0 mm
Focal Length In 35mm Format : 42 mm
SR Focal Length : 28 mm
Focal Length : 28.0 mm (35 mm equivalent: 42.0 mm)


Edit: the version here:
exiftool -ver
10.00

04-29-2016, 10:45 AM   #5
Otis Memorial Pentaxian
stevebrot's Avatar

Join Date: Mar 2007
Location: Vancouver (USA)
Photos: Gallery | Albums
Posts: 42,007
QuoteOriginally posted by Ptitboul Quote
In the Pentax Makernotes, there is a tag that stores (almost) the same value. This other tag is named LensFocalLength by ExifTool, and may be different from the other one by a fraction of integer. For example, the smc PENTAX-DA 21mm F3.2 AL Limited stores 21.25 in LensFocalLength but 21 in FocalLength.
This puzzles me. EXIF:FocalLength is type rational64, but Pentax:LensData:LensFocalLength is 8-bit integer. ExifTool's friendly output uses decimal notation through (nn.n mm) for both tag values. I am wondering if there is a bug in parsing.


Steve
04-29-2016, 10:49 AM   #6
Otis Memorial Pentaxian
stevebrot's Avatar

Join Date: Mar 2007
Location: Vancouver (USA)
Photos: Gallery | Albums
Posts: 42,007
QuoteOriginally posted by wombat2go Quote
It is avaliable on the K-01:
And most other bodies. The branch is at the K-3 model to Pentax:SRInfo2 rather than Pentax:SRInfo. Also lost was Pentax:SRInfo:SRHalfPressTime


Steve
04-29-2016, 10:51 AM   #7
Forum Member




Join Date: Apr 2014
Posts: 56
Original Poster
QuoteOriginally posted by Adam Quote
Great info! I'm sure the ExifTool will eventually be updated to support that tag. Phil pushes out updates pretty often.
A few months ago I had a discussion with Phil Harvey on that topic, because ExifTool did not find SRFocalLength for my K-S1.
Phil told me that apparently no one has been specifically looking for SRFocalLength. And I have not found the time to look for it.

Therefore, any help is welcome.

PS: It seems that the bodies that have no known SRFocalLength are all the bodies with AA filter simulation.

---------- Post added 04-29-16 at 07:55 PM ----------

QuoteOriginally posted by stevebrot Quote
Pentax:LensData:LensFocalLength is 8-bit integer.
Yes, and with a very tricky encoding. 6 bits are used to encode an integer value, and the two other bits are used to encode an exponent.
The complete formula is '10*($val>>2) * 4**(($val&0x03)-2)' which apparenly was reverse engineered by an ExifTool contributor named Jens Duttke.
By studying various lenses, you may also notice that every zoom takes exactly 16 different values of LensFocalLength.


Last edited by Ptitboul; 04-29-2016 at 11:04 AM.
04-29-2016, 12:58 PM   #8
Otis Memorial Pentaxian
stevebrot's Avatar

Join Date: Mar 2007
Location: Vancouver (USA)
Photos: Gallery | Albums
Posts: 42,007
QuoteOriginally posted by Ptitboul Quote
Yes, and with a very tricky encoding. 6 bits are used to encode an integer value, and the two other bits are used to encode an exponent.
The complete formula is '10*($val>>2) * 4**(($val&0x03)-2)' which apparenly was reverse engineered by an ExifTool contributor named Jens Duttke.
By studying various lenses, you may also notice that every zoom takes exactly 16 different values of LensFocalLength.
VERY tricky encoding, indeed! I saw the note on the ExifTool Pentax Tags page and wondered what it meant. The part about the 16 discrete values is strange. I just took a look at the values from one of my lenses and sure enough, the value (expressed to three decimal places) stayed constant through several small zoom adjustments. It makes one wonder if the decimal portion of the value represents value or metadata.

BTW...I think I know who I will ping next time I have a EXIF question.


Steve
Reply

Bookmarks
  • Submit Thread to Facebook Facebook
  • Submit Thread to Twitter Twitter
  • Submit Thread to Digg Digg
Tags - Make this thread easier to find by adding keywords to it!
bits, bodies, camera, dslr, encode, example, exif, exiftool, focal, focus, length, pentax, phil, photography, smc, sr, stores, tag

Similar Threads
Thread Thread Starter Forum Replies Last Post
Identifying most frequently used focal lengths realitarian General Photography 10 07-13-2015 07:55 AM
EXIF data excludes range of focal lengths Schmidt Pentax SLR Lens Discussion 7 08-23-2013 01:04 PM
Focal lengths and large format - Noob Questions David-C Pentax Medium Format 11 01-04-2012 07:10 PM
DA* and focal lengths emr Pentax SLR Lens Discussion 11 10-06-2009 11:51 AM



All times are GMT -7. The time now is 08:49 AM. | See also: NikonForums.com, CanonForums.com part of our network of photo forums!
  • Red (Default)
  • Green
  • Gray
  • Dark
  • Dark Yellow
  • Dark Blue
  • Old Red
  • Old Green
  • Old Gray
  • Dial-Up Style
Hello! It's great to see you back on the forum! Have you considered joining the community?
register
Creating a FREE ACCOUNT takes under a minute, removes ads, and lets you post! [Dismiss]
Top