pandora.filter.median_for_intervals

This module contains functions associated to the median filter used to filter the disparity map.

Module Contents

Classes

MedianForIntervalsFilter

MedianForIntervalsFilter class allows to perform the filtering step on intervals

class pandora.filter.median_for_intervals.MedianForIntervalsFilter(*args, cfg: Dict, step: int = 1, **kwargs)[source]

Bases: pandora.filter.filter.AbstractFilter

MedianForIntervalsFilter class allows to perform the filtering step on intervals

property margins[source]
_FILTER_SIZE = 3[source]
_AMBIGUITY_THRESHOLD = 0.6[source]
_AMBIGUITY_KERNEL_SIZE = 5[source]
_VERTICAL_DEPTH = 0[source]
_QUANTILE_REGULARIZATION = 1.0[source]
check_conf(cfg: Dict) Dict[source]

Add default values to the dictionary if there are missing elements and check if the dictionary is correct

Parameters:

cfg (dict) – filter configuration

Return cfg:

filter configuration updated

Return type:

dict

desc()[source]

Describes the filtering method

filter_disparity(disp: xarray.Dataset, img_left: xarray.Dataset = None, img_right: xarray.Dataset = None, cv: xarray.Dataset = None) None[source]

Apply a median filter on interval bounds for valid pixels. Invalid pixels are not filtered. If a valid pixel contains an invalid pixel in its filter, the invalid pixel is ignored for the calculation of the median.

Parameters:
  • disp (xarray.Dataset) –

    the disparity map dataset with the variables :

    • disparity_map 2D xarray.DataArray (row, col)

    • confidence_measure 3D xarray.DataArray (row, col, indicator)

    • validity_mask 2D xarray.DataArray (row, col)

  • img_left (xarray.Dataset) – left Dataset image

  • img_right (xarray.Dataset) – right Dataset image

  • cv (xarray.Dataset) – cost volume dataset

Returns:

None