hugin-devs team mailing list archive
-
hugin-devs team
-
Mailing list archive
-
Message #07991
[Bug 2064625] Re: 35mm focal length on iPhone SE3 2nd generation over corrercted
Two more data points
======== IMG_9839.jpg (unzoomed)
Make : Apple
Camera Model Name : iPhone 11 Pro Max
Focal Length : 4.2 mm
Focal Length In 35mm Format : 26 mm
======== IMG_9840.jpg (zoomed)
Make : Apple
Camera Model Name : iPhone 11 Pro Max
Focal Length : 6.0 mm
Focal Length In 35mm Format : 95 mm
Digital Zoom Ratio : 1.841656516
======== image0.jpg (zoomed)
Make : Apple
Camera Model Name : iPhone 14 Pro Max
Focal Length : 9.0 mm
Focal Length In 35mm Format : 404 mm
Digital Zoom Ratio : 5.23183391
======== image1.jpg (unzoomed)
Make : Apple
Camera Model Name : iPhone 14 Pro Max
Focal Length : 6.9 mm
Focal Length In 35mm Format : 24 mm
so it looks like Apple reports the 35mm focal length equivalent with the
digital zoom already included.
i looked at the EXIF standard:
4.6.6.7.38. DigitalZoomRatio
This tag indicates the digital zoom ratio when the image was shot. If the numerator of the recorded value is
0, this indicates that digital zoom was not used.
Tag = 41988 (A404.H)
Type = RATIONAL
Count = 1
Default = None
4.6.6.7.39. FocalLengthIn35mmFilm
This tag indicates the equivalent focal length assuming a 35mm film camera, in mm. A value of 0 means the
focal length is unknown. Note that this tag differs from the FocalLength tag.
Tag = 41989 (A405.H)
Type = SHORT
Count = 1
Default = None
but it doesn't say anything about the digital zoom factor. it is true
that in Annex E. [Informative] Guidelines for Implementing Tag
Information it says:
E.2.10 FocalLengthln35mmFilm
Tag Information
This tag indicates the equivalent focal length assuming a 35mm film camera.
[Exif/DCF writer]
・Digital zoom ratio is not taken into account.
[Exif/DCF reader]
・An Exif/DCF reader can use this value along with subject distance to estimate the magnification.
but that's just a guideline not the standard.
Basically, Apple's 35mm focal length equivalent incorporates the digital
zoom factor while Google's doesn't. Which one is correct is a matter of
interpretation.
So I would suggest a check for manufacturer when applying the digital
zoom correction to the 35mm focal length equivalent and skip it if
Apple.
--
You received this bug notification because you are a member of Hugin
Developers, which is subscribed to Hugin.
https://bugs.launchpad.net/bugs/2064625
Title:
35mm focal length on iPhone SE3 2nd generation over corrercted
Status in Hugin:
Incomplete
Bug description:
This is for an iPhone SE 3rd generation. Looking at the exif data for
a zoomed picture I can see:
Lens Specification |3.990000, 3.990000, 1.8, 1.8
Lens Make |Apple
Lens Model |iPhone SE (3rd generation) back camera 3.99mm f/1.8
Digital Zoom Ratio |1.951
Focal Length in 35mm|55
For a normal picture:
Focal Length in 35mm|28
Scene Capture Type |Standard
Lens Specification |3.990000, 3.990000, 1.8, 1.8
Lens Make |Apple
Lens Model |iPhone SE (3rd generation) back camera 3.99mm f/1.8
Turns out the reported focal length for a zoomed picture is already
corrected for the digital zoom factor so
src/hugin_base/panodata/SrcPanoImage.cpp:542 over corrects by
multiplying again with the digital zoom factor ending up with an hFOV
too small. I just commented out line 542 and now when I add the zoomed
picture I get an hFOV of 34.9 (which is what I would expect) instead
of 18.3 (wrong).
--- a/src/hugin_base/panodata/SrcPanoImage.cpp Wed May 01 19:41:11 2024 +0200
+++ b/src/hugin_base/panodata/SrcPanoImage.cpp Thu May 02 15:18:02 2024 +0200
@@ -539,7 +539,7 @@
const float digitalZoom = Exiv2Helper::getExiv2ValueDouble(exifData, "Exif.Photo.DigitalZoomRatio");
if (eFocalLength35 > 0 && digitalZoom > 1)
{
- eFocalLength35 *= digitalZoom;
+ // eFocalLength35 *= digitalZoom;
};
float focalLength=0;
//The various methods to detmine crop factor
To manage notifications about this bug go to:
https://bugs.launchpad.net/hugin/+bug/2064625/+subscriptions
References