pandora.cost_volume_confidence.interval_bounds

This module contains functions for estimating interval bounds for the disparity

Module Contents

Classes

IntervalBounds

IntervalBounds class allows to estimate a confidence interval from the cost volume

class pandora.cost_volume_confidence.interval_bounds.IntervalBounds(**cfg: str)[source]

Bases: pandora.cost_volume_confidence.cost_volume_confidence.AbstractCostVolumeConfidence

IntervalBounds class allows to estimate a confidence interval from the cost volume

_POSSIBILITY_THRESHOLD = 0.9[source]
_AMBIGUITY_THRESHOLD = 0.6[source]
_AMBIGUITY_KERNEL_SIZE = 5[source]
_VERTICAL_DEPTH = 0[source]
_QUANTILE_REGULARIZATION = 1.0[source]
_method = 'interval_bounds'[source]
_indicator = ''[source]
check_conf(**cfg: str | float | int | bool) Dict[str, str | float | int | bool][source]

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

Parameters:

cfg (dict) – interval_bounds configuration

Return cfg:

interval_bounds configuration updated

Return type:

dict

desc() None[source]

Describes the confidence method :return: None

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

Computes a confidence measure that evaluates the minimum and maximim disparity at each point with a confidence of possibility_threshold %

Parameters:
  • disp (xarray.Dataset) – the disparity map dataset

  • img_left – left Dataset image

  • img_right (xarray.Dataset) – right Dataset image

  • cv (xarray.Dataset) – cost volume dataset

Tye img_left:

xarray.Dataset

Returns:

the disparity map and the cost volume with new indicators ‘interval_bounds.inf’ and ‘interval_bounds.sup’ in the DataArray confidence_measure

Return type:

Tuple(xarray.Dataset, xarray.Dataset) with the data variables: - confidence_measure 3D xarray.DataArray (row, col, indicator)

static compute_interval_bounds(cv: numpy.ndarray, disp_interval: numpy.ndarray, possibility_threshold: float, type_factor: float) Tuple[numpy.ndarray, numpy.ndarray][source]

Computes interval bounds on the disparity.

Parameters:
  • cv (3D np.ndarray (row, col, disp)) – cost volume

  • disp_interval (1D np.ndarray (disp,)) – disparity data

  • possibility_threshold (float) – possibility threshold used for interval computation

  • type_factor (float) – Either 1 or -1. Used to adapt the possibility computation to max or min measures

Returns:

the infimum and supremum (not regularized) of the set containing the true disparity

Return type:

Tuple(2D np.array (row, col) dtype = float32, 2D np.array (row, col) dtype = float32)