Conversation
paulinus
left a comment
There was a problem hiding this comment.
The PR seem to have mixed the actual change with other unrelated commits.
| image_ratio = float(max(width, height)) / min(width, height) | ||
| is_32 = math.fabs(image_ratio - 3.0 / 2.0) | ||
| is_43 = math.fabs(image_ratio - 4.0 / 3.0) | ||
| if is_32 < is_43: |
There was a problem hiding this comment.
The wikipedia article mentions a definition that works for any aspect ratio in the "Calculation" section
"Converted focal length into 35 mm camera" = (Diagonal distance of image area in the 35 mm camera (43.27 mm) / Diagonal distance of image area on the image sensor of the DSC) × focal length of the lens of the DSC.
Should we use that instead so that we support any aspect ratio rather than picking between these two?
I guess the question is which definition do camera manufacturers use to fill the EXIF tag.
There was a problem hiding this comment.
Yes, but in the end, everywhere else in the code, we use a ratio of focal / width (and not focal / diagonal), so we'll have to specify this width anyway.
7ac8902 to
2f540d6
Compare
|
Just rebased on master. |
2f540d6 to
2e0acd4
Compare
This PR fixes the 35mm focal <-> ratio focal conversion :
Branch is on top of optim-large