survey_points#
- rapidtools.processing.street_instances.survey_points(templates: Mapping[str, Observation], clusters: Mapping[str, tuple[str, str]], project: Callable[[float, float], tuple[float, float]], *, cache_dir: str | Path | None = None, camera_height_m: float = 2.4, max_range_m: float = 40.0, max_workers: int = 8, loader: Callable[[str, str], PointCloud | None] | None = None, counts: dict[str, int] | None = None) tuple[ndarray, dict[str, tuple[ndarray, ndarray]]][source]#
The reconstructed points around a set of frames, and the frames’ poses.
- Parameters:
templates – One sighting per image; its
computed_rotationfinds the image’s shot in its point cloud.clusters –
(cluster_id, url)of the point cloud of every image.project – Projection from longitude and latitude to local meters.
cache_dir – Folder where downloaded point clouds are cached.
camera_height_m – Camera height above the road, for heights where a cloud shows no ground.
max_range_m – Points farther than this from every frame are left out.
max_workers – Threads for point-cloud downloads.
loader –
loader(cluster_id, url)used instead of downloading.counts – Counters to add to.
- Returns:
tuple –
(n, 4)points (meters east and north, altitude, height above the ground) and, for every usable image, its world-to-camera rotation matrix and camera center.
Example
>>> points, shots = survey_points( ... templates, clusters, project) >>> points.shape[1], len(shots) (4, 884)