cars.applications.dense_matches_filling.plane

this module contains the fill_disp application class.

Module Contents

Classes

PlaneFill

Fill invalid area in disparity map using plane method

Functions

fill_disparity_plane_wrapper(corresponding_tiles, ...)

Wrapper to Fill disparity map holes

wrapper_copy_disparity(disp, window, overlap[, ...])

Wrapper to copy previous disparity with additional filling band with zeros

class cars.applications.dense_matches_filling.plane.PlaneFill(conf=None)

Bases: cars.applications.dense_matches_filling.dense_matches_filling.DenseMatchesFilling

Fill invalid area in disparity map using plane method

check_conf(conf)

Check configuration

Parameters

conf (dict) – configuration to check

Returns

overloaded configuration

Return type

dict

get_poly_margin()

Get the margin used for polygon

Returns

self.nb_pix

Return type

int

run(epipolar_disparity_map, holes_bbox_left=None, holes_bbox_right=None, disp_min=0, disp_max=0, orchestrator=None, pair_folder=None, pair_key='PAIR_0')

Run Refill application using plane method.

Parameters
  • epipolar_disparity_map (CarsDataset) – left to right disparity

  • holes_bbox_left (CarsDataset) – left holes

  • holes_bbox_right (CarsDataset) – right holes

  • disp_min (int) – minimum disparity

  • disp_max (int) – maximum disparity

  • orchestrator – orchestrator used

  • pair_folder (str) – folder used for current pair

  • pair_key (str) – pair id

Returns

filled disparity map: Each 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”,

    ”epipolar_regions_grid”

Return type

CarsDataset

cars.applications.dense_matches_filling.plane.fill_disparity_plane_wrapper(corresponding_tiles, corresponding_poly, window, overlap, classification, ignore_nodata_at_disp_mask_borders=True, ignore_zero_fill_disp_mask_values=True, ignore_extrema_disp_values=True, nb_pix=20, percent_to_erode=0.3, interp_options=None, saving_info=None)

Wrapper to Fill disparity map holes

Parameters
  • corresponding_tiles (list(tuple(list, list, xr.Dataset))) – disparity map tiles

  • corresponding_poly (list(Polygon)) – holes polygons

  • window (list) – window of base tile [row min, row max, col min col max]

  • overlap (list) – overlap [row min, row max, col min col max]

  • left_epi_image (xr.Dataset) – left epipolar image

  • classification (list(str)) – list of tag to use

  • ignore_nodata_at_disp_mask_borders (bool) – ingore nodata

  • ignore_zero_fill_disp_mask_values (bool) – ingnore zero fill

  • ignore_extrema_disp_values (bool) – ignore extrema

  • nb_pix (int) – margin to use

  • percent_to_erode (float) – percent to erode

  • interp_options (dict) – interp_options

  • saving_info (dict) – saving infos

Returns

disp map

Return type

xr.Dataset

cars.applications.dense_matches_filling.plane.wrapper_copy_disparity(disp, window, overlap, saving_info=None)

Wrapper to copy previous disparity with additional filling band with zeros

Parameters
  • disp (xr.Dataset) – disparity map

  • window (list) – window of base tile [row min, row max, col min col max]

  • overlap (list) – overlap [row min, row max, col min col max]

  • saving_info (dict) – saving infos

Returns

disp map

Return type

xr.Dataset