ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: Tom OReilly on August 27, 2020, 09:11:12 PM

Title: Composite FOV interpretation
Post by: Tom OReilly on August 27, 2020, 09:11:12 PM
Exiftool documentation (https://exiftool.org/TagNames/Composite.html) says Composite FOV is "calculated for the long image dimension". I assume this means it's calculated for either the ImageHeight or ImageWidth, whichever is greater. But I see a post in photo.stackexchange that says (https://photo.stackexchange.com/questions/99537/why-is-the-field-of-view-angle-from-exiftool-different-from-apples-official-val) "the values calculated by exiftool refer to diagonal angle of view". I guess "long image dimension" could be interpreted to mean the diagonal - but is that really the case?
Thanks!
Title: Re: Composite FOV interpretation
Post by: StarGeek on August 28, 2020, 11:29:16 AM
That StackExchange post gives a link to the actual source code on the tag. Part of the comments there link to this article (http://www.bobatkins.com/photography/technical/field_of_view.html).  Further searching shows that it's based upon the ScaleFactor35efl tag, which is created from multiple sources in the CalcScaleFactor35efl (https://sourceforge.net/p/exiftool/code/ci/master/tree/lib/Image/ExifTool/Exif.pm#l4849) subroutine.  I didn't work out too much of the details there, but it does seem to indicate that it's based upon the diagonal.

Phil is currently on vacation until early September, so he can give more details when he gets back.
Title: Re: Composite FOV interpretation
Post by: StarGeek on August 28, 2020, 11:32:39 AM
Heh, did all that typing when I should have just checked to see if the question came up previously.

FocalLengthIn35mmFilm tag definition (https://exiftool.org/forum/index.php?topic=8347.msg42865#msg42865)
Title: Re: Composite FOV interpretation
Post by: Tom OReilly on August 28, 2020, 12:01:16 PM
Ah, nice catch @StarGeek! If so, I suggest the FOV documentation be changed from "calculated for the long image dimension" to "calculated for the image diagonal".
Title: Re: Composite FOV interpretation
Post by: Tom OReilly on August 28, 2020, 12:14:24 PM
Also, the documentation says that Composite FOV is computed from FocalLength, ScaleFactor35efl, and FocusDistance; exiftool shows FOV, FocalLength, and ScaleFactor35efl  for my Sony RX1R - but does *not* show FocusDistance. It does show MakerNotes FocusLocation - is exiftool using that to compute FOV? I'm very much a perl newbie - where can I find the exiftool code that computes FOV for my Sony RX1R?
Title: Re: Composite FOV interpretation
Post by: StarGeek on August 28, 2020, 01:22:22 PM
The code is at Line 4397 (https://sourceforge.net/p/exiftool/code/ci/master/tree/lib/Image/ExifTool/Exif.pm#l4397).  It requires FocalLength and ScaleFactor35efl and if FocusDistance is available, it will also be used.

ScaleFactor35efl is derived from a large number of sources (https://sourceforge.net/p/exiftool/code/ci/master/tree/lib/Image/ExifTool/Exif.pm#l4301) (16 possible tags), depending upon what's available.

In all cases for these tags, except for Composite:DigitalZoom, they are not looking for tags from an exact location. If a tag has a the same name in, for example, a MakerNotes group and the EXIF group, the value could be pulled from either, depending upon the order they appear in the file.