read_drone_images

read_drone_images#

rapidtools.data_sources.read_drone_images(source: str | Path | Iterable[str | Path], sidecar: str | Path | None = None, altitude_source: str = 'auto', takeoff_elevation_m: float = 0.0, default_hfov_deg: float = 73.7, yaw_offset_deg: float = 0.0, recursive: bool = True) → list[DroneCamera][source]#

Read the camera poses of a set of drone photos.

Parameters:
  • source – A folder of photos, one photo, or an iterable of photo paths.

  • sidecar – Optional pose table (see read_pose_table()) used instead of the embedded metadata; image names in it are relative to source when that is a folder.

  • altitude_source – See read_drone_image().

  • takeoff_elevation_m – See read_drone_image().

  • default_hfov_deg – Field of view for photos without lens data.

  • yaw_offset_deg – Added to every recorded yaw.

  • recursive – Search sub-folders of source. Defaults to True.

Returns:

list[DroneCamera] – Cameras sorted by image name. Photos without a usable pose are skipped with a warning.

Example

>>> cameras = read_drone_images('flight_01/')
>>> len(cameras), cameras[0].image_id
(412, 'DJI_0001')