pandora.cost_volume_confidence.cost_volume_confidence

This module contains classes and functions to estimate confidence.

Classes

AbstractCostVolumeConfidence

Abstract Cost Volume Confidence class

Module Contents

class pandora.cost_volume_confidence.cost_volume_confidence.AbstractCostVolumeConfidence[source]

Abstract Cost Volume Confidence class

__metaclass__[source]
confidence_methods_avail[source]
cfg = None[source]
_indicator = ''[source]
classmethod register_subclass(short_name: str)[source]

Allows to register the subclass with its short name

Parameters:

short_name (string) – the subclass to be registered

abstract desc()[source]

Describes the confidence method

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

Computes a confidence prediction.

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

  • img_left – left Dataset image

  • img_right (xarray.Dataset) – right Dataset image

  • cv (xarray.Dataset) – cost volume dataset

Tye img_left:

xarray.Dataset

Returns:

None

static normalize_with_extremum(confidence: numpy.ndarray, dataset: xarray.Dataset, nbr_etas: int, subpix: int = 1) numpy.ndarray[source]

Normalize ambiguity with extremum

Parameters:
  • confidence (2D np.ndarray (row, col) dtype = float32) – confidence

  • dataset – Dataset image

  • nbr_etas (int) – size of etas

  • subpix (int) – subpix used in matching cost

Tye dataset:

xarray.Dataset

Returns:

the normalized confidence

Return type:

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

static allocate_confidence_map(name_confidence_measure: str, confidence_map: numpy.ndarray, disp: xarray.Dataset, cv: xarray.Dataset) Tuple[xarray.Dataset, xarray.Dataset][source]

Create or update the confidence measure : confidence_measure (xarray.DataArray of the cost volume and the disparity map) by adding an indicator

Parameters:
  • name_confidence_measure (string) – the name of the new confidence indicator

  • confidence_map (2D np.ndarray (row, col) dtype=np.float32) – the confidence map

  • disp (xarray.Dataset or None) – the disparity map dataset or None

  • cv (xarray.Dataset) – cost volume dataset

Returns:

the disparity map and the cost volume with updated confidence measure

Return type:

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