cars.applications.dense_matching.regularisation

Matching regularisation module: contains matching outputs regularisation functions

Module Contents

Functions

update_disp_to_0(disp, ref_ds, sec_ds[, ...])

Inplace function

update_disp_ds_from_msk(disp, mask)

Update a disparity dataset to set the indicated pixels to the mask to 0.

cars.applications.dense_matching.regularisation.update_disp_to_0(disp, ref_ds, sec_ds, mask_ref_set_to_ref_alt: List[int] = None, mask_sec_set_to_ref_alt: List[int] = None)

Inplace function Updates the disparity maps in order to set the indicated pixels to 0. The updated pixels belong to the classes specified by the mask_classes.set_to_ref_alt_tag of the mask classes json files.

Parameters
  • disp – disparity dictionary with the reference disparity map (cst.STEREO_REF key) and eventually the secondary disparity map (cst.STEREO_SEC key)

  • ref_ds – reference image dataset containing and eventual multi-classes mask (cst.EPI_MSK key)

  • sec_ds – secondary image dataset containing and eventual multi-classes mask (cst.EPI_MSK key)

  • mask_ref_set_to_ref_alt – list of values to use in ref mask

  • mask_sec_set_to_ref_alt – list of values to use in sec mask

cars.applications.dense_matching.regularisation.update_disp_ds_from_msk(disp, mask)

Update a disparity dataset to set the indicated pixels to the mask to 0. The corresponding pixels are passed to valid ones in the disparity mask.

A cst.DISP_MSK_SET_TO_INPUT_DEM mask is also added to the dataset with the mask used here.

Parameters
  • disp – disparity dataset to update

  • mask – mask identifying the pixels for which the disparity has to be set to 0