cars.applications.point_cloud_fusion.mapping_to_terrain_tiles
this module contains the epipolar cloud fusion application class.
Module Contents
Classes
EpipolarCloudFusion |
Functions
|
Wrapper for points clouds fusion step : |
|
Wrapper of simple_rasterization |
- 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
- pre_run(bounds, optimal_terrain_tile_width)
Pre run some computations
- Returns
bounds, terrain_grid
- run(list_epipolar_points_cloud_left, list_epipolar_points_cloud_right, bounds, epsg, orchestrator=None, margins=None, on_ground_margin=0, optimal_terrain_tile_width=500)
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_left (list(CarsDataset) filled with xr.Dataset) –
list with left 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 contraining: “disp_lower_bound”, “disp_upper_bound” “elevation_delta_lower_bound”,”elevation_delta_upper_bound”
list_epipolar_points_cloud_right (list(CarsDataset) filled with xr.Dataset) –
list with right 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 contraining: “disp_lower_bound”, “disp_upper_bound”, “elevation_delta_lower_bound”,”elevation_delta_upper_bound”
bounds (list) – terrain bounds
epsg (str) – epsg to use
orchestrator (Orchestrator) – orchestrator used
margins (dict ex: {"radius": 1, "resolution": 0.5}) – margins to add to tiles
on_ground_margin (float) – margins needed for future filtering
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 contraining: “bounds”, “ysize”, “xsize”, “epsg”
- Return type
CarsDataset filled with pandas.DataFrame
- cars.applications.point_cloud_fusion.mapping_to_terrain_tiles.compute_point_cloud_wrapper(point_clouds_left, point_clouds_right, resolution, epsg, **kwargs)
Wrapper for points clouds fusion step : - Convert a list of clouds to correct epsg
- Parameters
point_clouds_left (list(xr.Dataset)) –
list of clouds, list of datasets with :
cst.X
cst.Y
cst.Z
cst.EPI_COLOR
point_clouds_right (list of DataObject) –
list of cloud, list of datasets (list of None if use_sec_disp not activated) with :
cst.X
cst.Y
cst.Z
cst.EPI_COLOR
resolution (float) – Produced DSM resolution (meter, degree [EPSG dependent])
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
- Returns
merged points cloud dataframe with: - cst.X - cst.Y - cst.Z - cst.EPI_COLOR - attrs : xstart, ystart, xsize, ysize, saving_info
- Return type
pandas.DataFrame
- cars.applications.point_cloud_fusion.mapping_to_terrain_tiles.simple_merged_point_cloud_dataset(cloud_list: List[xarray.Dataset], resolution: float, epsg: int, xstart: float = None, ystart: float = None, xsize: int = None, ysize: int = None, radius: int = 1, on_ground_margin=0) pandas.DataFrame
Wrapper of simple_rasterization that has xarray.Dataset as inputs and outputs.
- Parameters
cloud_list – list of cloud points to rasterize
resolution – Resolution of rasterized cells, expressed in cloud CRS units or None
epsg – epsg code for the CRS of the final raster
xstart – xstart of the rasterization grid (if None, will be estimated by the function)
ystart – ystart of the rasterization grid (if None, will be estimated by the function)
xsize – xsize of the rasterization grid (if None, will be estimated by the function)
ysize – ysize of the rasterization grid (if None, will be estimated by the function)
radius (int) – rasterization radius
on_ground_margin (int) – point cloud filtering margin
- Returns
cloud and Color