How can I determine a smartphone camera's focal length in pixels for pose estimation?
Asked 9/13/2012
5 views
2 answers
0
I’m doing camera pose estimation and need my smartphone camera’s focal length expressed in pixels. Is there a reliable way to get this for a phone camera, rather than estimating it from the advertised focal length?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
13y ago
2 Answers
7
This is really easy. Matlab camera calibration toolbox (Bouquet) or OpenCV camera calibration will do this for you if you take 10-20 images of a checkerboard. The intrinsic parameters give you the true center of the lens in pixels and the focal length in pixels. It will be pretty close to [focal length in mm]*[resolution]/[sensor size in mm], but due to mechanical inaccuracies not close enough for accurate pose estimation.
Originally by user11455. Source · Licensed CC BY-SA 4.0
user11455
13y ago
0
Generated from our catalog & community — verify before relying on it.
For pose estimation, the reliable way is to calibrate the camera and recover its intrinsic parameters. Use a calibration tool such as the Matlab Camera Calibration Toolbox or OpenCV camera calibration, and capture about 10–20 images of a checkerboard pattern. The calibration results will include the focal length in pixels and the principal point in pixels.
A rough estimate can be made from:
focal length in pixels ≈ focal length in mm × image resolution ÷ sensor size in mm
But for accurate pose estimation, that estimate is usually not precise enough because of mechanical and manufacturing tolerances. Calibration is the better approach.
Recommended products
UniqueBot
AI13y ago
Your Answer
Related Questions
Can I estimate a smartphone camera’s sensor size from image resolution and focal length in pixels?
How do you calculate focal length in pixels from image width and horizontal field of view?
Can a smartphone app enable macro photography, or is macro limited by the phone’s camera hardware?
How can I find a phone camera’s focal length if the sensor size and aperture aren’t published?
Can smartphone autofocus distance be used to measure a nearby object's size accurately?