cars.applications.point_cloud_fusion.mapping_to_terrain_tiles

this module contains the epipolar cloud fusion application class.

Module Contents

Classes

MappingToTerrainTiles

EpipolarCloudFusion

Functions

compute_point_cloud_wrapper(point_clouds, epsg[, ...])

Wrapper for points clouds fusion step :

class cars.applications.point_cloud_fusion.mapping_to_terrain_tiles.MappingToTerrainTiles(conf=None)

Bases: cars.applications.point_cloud_fusion.point_cloud_fusion.PointCloudFusion

EpipolarCloudFusion

check_conf(conf)

Check configuration

Parameters

conf (dict) – configuration to check

Returns

overloaded configuration

Return type

dict

run(list_epipolar_points_cloud, bounds, epsg, source_pc_names=None, orchestrator=None, margins=0, optimal_terrain_tile_width=500, roi=None)

Run EpipolarCloudFusion application.

Creates a CarsDataset corresponding to the merged points clouds, tiled with the terrain grid used during rasterization.

Parameters
  • list_epipolar_points_cloud (list(CarsDataset) filled with xr.Dataset) –

    list with points clouds Each CarsDataset contains:

    • N x M Delayed tiles. Each tile will be a future xarray Dataset containing:

      • data : with keys : “x”, “y”, “z”, “corr_msk” optional: “color”, “msk”,

      • attrs with keys: “margins”, “epi_full_size”, “epsg”

    • attributes containing: “disp_lower_bound”, “disp_upper_bound” “elevation_delta_lower_bound”, “elevation_delta_upper_bound”

  • bounds (list) – terrain bounds

  • epsg (str) – epsg to use

  • source_pc_names (list[str]) – source pc names

  • orchestrator (Orchestrator) – orchestrator used

  • margins (float) – margins needed for tiles, meter or degree

  • optimal_terrain_tile_width (int) – optimal terrain tile width

Returns

Merged points clouds

CarsDataset contains:

  • Z x W Delayed tiles Each tile will be a future pandas DataFrame containing:

    • data : with keys : “x”, “y”, “z”, “corr_msk” optional: “clr”, “msk”, “data_valid”,”coord_epi_geom_i”, “coord_epi_geom_j”,”idx_im_epi”

    • attrs with keys: “epsg”

  • attributes containing: “bounds”, “epsg”

Return type

CarsDataset filled with pandas.DataFrame

cars.applications.point_cloud_fusion.mapping_to_terrain_tiles.compute_point_cloud_wrapper(point_clouds, epsg, xmin: float = None, ymin: float = None, xmax: float = None, ymax: float = None, margins: float = 0, save_pc_as_laz: bool = False, save_pc_as_csv: bool = False, saving_info=None, source_pc_names=None)

Wrapper for points clouds fusion step : - Convert a list of clouds to correct epsg

Parameters
  • point_clouds (list((xr.Dataset, int))) – list of clouds, list of (dataset, dataset_id) with : - cst.X - cst.Y - cst.Z - cst.EPI_COLOR

  • epsg_code (int) – epsg code for the CRS of the output DSM

  • stereo_out_epsg (int) – epsg code to convert point cloud to, if needed

  • xmin – xmin of the rasterization grid (if None, will be estimated by the function)

  • xmin – xmin of the rasterization grid (if None, will be estimated by the function)

  • xmax – xmax of the rasterization grid (if None, will be estimated by the function)

  • ymax – ymax of the rasterization grid (if None, will be estimated by the function)

  • margins (float) – margins needed for tiles, meter or degree

  • save_pc_as_laz (bool) – save point cloud as laz

  • save_pc_as_csv (bool) – save point cloud as csv

  • saving_info (dict) – informations about CarsDataset ID.

  • source_pc_names (list str) – source point cloud name (correspond to pair_key)

Returns

merged points cloud dataframe with: - cst.X - cst.Y - cst.Z - cst.EPI_COLOR - attrs : xmin, xmax, ymin, ymax, saving_info

Return type

pandas.DataFrame