cars.pipelines.parameters.sensor_inputs

CARS containing inputs checking for sensor input data Used for full_res and low_res pipelines

Module Contents

Functions

sensors_check_inputs(conf[, config_json_dir])

Check the inputs given

check_sensors(conf, overloaded_conf[, config_json_dir])

Check sensors

check_geometry_plugin(conf_inputs, conf_geom_plugin)

Check the geometry plugin with inputs

generate_geometry_plugin_with_dem(conf_geom_plugin, ...)

Generate geometry plugin with dem and geoid

modify_to_absolute_path(config_json_dir, overloaded_conf)

Modify input file path to absolute path

check_srtm(srtm_dir)

Check srtm data

check_input_data(image, color)

Check data of the image and color

get_initial_elevation(config)

Return initial elevation parameters (dem and geoid paths)

check_input_size(image, mask, color, classif)

Check image, mask, classif and color given

check_nbits(mask, classif)

Check the bits number of the mask, classif

compare_image_type(imgs, image_type, key1, key2)

Compare the data type between a pair of images

check_all_nbits_equal_one(nbits)

Check if all the nbits = 1

generate_inputs(conf, geometry_plugin)

Generate sensors inputs form inputs conf :

Attributes

CARS_GEOID_PATH

cars.pipelines.parameters.sensor_inputs.CARS_GEOID_PATH = 'geoid/egm96.grd'
cars.pipelines.parameters.sensor_inputs.sensors_check_inputs(conf, config_json_dir=None)[source]

Check the inputs given

Parameters
  • conf (dict) – configuration of inputs

  • config_json_dir (str) – path to dir containing json

cars.pipelines.parameters.sensor_inputs.check_sensors(conf, overloaded_conf, config_json_dir=None)[source]

Check sensors

cars.pipelines.parameters.sensor_inputs.check_geometry_plugin(conf_inputs, conf_geom_plugin)[source]

Check the geometry plugin with inputs

Parameters
  • conf_inputs (type) – checked configuration of inputs

  • conf_advanced (type) – checked configuration of advanced

  • conf_geom_plugin (str) – name of geometry plugin

Returns

overload inputs conf overloaded geometry plugin conf geometry plugin without dem geometry plugin with dem

cars.pipelines.parameters.sensor_inputs.generate_geometry_plugin_with_dem(conf_geom_plugin, conf_inputs, dem=None, crop_dem=True)[source]

Generate geometry plugin with dem and geoid

Parameters
  • conf_geom_plugin – plugin configuration

  • conf_inputs – inputs configuration

  • dem – dem to overide the one in inputs

Returns

geometry plugin object, with a dem

cars.pipelines.parameters.sensor_inputs.modify_to_absolute_path(config_json_dir, overloaded_conf)[source]

Modify input file path to absolute path

Parameters
  • config_json_dir (str) – directory of the json configuration

  • overloaded_conf – overloaded configuration json

Dict overloaded_conf

dict

cars.pipelines.parameters.sensor_inputs.check_srtm(srtm_dir)[source]

Check srtm data

Parameters

srtm_dir (str) – directory of srtm

cars.pipelines.parameters.sensor_inputs.check_input_data(image, color)[source]

Check data of the image and color

Parameters
  • image (str) – image path

  • color (str) – color path

cars.pipelines.parameters.sensor_inputs.get_initial_elevation(config)[source]

Return initial elevation parameters (dem and geoid paths) from input configuration.

Parameters

config (str, dict or None) – input initial elevation

cars.pipelines.parameters.sensor_inputs.check_input_size(image, mask, color, classif)[source]

Check image, mask, classif and color given

Images must have same size

Parameters
  • image (str) – image path

  • mask (str) – mask path

  • color (str) – color path

  • classif (str) – classif path

cars.pipelines.parameters.sensor_inputs.check_nbits(mask, classif)[source]

Check the bits number of the mask, classif mask and classification are limited to 1 bits per band

Parameters
  • mask (str) – mask path

  • classif (str) – classif path

cars.pipelines.parameters.sensor_inputs.compare_image_type(imgs, image_type, key1, key2)[source]

Compare the data type between a pair of images

Parameters
  • imgs (str) – list of image paths

  • key1 (str) – key of the images pair

  • image_type (int) – type of cardataset image (IMG, MASK, CLASSIF…)

  • key1 – other key of the images pair

cars.pipelines.parameters.sensor_inputs.check_all_nbits_equal_one(nbits)[source]

Check if all the nbits = 1 :param nbits: list of the nbits :return: True if all the nbits = 1

cars.pipelines.parameters.sensor_inputs.generate_inputs(conf, geometry_plugin)[source]

Generate sensors inputs form inputs conf :

a list of (sensor_left, sensor_right)

Parameters

conf (dict) – input conf

Returns

list of sensors pairs

Return type

list(tuple(dict, dict))