Configuration

This section describes CARS main configuration structure through a json configuration file.

The structure follows this organization:

{
    "inputs": {},
    "orchestrator": {},
    "applications": {},
    "output": {},
    "geometry_plugin": "geometry_plugin_to_use",
    "advanced": {}
}

Warning

Be careful with commas to separate each section. None needed for the last json element.

CARS can be entered either with Sensor Images or with Depth Maps.

Additional inputs can be provided for both types of inputs, namely a ROI and an initial elevation.

Name

Description

Type

Default value

Required

sensors

Stereo sensor images

See next section

No

Yes

pairing

Association of image to create pairs

list of sensors

No

Yes (*)

(*) pairing is required if there are more than two sensors (see pairing section below)

Sensor

For each sensor image, give a particular name (what you want):

{
    "inputs": {
        "sensors": {
            "my_name_for_this_image": {
                "image" : "path_to_image.tif",
                "color" : "path_to_color.tif",
                "mask" : "path_to_mask.tif",
                "classification" : "path_to_classification.tif",
                "nodata": 0
            }
        }
    }
}

Name

Description

Type

Default value

Required

image

Path to the image

string

Yes

color

Path to the color image

string

No

no_data

No data value of the image

int

0

No

geomodel

Path to the geomodel and plugin-specific attributes

string, dict

No

mask

Path to the binary mask

string

None

No

classification

Path to the multiband binary classification image

string

None

No

Note

  • color: This image can be composed of XS bands in which case a PAN+XS fusion has been be performed. Please, see the section Make a simple pan sharpening to make a simple pan sharpening with OTB if necessary.

  • mask: This image is a binary file. By using this file, the 1 values are not processed, only 0 values are considered as valid data.

  • classification: This image is a multiband binary file. Each band should have a specific name (Please, see the section Add band name / description in TIF files metadata to add band name / description in order to be used in Applications). By using this file, a different process for each band is applied for the 1 values (Please, see the Applications section for details).

  • Please, see the section Convert image to binary image to make binary mask image or binary classification image with 1 bit per band.

  • geomodel: If the geomodel file is not provided, CARS will try to use the RPC loaded with rasterio opening image.

Pairing

The pairing attribute defines the pairs to use, using sensors keys used to define sensor images.

{
    "inputs": {
        "sensors" : {
            "one": {
                "image": "img1.tif",
                "geomodel": "img1.geom"
            },
            "two": {
                "image": "img2.tif",
                "geomodel": "img2.geom"

            },
            "three": {
                "image": "img3.tif",
                "geomodel": "img3.geom"
            }
        },
        "pairing": [["one", "two"],["one", "three"]]
    }
}

This attribute is required when there are more than two input sensor images. If only two images ares provided, the pairing can be deduced by cars, considering the first image defined as the left image and second image as right image.