pandora.cost_volume_confidence.interval_bounds
This module contains functions for estimating interval bounds for the disparity
Module Contents
Classes
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
- 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
- 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)