cars.applications.triangulation.triangulation

this module contains the abstract triangulation application class.

Module Contents

Classes

Triangulation

Triangulation

class cars.applications.triangulation.triangulation.Triangulation(conf=None)

Bases: cars.applications.application_template.ApplicationTemplate

Triangulation

available_applications: Dict
default_application = 'line_of_sight_intersection'
classmethod __init_subclass__(short_name, **kwargs)
abstract run(sensor_image_left, sensor_image_right, epipolar_image, grid_left, grid_right, epipolar_disparity_map, epsg, geometry_plugin, denoising_overload_fun=None, source_pc_names=None, orchestrator=None, pair_dump_dir=None, pair_key='PAIR_0', uncorrected_grid_right=None, geoid_path=None, cloud_id=None, intervals=None, depth_map_dir=None, point_cloud_dir=None, save_output_coordinates=False, save_output_color=False, save_output_classification=False, save_output_mask=False, save_output_filling=False, save_output_performance_map=False)

Run Triangulation application.

Created left and right CarsDataset filled with xarray.Dataset, corresponding to 3D point clouds, stored on epipolar geometry grid.

Parameters
  • sensor_image_left (CarsDataset) – tiled sensor left image Dict Must contain keys : “image”, “color”, “geomodel”, “no_data”, “mask”. Paths must be absolutes

  • sensor_image_right (CarsDataset) – tiled sensor right image Dict Must contain keys : “image”, “color”, “geomodel”, “no_data”, “mask”. Paths must be absolutes

  • epipolar_image (CarsDataset) – tiled epipolar left image

  • grid_left

    left epipolar grid. Grid CarsDataset contains :

    • A single tile stored in [0,0], containing a (N, M, 2) shape array in xarray Dataset

    • Attributes containing: “grid_spacing”, “grid_origin”, “epipolar_size_x”, epipolar_size_y”, “epipolar_origin_x”, “epipolar_origin_y”,”epipolar_spacing_x”, “epipolar_spacing”, “disp_to_alt_ratio”, :type grid_left: CarsDataset

  • grid_right (CarsDataset) –

    right epipolar grid. Grid CarsDataset contains :

    • A single tile stored in [0,0], containing a (N, M, 2) shape

      array in xarray Dataset

    • Attributes containing: “grid_spacing”, “grid_origin”,

      ”epipolar_size_x”, epipolar_size_y”, “epipolar_origin_x”, “epipolar_origin_y”,”epipolar_spacing_x”, “epipolar_spacing”, “disp_to_alt_ratio”,

  • epipolar_disparity_map (CarsDataset) –

    tiled left disparity map or sparse matches:

    • if CarsDataset is instance of “arrays”, CarsDataset contains:

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

        • data with keys : “disp”, “disp_msk”

        • attrs with keys: profile, window, overlaps

      • attributes containing:”largest_epipolar_region” “opt_epipolar_tile_size”

    • if CarsDataset is instance of “points”, CarsDataset contains:

      • N x M Delayed tiles Each tile will be a future pandas DataFrame containing:

        • data : (L, 4) shape matches

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

  • denoising_overload_fun (fun) – function to overload dataset

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

  • orchestrator – orchestrator used

  • pair_dump_dir (str) – folder used for current pair

  • pair_key (str) – pair key id

  • uncorrected_grid_right (CarsDataset) – not corrected right epipolar grid used if self.snap_to_img1

  • geoid_path (str) – geoid path

  • intervals (None or [str, str]) – Either None or a List of 2 intervals indicators

  • pair_output_dir (None or str) – directory to write triangulation output depth map.

  • save_output_coordinates (bool) – Save X, Y, Z coords in pair_output_dir

  • save_output_color (bool) – Save color depth map in pair_output_dir

  • save_output_classification (bool) – Save classification depth map in pair_output_dir

  • save_output_mask (bool) – Save mask depth map in pair_output_dir

  • save_output_filling (bool) – Save filling depth map in pair_output_dir

  • save_output_performance_map (bool) – Save performance map in pair_output_dir

Returns

point cloud The 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”, “z_inf”, “z_sup”

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

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

Return type

Tuple(CarsDataset, CarsDataset)