Overviews

Diagram

The following interactive diagram highlights all stereo steps available in Pandora.

../_images/white_box.png ../_images/main_diagram_step_multiscale.png ../_images/main_diagram_images_stereo.png ../_images/white_box.png ../_images/arrow.png ../_images/main_diagram_step_matching_cost.png ../_images/arrow.png ../_images/main_diagram_step_cost_aggregation.png ../_images/main_diagram_step_semantic_segmentation.png ../_images/main_diagram_step_optimization.png ../_images/white_box.png ../_images/main_diagram_step_cost_volume_confidence.png ../_images/arrow.png ../_images/main_diagram_step_disparity.png ../_images/arrow.png ../_images/main_diagram_step_refinement.png ../_images/main_diagram_step_filter.png ../_images/main_diagram_step_validation.png ../_images/arrow.png ../_images/main_diagram_output.png

Note

  • Dark red blocks represent mandatory steps.

  • Pink blocks represent optional steps.

Configuration file

The configuration file provides a list of parameters to Pandora so that the processing pipeline can run according to the parameters chosen by the user.

Pandora works with JSON formatted data with the following nested structures.

{
    "input" :
    {
        // ...
    },
    "pipeline" :
    {
        // ...
    }
}

All configuration parameters are described in Inputs and Step by step chapters. As shown on the diagram, stereo steps must respect on order of priority, and can be called multiple times as explain on Sequencing chapter.

Note

The right disparity map can be computed if the validation step is present in the configuration file. See Validation of the disparity map.

Example

  1. Install

pip install pandora[sgm]
  1. Create a configuration file

{
    "input":
    {
        "left":
        {
            "img": "tests/pandora/left.png",
            "disp": [-60, 0]
        },
        "right":
        {
            "img": "tests/pandora/right.png",
        }
    },
    "pipeline" :
    {
        "matching_cost" :
        {
          "matching_cost": "census",
          "window_size": 5,
          "subpix": 1
        },
        "optimization" :
        {
          "optimization_method": "sgm",
          "P1": 8,
          "P2": 32,
        },
        "disparity":
        {
          "disparity_method": "wta",
          "invalid_disparity": "NaN"
        },
        "refinement":
        {
          "refinement_method": "vfit"
        },
        "filter" :
        {
          "filter_method": "median",
          "filter_size": 3
        },
        "validation" :
        {
          "validation_method": "cross_checking_accurate",
          "cross_checking_threshold": 1
        },
        "filter.after.validation" :
        {
          "filter_method": "median",
          "filter_size": 3
        }
    }
}
  1. Run Pandora

pandora config.json output/