cars.applications.dense_matching.disparity_grid_algo

this module contains the wrapper used in disparity grid computation.

Functions

generate_disp_grids_dataset(grid_min, grid_max, ...[, ...])

Generate disparity grids xarray dataset

generate_disp_range_const_tile_wrapper(row_range, ...)

Generate disparity range dataset from constant dmin and dmax

generate_disp_range_from_dem_wrapper(...[, ...])

Generate disparity range dataset from dems

empty_disparity_grids(row_range_no_margin, ...)

Return empty disparity grids

create_circular_mask(height, width)

Create a circular mask for footprint around pixel

Module Contents

cars.applications.dense_matching.disparity_grid_algo.generate_disp_grids_dataset(grid_min, grid_max, saving_info, raster_profile, window=None, row_coords=None, col_coords=None)[source]

Generate disparity grids xarray dataset

Parameters:
  • grid_min (np.ndarray) – disp grid min

  • grid_max (np.ndarray) – disp grid max

  • saving_info (dict) – saving infos

  • raster_profile (dict) – raster_profile

  • row_coords (np.ndarray, optional) – row cooordinates

  • col_coords (np.ndarray, optional) – col coordinates

Returns:

disp range dataset

Return type:

xarray.Dataset

cars.applications.dense_matching.disparity_grid_algo.generate_disp_range_const_tile_wrapper(row_range, col_range, dmin, dmax, raster_profile, saving_info, saving_info_global_infos)[source]

Generate disparity range dataset from constant dmin and dmax

Parameters:
  • row_range (list) – Row range

  • col_range (list) – Column range.

  • dmin (float) – disparity minimum.

  • dmax (float) – disparity maximum.

  • raster_profile (dict) – The raster profile.

  • saving_info (dict) – The disp range grid saving information.

  • saving_info_global_infos (dict) – Global info saving infos.

Returns:

Disparity range grid

Return type:

dict

cars.applications.dense_matching.disparity_grid_algo.generate_disp_range_from_dem_wrapper(epipolar_grid_array_window, full_epi_row_range, full_epi_col_range, sensor_image_right, grid_right, geom_plugin_with_dem_and_geoid, dem_min, dem_max, raster_profile, saving_info, saving_info_global_infos, filter_overlap, disp_to_alt_ratio, disp_min_threshold=None, disp_max_threshold=None)[source]

Generate disparity range dataset from dems

Parameters:
  • epipolar_grid_array_window (dict) – The window of the epipolar grid array.

  • full_epi_row_range (list) – The full range of rows in the epipolar grid.

  • full_epi_col_range (list) – The full range of columns in the epipolar grid.

  • sensor_image_right (dict) – The right sensor image.

  • grid_right (dict) – The right epipolar grid.

  • geom_plugin_with_dem_and_geoid (object) – The geometry plugin with DEM.

  • dem_min (str) – Path of dem min.

  • dem_max (srt) – Path of dem max.

  • raster_profile (dict) – The raster profile.

  • saving_info (dict) – The disp range grid saving information.

  • saving_info_global_infos (dict) – Global info saving infos.

  • filter_overlap (int) – The overlap to use for filtering.

  • disp_to_alt_ratio (float) – disparity to altitude ratio

  • disp_min_threshold (float, optional) – The minimum disparity threshold.

  • disp_max_threshold (float, optional) – The maximum disparity threshold.

Returns:

Disparity range grid

Return type:

dict

cars.applications.dense_matching.disparity_grid_algo.empty_disparity_grids(row_range_no_margin, col_range_no_margin, epipolar_grid_array_window, raster_profile, saving_info, saving_info_global_infos)[source]

Return empty disparity grids :param row_range_no_margin: Rows id in grid :type row_range_no_margin: int :param col_range_no_margin: Cols id in grid :type col_range_no_margin: int :param epipolar_grid_array_window: ROI of grid :type epipolar_grid_array_window: dict :param raster_profile: The raster profile. :type raster_profile: dict :param saving_info: The disp range grid saving information. :type saving_info: dict :param saving_info_global_infos: Global info saving infos. :type saving_info_global_infos: dict

cars.applications.dense_matching.disparity_grid_algo.create_circular_mask(height, width)[source]

Create a circular mask for footprint around pixel

Parameters:
  • height (int) – height of footprint

  • width (int) – width of footprint

Returns:

mask representing circular footprint

Return type:

np.ndarray