pandora

This module contains functions to run Pandora pipeline.

Subpackages

Submodules

Package Contents

Functions

run(pandora_machine: state_machine.PandoraMachine, img_left: xarray.Dataset, img_right: xarray.Dataset, disp_min: Union[numpy.array, int], disp_max: Union[numpy.array, int], cfg: Dict[str, dict], disp_min_right: Union[None, numpy.array] = None, disp_max_right: Union[None, numpy.array] = None) → Tuple[xarray.Dataset, xarray.Dataset]

Run the pandora pipeline

setup_logging(verbose: bool) → None

Setup the logging configuration

import_plugin() → None

Load all the registered entry points

main(cfg_path: str, output: str, verbose: bool) → None

Check config file and run pandora framework accordingly

pandora.run(pandora_machine: state_machine.PandoraMachine, img_left: xarray.Dataset, img_right: xarray.Dataset, disp_min: Union[numpy.array, int], disp_max: Union[numpy.array, int], cfg: Dict[str, dict], disp_min_right: Union[None, numpy.array] = None, disp_max_right: Union[None, numpy.array] = None) Tuple[xarray.Dataset, xarray.Dataset][source]

Run the pandora pipeline

Parameters
  • pandora_machine (PandoraMachine) – instance of PandoraMachine

  • img_left (xarray.Dataset) –

    left Dataset image containing :

    • im : 2D (row, col) xarray.DataArray

    • msk (optional): 2D (row, col) xarray.DataArray

  • img_right (xarray.Dataset) –

    right Dataset image containing :

    • im : 2D (row, col) xarray.DataArray

    • msk (optional): 2D (row, col) xarray.DataArray

  • disp_min (int or np.array) – minimal disparity

  • disp_max (int or np.array) – maximal disparity

  • cfg (Dict[str, dict]) – pipeline configuration

  • disp_min_right (np.array or None) – minimal disparity of the right image

  • disp_max_right (np.array or None) – maximal disparity of the right image

Returns

Two xarray.Dataset :

  • leftthe left dataset, which contains the variables :
    • disparity_map : the disparity map in the geometry of the left image 2D DataArray (row, col)

    • confidence_measure : the confidence measure in the geometry of the left image 3D DataArray (row, col, indicator)

    • validity_mask : the validity mask in the geometry of the left image 2D DataArray (row, col)

  • rightthe right dataset. If there is no validation step, the right Dataset will be empty.If a validation step is configured, the dataset will contain the variables :
    • disparity_map : the disparity map in the geometry of the right image 2D DataArray (row, col)

    • confidence_measure : the confidence measure in the geometry of the left image 3D DataArray (row, col, indicator)

    • validity_mask : the validity mask in the geometry of the left image 2D DataArray (row, col)

Return type

tuple (xarray.Dataset, xarray.Dataset)

pandora.setup_logging(verbose: bool) None[source]

Setup the logging configuration

Parameters

verbose (bool) – verbose mode

Returns

None

pandora.import_plugin() None[source]

Load all the registered entry points :return: None

pandora.main(cfg_path: str, output: str, verbose: bool) None[source]

Check config file and run pandora framework accordingly

Parameters
  • cfg_path (string) – path to the json configuration file

  • output (string) – Path to output directory

  • verbose (bool) – verbose mode

Returns

None