<p>The post reads cropped but then talks about squeezed, so I gave a little extra info to help clarify.</p>
<p>One possibility is that the final image is cropped, ie some texel data is being removed completely from the image such as the top and/or bottom rows of texels.</p>
<p>In this case the image is considered just like it is worded &quot;cropped&quot;.</p>
<p>Another possibility is the image is being rescaled, meaning that the entire image is kept but an algorithm is being used to compute new texels to fit the final image size and keep as much of the original image as possible.</p>
<p>Normally rescaling is done in a way that keeps the original aspect ratio, but when that isn't possible then the texels are effectively stretched or squeezed. Which is the second option listed in the question.</p>
<p>Edit:
One possibility here is to modify the frustum to fit the entire image then rescale the image to fit the frustum. Is this possible here? (I'm guessing not but thought I would mention it)</p>
<p>Yet another approach is to introduce black(or some other color) bars on the top/bottom/left/right of the image and fit the frustum to capture the entire image. The image itself would be nearly exactly what is needed but the end result would have the dead space. Just like how a widescreen movie is fit to a 4x3 television.</p>
<p>If cropping is the only viable option then usually the bottom of the image is cropped, but this is getting into the realm of opinion and may be something you want to go back to the client to get clarification on. (and is also wandering out of my knowledge area since I am used to having that handy gpu available to manipulate the image to my every whim)</p>

CC BY-SA 4.0
2021-10-13T16:51:33.307Z
Hi, thanks for your response. I have added some diagrams in my edit that might help express my issue. The problem is that I am starting with a 640x360 image that was gotten from some sensor. I've been told the sensor dimensions are 6.058mm X 4.415mm (why this aspect ratio does not equal 640/360 is a different question...). I got a focal length for the 640x360 image, but my client wants me to report the 35 mm equivalent.
Evan
CC BY-SA 4.0
2021-10-14T12:25:59.070Z
I added more info to my post, not sure how useful it is though.
pmw1234
CC BY-SA 4.0
2021-10-15T20:31:15.293Z
Thanks for your reply. See my final edit. I think I've converged on the misunderstanding.
Evan
CC BY-SA 4.0
2021-10-13T12:11:23.107Z
2021-10-14T12:25:32.380Z
2021-10-14T12:25:32.380Z
pmw1234
<p>I am doing some image processing and am a little bit confused about reporting a 35 mm equivalent focal length. I am working with a 640x360 image which has an aspect ratio of 1.7777. A 35 mm film is 36 mm x 24 mm, for an aspect ratio of 1.5. We have the formulae <span class="math-container">$F_X = f_x \frac{W}{w}$</span> and <span class="math-container">$F_y = f_y \frac{H}{h}$</span>. I currently have the values <span class="math-container">$f_x = f_y =$</span> 370 px calibrated for the 640x360 image. If I use <span class="math-container">$W = $</span> 36 mm, <span class="math-container">$w = $</span> 640 px, <span class="math-container">$H = $</span> 24 mm, and <span class="math-container">$h = $</span> 360 px, then the scale factors <span class="math-container">$\frac{W}{w}$</span> and <span class="math-container">$\frac{H}{h}$</span> disagree due to the disparity in aspect ratio, and <span class="math-container">$F_x \neq F_y$</span>, when I expect them to be equal.</p>
<p>Is the idea to consider my 640x360 px image as a cropped 640x426.666 px image? Or is it to consider my current 640x360 as a vertically squeezed image with non-square pixels?</p>
<p>EDIT:</p>
<p>I have added the following diagram to help articulate my confusion:
<a href="https://i.sstatic.net/FM7D2.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/FM7D2.png" alt="enter image description here" /></a></p>
<p>I have added the viewing frustum for the 640x360 image. The aspect ratio of this image determines the frustum. I have two ways I can fit a 35 mm film into this frustum. I can find where it fits horizontally, where the 36 mm piece sits in the frustum, but then the film hangs below the frustum. I can also slide the film until it fits vertically, where the 24 mm piece fits, but then the 36 mm side can't reach the other side of the frustum. In both of these options, the focal length is different. Which one is more proper to report?</p>
<p>My intuition tells me that the first option is more correct, where the 35 mm film is fit horizontally. Then the 640x360 image is considered as a cropped 35 mm film image. But then there is another ambiguity. Do we center the film so that there is equal overhang on the top and bottom? That is, should the film be centered along the principal point? See the blue piece of film here:</p>
<p><a href="https://i.sstatic.net/p1jkE.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/p1jkE.png" alt="enter image description here" /></a></p>
<p>FINAL EDIT:</p>
<p>My conclusion is that there really is no concept of a 35 mm film equivalent when the aspect ratio doesn't match 36/24 = 1.5. Take, for example, this image taken with extremely high aspect ratio film:</p>
<p><a href="https://i.sstatic.net/ZRg26.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ZRg26.png" alt="enter image description here" /></a></p>
<p>We can consider a 35 mm equivalent with a common principal point either like such:</p>
<p><a href="https://i.sstatic.net/ipgoE.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ipgoE.png" alt="enter image description here" /></a></p>
<p>or like such:</p>
<p><a href="https://i.sstatic.net/hc1f9.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/hc1f9.png" alt="enter image description here" /></a></p>
<p>The comparison shows that there is no analogue:</p>
<p><a href="https://i.sstatic.net/5Ygrb.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/5Ygrb.png" alt="enter image description here" /></a></p>
<p>Depending on which way you decide to frame the 35 mm film, you conclude either that the focal length is really really large or very small.</p>

<image-processing><image>
35 mm equivalent focal length but with a different aspect ratio
Evan
# 35 mm equivalent focal length but with a different aspect ratio

(Asked by: username_0 on 2021-10-12)

I am doing some image processing and am a little bit confused about reporting a 35 mm equivalent focal length. I am working with a 640x360 image which has an aspect ratio of 1.7777. A 35 mm film is 36 mm x 24 mm, for an aspect ratio of 1.5. We have the formulae $F\_X = f\_x \frac{W}{w}$ and $F\_y = f\_y \frac{H}{h}$. I currently have the values $f\_x = f\_y =$ 370 px calibrated for the 640x360 image. If I use $W = $ 36 mm, $w = $ 640 px, $H = $ 24 mm, and $h = $ 360 px, then the scale factors $\frac{W}{w}$ and $\frac{H}{h}$ disagree due to the disparity in aspect ratio, and $F\_x \neq F\_y$, when I expect them to be equal.

Is the idea to consider my 640x360 px image as a cropped 640x426.666 px image? Or is it to consider my current 640x360 as a vertically squeezed image with non-square pixels?

EDIT:

I have added the following diagram to help articulate my confusion:
[![enter image description here](https://i.sstatic.net/FM7D2.png)](https://i.sstatic.net/FM7D2.png)

I have added the viewing frustum for the 640x360 image. The aspect ratio of this image determines the frustum. I have two ways I can fit a 35 mm film into this frustum. I can find where it fits horizontally, where the 36 mm piece sits in the frustum, but then the film hangs below the frustum. I can also slide the film until it fits vertically, where the 24 mm piece fits, but then the 36 mm side can't reach the other side of the frustum. In both of these options, the focal length is different. Which one is more proper to report?

My intuition tells me that the first option is more correct, where the 35 mm film is fit horizontally. Then the 640x360 image is considered as a cropped 35 mm film image. But then there is another ambiguity. Do we center the film so that there is equal overhang on the top and bottom? That is, should the film be centered along the principal point? See the blue piece of film here:

[![enter image description here](https://i.sstatic.net/p1jkE.png)](https://i.sstatic.net/p1jkE.png)

FINAL EDIT:

My conclusion is that there really is no concept of a 35 mm film equivalent when the aspect ratio doesn't match 36/24 = 1.5. Take, for example, this image taken with extremely high aspect ratio film:

[![enter image description here](https://i.sstatic.net/ZRg26.png)](https://i.sstatic.net/ZRg26.png)

We can consider a 35 mm equivalent with a common principal point either like such:

[![enter image description here](https://i.sstatic.net/ipgoE.png)](https://i.sstatic.net/ipgoE.png)

or like such:

[![enter image description here](https://i.sstatic.net/hc1f9.png)](https://i.sstatic.net/hc1f9.png)

The comparison shows that there is no analogue:

[![enter image description here](https://i.sstatic.net/5Ygrb.png)](https://i.sstatic.net/5Ygrb.png)

Depending on which way you decide to frame the 35 mm film, you conclude either that the focal length is really really large or very small.

**Tags:** image-processing, image


---

## 1 answers

### Answer by username_1 on 2021-10-13. Score: 0 | Accepted answer

The post reads cropped but then talks about squeezed, so I gave a little extra info to help clarify.

One possibility is that the final image is cropped, ie some texel data is being removed completely from the image such as the top and/or bottom rows of texels.

In this case the image is considered just like it is worded "cropped".

Another possibility is the image is being rescaled, meaning that the entire image is kept but an algorithm is being used to compute new texels to fit the final image size and keep as much of the original image as possible.

Normally rescaling is done in a way that keeps the original aspect ratio, but when that isn't possible then the texels are effectively stretched or squeezed. Which is the second option listed in the question.

Edit:
One possibility here is to modify the frustum to fit the entire image then rescale the image to fit the frustum. Is this possible here? (I'm guessing not but thought I would mention it)

Yet another approach is to introduce black(or some other color) bars on the top/bottom/left/right of the image and fit the frustum to capture the entire image. The image itself would be nearly exactly what is needed but the end result would have the dead space. Just like how a widescreen movie is fit to a 4x3 television.

If cropping is the only viable option then usually the bottom of the image is cropped, but this is getting into the realm of opinion and may be something you want to go back to the client to get clarification on. (and is also wandering out of my knowledge area since I am used to having that handy gpu available to manipulate the image to my every whim)

> **Comments:**
> **username_0**: Hi, thanks for your response. I have added some diagrams in my edit that might help express my issue. The problem is that I am starting with a 640x360 image that was gotten from some sensor. I've been told the sensor dimensions are 6.058mm X 4.415mm (why this aspect ratio does not equal 640/360 is a different question...). I got a focal length for the 640x360 image, but my client wants me to report the 35 mm equivalent.  
> **username_1**: I added more info to my post, not sure how useful it is though.  
> **username_0**: Thanks for your reply. See my final edit. I think I've converged on the misunderstanding.  

---

