question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How was focal length calculated for the iPhone 12 in the example?

See original GitHub issue

In the example in data/iphone.py the focal length is computed as self.focal = self.raw_W * 4.2 / (12.8 / 2.55). I am wondering what the specific constants mean?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
chenhsuanlincommented, Jun 8, 2022

Hi @reynoldscem @jere357, sorry for the late reply. 1/2.55 was the sensor size I got from here. An easier way might be to use the 26mm FF-equivalent focal length (see here), and then get 3024 (#pixels in width) / 24mm * 26mm = 3276, which would get you similar answers as in the code. I’m not entirely sure these are the right way to get the intrinsics (not an expert), but from my experience, the focal length usually doesn’t need to be super accurate to get NeRF/BARF working.

1reaction
reynoldscemcommented, Jun 9, 2022

Thank you for the reply @chenhsuanlin

Read more comments on GitHub >

github_iconTop Results From Across the Web

iPhone 12 Pro Minimum Focus Distance? - Apple Community
With the iPhone 12 Pro camera in normal ("PHOTO") mode at 1x the minimum focus distance is approximately 8 cm / 3.15 in....
Read more >
Understanding Focal Length On Smartphone Cameras
Quite frankly, 4.25mm means nothing in true photography terms. The focal length is calculated according to the equivalent of a 35mm full-frame sensor....
Read more >
What is the focal length of an iPhone Camera and Why Should ...
The wide-angle lens on an iPhone Xs or Xs Max has a focal length of 4.25 mm, which is equivalent to 26 mm...
Read more >
Apple iPhone 12 Camera review: Pro-level video, amateur zoom
The 2x optical "zoom" probably refers to the two lens - 26 mm and 13 mm focal lengths (in 35 mm equivalents). Normally...
Read more >
iPhone 12 Pro Max: a photographer review
On the one hand, therefore, we have the iPhone 12 which has only two focal lengths, the ultra wide angle (13 mm) and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found