cars.pipelines.parameters.sensor_inputs
CARS containing inputs checking for sensor input data Used for full_res and low_res pipelines
Module Contents
Functions
|
Check the inputs given |
|
Check sensors |
|
Check the geometry plugin with inputs |
|
Generate geometry plugin with dem and geoid |
|
Modify input file path to absolute path |
|
Check srtm data |
|
Check data of the image and color |
|
Return initial elevation parameters (dem and geoid paths) |
|
Check image, mask, classif and color given |
|
Check the bits number of the mask, classif |
|
Compare the data type between a pair of images |
|
Check if all the nbits = 1 |
|
Generate sensors inputs form inputs conf : |
Attributes
- 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