File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -236,8 +236,9 @@ def focal_length_meters(self) -> float:
236236
237237 def focal_length_pixels (self , use_calibrated_focal_length : bool = False ) -> float :
238238 """Get the focal length (in pixels) of the sensor that took the image."""
239- def get_focal_length ():
240- """Helper to get focal length and its unit."""
239+
240+ def _get_focal_length () -> tuple [float , bool ]:
241+ """Get either the calibrated focal length or the exif focal length."""
241242 if use_calibrated_focal_length :
242243 try :
243244 return self .calibrated_focal_length ()
@@ -247,7 +248,7 @@ def get_focal_length():
247248 )
248249 return self .focal_length_meters (), False
249250
250- fl , is_in_pixels = get_focal_length ()
251+ fl , is_in_pixels = _get_focal_length ()
251252 if not is_in_pixels :
252253 pp = self .pixel_pitch_meters ()
253254 return fl / pp
You can’t perform that action at this time.
0 commit comments