diff --git a/cars/core/geometry/abstract_geometry.py b/cars/core/geometry/abstract_geometry.py index adeb9133..e909ec2b 100644 --- a/cars/core/geometry/abstract_geometry.py +++ b/cars/core/geometry/abstract_geometry.py @@ -29,6 +29,7 @@ import numpy as np import rasterio as rio import xarray as xr +from json_checker import And, Checker from scipy import interpolate from scipy.interpolate import LinearNDInterpolator from shapely.geometry import Polygon @@ -47,16 +48,25 @@ class AbstractGeometry(metaclass=ABCMeta): available_plugins: Dict = {} - def __new__(cls, geometry_plugin=None, **kwargs): + def __new__(cls, geometry_plugin_conf=None, **kwargs): """ Return the required plugin :raises: - KeyError when the required plugin is not registered - :param geometry_plugin: plugin name to instantiate + :param geometry_plugin_conf: plugin name or plugin configuration + to instantiate + :type geometry_plugin_conf: str or dict :return: a geometry_plugin object """ - if geometry_plugin is not None: + if geometry_plugin_conf is not None: + if isinstance(geometry_plugin_conf, str): + geometry_plugin = geometry_plugin_conf + elif isinstance(geometry_plugin_conf, dict): + geometry_plugin = geometry_plugin_conf.get("plugin_name", None) + else: + raise RuntimeError("Not a supported type") + if geometry_plugin not in cls.available_plugins: logging.error( "No geometry plugin named {} registered".format( @@ -81,10 +91,19 @@ def __new__(cls, geometry_plugin=None, **kwargs): return super().__new__(cls) def __init__( - self, geometry_plugin, dem=None, geoid=None, default_alt=None, **kwargs + self, + geometry_plugin_conf, + dem=None, + geoid=None, + default_alt=None, + **kwargs ): - self.plugin_name = geometry_plugin + config = self.check_conf(geometry_plugin_conf) + + self.plugin_name = config["plugin_name"] + self.interpolator = config["interpolator"] + self.dem = dem self.dem_roi = None self.dem_roi_epsg = None @@ -111,9 +130,44 @@ def decorator(subclass): return decorator - @staticmethod + def check_conf(self, conf): + """ + Check configuration + + :param conf: configuration to check + :type conf: str or dict + + :return: full dict + :rtype: dict + + """ + + if conf is None: + raise RuntimeError("Geometry plugin configuration is None") + + overloaded_conf = {} + + if isinstance(conf, str): + conf = {"plugin_name": conf} + + # overload conf + overloaded_conf["plugin_name"] = conf.get("plugin_name", None) + overloaded_conf["interpolator"] = conf.get("interpolator", "cubic") + + geometry_schema = { + "plugin_name": str, + "interpolator": And(str, lambda x: x in ["cubic", "linear"]), + } + + # Check conf + checker = Checker(geometry_schema) + checker.validate(overloaded_conf) + + return overloaded_conf + @abstractmethod def triangulate( + self, sensor1, sensor2, geomodel1, @@ -266,12 +320,12 @@ def matches_to_sensor_coords( ) # convert epipolar matches to sensor coordinates - sensor_pos_left = AbstractGeometry.sensor_position_from_grid( - grid1, vec_epi_pos_left - ) - sensor_pos_right = AbstractGeometry.sensor_position_from_grid( - grid2, vec_epi_pos_right - ) + sensor_pos_left = AbstractGeometry( + {"plugin_name": "SharelocGeometry", "interpolator": "linear"} + ).sensor_position_from_grid(grid1, vec_epi_pos_left) + sensor_pos_right = AbstractGeometry( + {"plugin_name": "SharelocGeometry", "interpolator": "linear"} + ).sensor_position_from_grid(grid2, vec_epi_pos_right) if matches_type == cst.DISP_MODE: # rearrange matches in the original epipolar geometry @@ -302,8 +356,8 @@ def matches_to_sensor_coords( return sensor_pos_left, sensor_pos_right - @staticmethod def sensor_position_from_grid( + self, grid: Union[str, cars_dataset.CarsDataset], positions: np.ndarray, ) -> np.ndarray: @@ -315,6 +369,7 @@ def sensor_position_from_grid( array of size [number of points, 2]. The last index indicates the 'x' coordinate (last index set to 0) or the 'y' coordinate (last index set to 1). + :param interpolator: interpolator to use :return: sensors positions as a numpy array of size [number of points, 2]. The last index indicates the 'x' coordinate (last index set to 0) or @@ -363,34 +418,31 @@ def sensor_position_from_grid( rows = np.arange(ori_row, last_row, step_row) # create regular grid points positions - points = (cols, rows) sensor_row_positions = row_dep sensor_col_positions = col_dep # interpolate sensor positions - interp_row = interpolate.interpn( + interpolator = interpolate.RegularGridInterpolator( (cols, rows), - sensor_row_positions.transpose(), - positions, - method="linear", - bounds_error=False, - fill_value=None, - ) - interp_col = interpolate.interpn( - points, - sensor_col_positions.transpose(), - positions, - method="linear", + np.stack( + ( + sensor_row_positions.transpose(), + sensor_col_positions.transpose(), + ), + axis=2, + ), + method=self.interpolator, bounds_error=False, fill_value=None, ) - # stack both coordinates - sensor_positions = np.transpose(np.vstack([interp_col, interp_row])) + sensor_positions = interpolator(positions) + # swap + sensor_positions[:, [0, 1]] = sensor_positions[:, [1, 0]] + return sensor_positions - @staticmethod - def epipolar_position_from_grid(grid, sensor_positions, step=30): + def epipolar_position_from_grid(self, grid, sensor_positions, step=30): """ Compute epipolar position from grid @@ -413,9 +465,7 @@ def epipolar_position_from_grid(grid, sensor_positions, step=30): [epi_grid_row.flatten(), epi_grid_col.flatten()], axis=1 ) - sensor_interp_pos = AbstractGeometry.sensor_position_from_grid( - grid, full_epi_pos - ) + sensor_interp_pos = self.sensor_position_from_grid(grid, full_epi_pos) interp_row = LinearNDInterpolator( list( zip( # noqa: B905 @@ -446,9 +496,13 @@ def epipolar_position_from_grid(grid, sensor_positions, step=30): return epipolar_positions - @staticmethod def transform_matches_from_grids( - matches_array, grid_left, grid_right, new_grid_left, new_grid_right + self, + matches_array, + grid_left, + grid_right, + new_grid_left, + new_grid_right, ): """ Transform epipolar matches with grid transformation @@ -462,18 +516,18 @@ def transform_matches_from_grids( """ # Transform to sensors - sensor_matches_left = AbstractGeometry.sensor_position_from_grid( + sensor_matches_left = self.sensor_position_from_grid( grid_left, matches_array[:, 0:2] ) - sensor_matches_right = AbstractGeometry.sensor_position_from_grid( + sensor_matches_right = self.sensor_position_from_grid( grid_right, matches_array[:, 2:4] ) # Transform to new grids - new_grid_matches_left = AbstractGeometry.epipolar_position_from_grid( + new_grid_matches_left = self.epipolar_position_from_grid( new_grid_left, sensor_matches_left ) - new_grid_matches_right = AbstractGeometry.epipolar_position_from_grid( + new_grid_matches_right = self.epipolar_position_from_grid( new_grid_right, sensor_matches_right ) diff --git a/cars/core/geometry/shareloc_geometry.py b/cars/core/geometry/shareloc_geometry.py index 5b6a0a94..ea830760 100644 --- a/cars/core/geometry/shareloc_geometry.py +++ b/cars/core/geometry/shareloc_geometry.py @@ -58,15 +58,15 @@ class SharelocGeometry(AbstractGeometry): def __init__( self, - geometry_plugin, + geometry_plugin_conf, dem=None, geoid=None, default_alt=None, pairs_for_roi=None, - rectification_grid_margin=0, ): + super().__init__( - geometry_plugin, + geometry_plugin_conf, dem=dem, geoid=geoid, default_alt=default_alt, @@ -76,7 +76,11 @@ def __init__( self.dem_roi = None self.roi_shareloc = None self.elevation = None - self.rectification_grid_margin = rectification_grid_margin + + # a margin is needed for cubic interpolation + self.rectification_grid_margin = 0 + if self.interpolator == "cubic": + self.rectification_grid_margin = 5 # compute roi only when generating geometry object with dem # even if dem is None @@ -250,8 +254,8 @@ def check_product_consistency(sensor: str, geomodel: dict) -> bool: return sensor, overloaded_geomodel - @staticmethod def triangulate( + self, sensor1, sensor2, geomodel1, @@ -300,6 +304,7 @@ def triangulate( grid_right=grid2, residues=True, fill_nan=True, + interpolator=self.interpolator, ) llh = point_wgs84.reshape((point_wgs84.shape[0], 1, 3)) @@ -315,6 +320,7 @@ def triangulate( grid_right=grid2, residues=True, fill_nan=True, + interpolator=self.interpolator, ) row = np.array( diff --git a/cars/pipelines/default/default_pipeline.py b/cars/pipelines/default/default_pipeline.py index df4071ca..7aabfb36 100644 --- a/cars/pipelines/default/default_pipeline.py +++ b/cars/pipelines/default/default_pipeline.py @@ -1479,7 +1479,7 @@ def sensor_to_depth_maps(self): # noqa: C901 # Correct grids with former matches # Transform matches to new grids new_grid_matches_array = ( - AbstractGeometry.transform_matches_from_grids( + geom_plugin.transform_matches_from_grids( matches, self.pairs[pair_key]["corrected_grid_left"], self.pairs[pair_key]["corrected_grid_right"], diff --git a/cars/pipelines/parameters/sensor_inputs.py b/cars/pipelines/parameters/sensor_inputs.py index 034fcc9f..0912a5aa 100644 --- a/cars/pipelines/parameters/sensor_inputs.py +++ b/cars/pipelines/parameters/sensor_inputs.py @@ -313,11 +313,20 @@ def check_geometry_plugin(conf_inputs, conf_advanced, conf_geom_plugin): if not total_input_roi_poly.contains_properly( dem_generation_roi_poly ): - raise RuntimeError( + base_message = ( "Given initial elevation ROI is not covering needed ROI: " " EPSG:4326, ROI: {}".format(dem_generation_roi_poly.bounds) ) + if total_input_roi_poly.intersects(dem_generation_roi_poly): + logging.warning( + "{}. Only a part of it intersects. " + "Errors might occur".format(base_message) + ) + else: + # Exit, Error is certain to occur + raise RuntimeError(base_message) + else: logging.warning( "Current geometry plugin doesnt compute dem roi needed " diff --git a/cars/pipelines/pipeline_template.py b/cars/pipelines/pipeline_template.py index a3fb32ce..2115d216 100644 --- a/cars/pipelines/pipeline_template.py +++ b/cars/pipelines/pipeline_template.py @@ -25,7 +25,7 @@ from abc import ABCMeta, abstractmethod -from json_checker import Checker, OptionalKey +from json_checker import Checker, OptionalKey, Or # CARS imports from cars.orchestrator import orchestrator @@ -68,7 +68,7 @@ def check_global_schema(self, conf): pipeline_constants.INPUTS: dict, pipeline_constants.OUTPUT: dict, OptionalKey(pipeline_constants.APPLICATIONS): dict, - OptionalKey(pipeline_constants.GEOMETRY_PLUGIN): str, + OptionalKey(pipeline_constants.GEOMETRY_PLUGIN): Or(str, dict), OptionalKey(pipeline_constants.ORCHESTRATOR): dict, OptionalKey(pipeline_constants.PIPELINE): str, OptionalKey(pipeline_constants.ADVANCED): dict, diff --git a/docs/source/usage/configuration.rst b/docs/source/usage/configuration.rst index f3ade963..c8a4ba1b 100644 --- a/docs/source/usage/configuration.rst +++ b/docs/source/usage/configuration.rst @@ -795,11 +795,23 @@ The structure follows this organization: This section describes configuration of the geometry plugins for CARS, please refer to :ref:`plugins` section for details on plugins installation. - +-------------------+-----------------------+--------+-------------------------+---------------------------------------+----------+ - | Name | Description | Type | Default value | Available values | Required | - +===================+=======================+========+=========================+=======================================+==========+ - | *geometry_plugin* | The plugin to use | str | "SharelocGeometry" | "SharelocGeometry" | False | - +-------------------+-----------------------+--------+-------------------------+---------------------------------------+----------+ + +-------------------+-----------------------+----------------+-------------------------+---------------------------------------+----------+ + | Name | Description | Type | Default value | Available values | Required | + +===================+=======================+================+=========================+=======================================+==========+ + | *geometry_plugin* | The plugin to use | str or dict | "SharelocGeometry" | "SharelocGeometry" | False | + +-------------------+-----------------------+----------------+-------------------------+---------------------------------------+----------+ + + **geometry_plugin** allow user to specify other parameters, through a dictionary: + + +-------------------+--------------------------+----------------+-------------------------+---------------------------------------+----------+ + | Name | Description | Type | Default value | Available values | Required | + +===================+==========================+================+=========================+=======================================+==========+ + | *plugin_name* | The plugin name to use | str | "SharelocGeometry" | "SharelocGeometry" | False | + +-------------------+--------------------------+----------------+-------------------------+---------------------------------------+----------+ + | *interpolator* | Interpolator to use | str | "cubic" | "cubic" , "linear" | False | + +-------------------+--------------------------+----------------+-------------------------+---------------------------------------+----------+ + + To use Shareloc geometry library, CARS input configuration should be defined as : @@ -834,6 +846,18 @@ The structure follows this organization: } } + **geometry_plugin** specify the plugin to use, but other configuration parameters can be specified : + + .. code-block:: json + + "geometry_plugin": { + "plugin_name": "SharelocGeometry", + "interpolator": "cubic" + } + + + + The particularities in the configuration file are: * **geomodel.model_type**: Depending on the nature of the geometric models indicated above, this field as to be defined as `RPC` or `GRID`. By default, "RPC". diff --git a/tests/applications/grid_generation/test_grids.py b/tests/applications/grid_generation/test_grids.py index ef596162..87b201f3 100644 --- a/tests/applications/grid_generation/test_grids.py +++ b/tests/applications/grid_generation/test_grids.py @@ -217,7 +217,7 @@ def test_generate_epipolar_grids_default_alt_shareloc(images_and_grids_conf): # but precision result to 10**-5 is enough for baseline # put exact values to know if modifications are done. # put decimal values to 10 to know if modifications are done. - np.testing.assert_almost_equal(baseline, 1.420566289522033, decimal=10) + np.testing.assert_almost_equal(baseline, 1.4205663917758247, decimal=10) # Uncomment to update baseline # generate_grid_xr_dataset(left_grid).to_netcdf(absolute_data_path( @@ -276,7 +276,7 @@ def test_generate_epipolar_grids_shareloc(images_and_grids_conf): # test baseline: 1/(disp to alt ratio) adapted from Shareloc. # but precision result to 10**-5 is enough for baseline # put decimal values to 10 to know if modifications are done. - np.testing.assert_almost_equal(baseline, 1.4205717708948564, decimal=10) + np.testing.assert_almost_equal(baseline, 1.4205731358019482, decimal=10) # Uncomment to update baseline # generate_grid_xr_dataset(left_grid).to_netcdf( diff --git a/tests/applications/triangulation/test_triangulation_tools.py b/tests/applications/triangulation/test_triangulation_tools.py index 40161660..5c0f7044 100644 --- a/tests/applications/triangulation/test_triangulation_tools.py +++ b/tests/applications/triangulation/test_triangulation_tools.py @@ -135,10 +135,10 @@ def test_triangulate_matches_shareloc( ) # put decimal values to 10 to know if modifications are done. # for long/lat, 10**(-8) have been checked - np.testing.assert_almost_equal(llh.x[0], 5.197378451223451, decimal=10) - np.testing.assert_almost_equal(llh.y[0], 44.20798042602802, decimal=10) + np.testing.assert_almost_equal(llh.x[0], 5.197378451485809, decimal=10) + np.testing.assert_almost_equal(llh.y[0], 44.20798042552038, decimal=10) # for altitude, 10**(-3) have been checked - np.testing.assert_almost_equal(llh.z[0], 512.807649359107, decimal=10) + np.testing.assert_almost_equal(llh.z[0], 512.8074492644519, decimal=10) # np.testing.assert_almost_equal(llh.z[0], 511.4383088) assert llh[cst.DISPARITY][0] == 0.0 assert llh[cst.POINT_CLOUD_CORR_MSK][0] == 255 diff --git a/tests/core/geometry/test_abstract_geometry.py b/tests/core/geometry/test_abstract_geometry.py index ab4af7a7..94f1866a 100644 --- a/tests/core/geometry/test_abstract_geometry.py +++ b/tests/core/geometry/test_abstract_geometry.py @@ -159,6 +159,53 @@ def test_wrong_class_name(): assert str(error.value) == "'No geometry plugin named test registered'" +@pytest.mark.unit_tests +def test_wrong_class_name_with_int(): + """ + Test cars geometry abstract class + """ + with pytest.raises(RuntimeError) as error: + AbstractGeometry(3) # pylint: disable=abstract-class-instantiated + assert str(error.value) == "Not a supported type" + + +@pytest.mark.unit_tests +def test_wrong_class_name_with_dict(): + """ + Test cars geometry abstract class + """ + with pytest.raises(KeyError) as error: + AbstractGeometry( # pylint: disable=abstract-class-instantiated + {"plugin_name": "test"} + ) # pylint: disable=abstract-class-instantiated + assert str(error.value) == "'No geometry plugin named test registered'" + + +@pytest.mark.unit_tests +def test_correct_class_name_with(): + """ + Test cars geometry abstract class + """ + AbstractGeometry( # pylint: disable=abstract-class-instantiated + {"plugin_name": "SharelocGeometry"} + ) + AbstractGeometry( # pylint: disable=abstract-class-instantiated + { # pylint: disable=abstract-class-instantiated + "plugin_name": "SharelocGeometry", + "interpolator": "cubic", + } + ) + AbstractGeometry( # pylint: disable=abstract-class-instantiated + { + "plugin_name": "SharelocGeometry", + "interpolator": "linear", + } + ) + AbstractGeometry( # pylint: disable=abstract-class-instantiated + "SharelocGeometry" + ) + + @pytest.mark.unit_tests def test_sensor_position_from_grid( epipolar_coords, ref_sensor_coords @@ -168,14 +215,14 @@ def test_sensor_position_from_grid( """ grid = absolute_data_path("input/abstract_geometry_input/grid.tif") - coords = AbstractGeometry.sensor_position_from_grid( - grid, epipolar_coords["left"] - ) + coords = AbstractGeometry( # pylint: disable=abstract-class-instantiated + {"plugin_name": "SharelocGeometry", "interpolator": "linear"} + ).sensor_position_from_grid(grid, epipolar_coords["left"]) assert np.allclose(ref_sensor_coords["left"], coords) - coords = AbstractGeometry.sensor_position_from_grid( - grid, epipolar_coords["right"] - ) + coords = AbstractGeometry( # pylint: disable=abstract-class-instantiated + {"plugin_name": "SharelocGeometry", "interpolator": "linear"} + ).sensor_position_from_grid(grid, epipolar_coords["right"]) assert np.allclose(ref_sensor_coords["right"], coords) @@ -199,7 +246,9 @@ def test_disp_to_sensor_coords( ( sensor_pos_left, sensor_pos_right, - ) = AbstractGeometry.matches_to_sensor_coords( + ) = AbstractGeometry( # pylint: disable=abstract-class-instantiated + {"plugin_name": "SharelocGeometry", "interpolator": "linear"} + ).matches_to_sensor_coords( grid1, grid2, disp_map, cst.DISP_MODE, matches_msk=disp_msk ) @@ -239,7 +288,9 @@ def test_disp_to_sensor_coords( ( sensor_pos_left, sensor_pos_right, - ) = AbstractGeometry.matches_to_sensor_coords( + ) = AbstractGeometry( # pylint: disable=abstract-class-instantiated + {"plugin_name": "SharelocGeometry", "interpolator": "linear"} + ).matches_to_sensor_coords( grid1, grid2, disp_map, @@ -291,7 +342,9 @@ def test_matches_to_sensor_coords( ( sensor_pos_left, sensor_pos_right, - ) = AbstractGeometry.matches_to_sensor_coords( + ) = AbstractGeometry( # pylint: disable=abstract-class-instantiated + {"plugin_name": "SharelocGeometry", "interpolator": "linear"} + ).matches_to_sensor_coords( grid1, grid2, matches, cst.MATCHES_MODE ) @@ -337,10 +390,16 @@ def test_epipolar_position_from_grid(): epi_pos = np.array([[2, 2], [2, 300], [2, 580], [300, 300], [600, 300]]) - sensor_pos = AbstractGeometry.sensor_position_from_grid(grid_left, epi_pos) + sensor_pos = ( + AbstractGeometry( # pylint: disable=abstract-class-instantiated + {"plugin_name": "SharelocGeometry", "interpolator": "linear"} + ).sensor_position_from_grid(grid_left, epi_pos) + ) - new_epi_pos = AbstractGeometry.epipolar_position_from_grid( - grid_left, sensor_pos, step=30 + new_epi_pos = ( + AbstractGeometry( # pylint: disable=abstract-class-instantiated + {"plugin_name": "SharelocGeometry", "interpolator": "linear"} + ).epipolar_position_from_grid(grid_left, sensor_pos, step=30) ) assert np.allclose(new_epi_pos, epi_pos) diff --git a/tests/core/geometry/test_shareloc_geometry.py b/tests/core/geometry/test_shareloc_geometry.py index a7d4651e..041ab3f2 100644 --- a/tests/core/geometry/test_shareloc_geometry.py +++ b/tests/core/geometry/test_shareloc_geometry.py @@ -120,9 +120,12 @@ def test_get_roi(): dem = absolute_data_path("input/phr_ventoux/srtm/N44E005.hgt") geoid = get_geoid_path() + # Uses 0 margin with linar interpolator geo_plugin = ( AbstractGeometry( # pylint: disable=abstract-class-instantiated - "SharelocGeometry", dem=dem, geoid=geoid + {"plugin_name": "SharelocGeometry", "interpolator": "linear"}, + dem=dem, + geoid=geoid, ) ) pairs_for_roi = [(sensor1, geomodel1, sensor2, geomodel2)] @@ -135,19 +138,19 @@ def test_get_roi(): ] np.testing.assert_allclose(roi, ref_roi) - # Add a 5 pixel margin on rectification grid + # Uses a 5 pixel margin on rectification grid, with cubic interpolator geo_plugin_with_margin_on_grid = ( AbstractGeometry( # pylint: disable=abstract-class-instantiated "SharelocGeometry", dem=dem, geoid=geoid, - rectification_grid_margin=5, ) ) pairs_for_roi = [(sensor1, geomodel1, sensor2, geomodel2)] roi = geo_plugin_with_margin_on_grid.get_roi( pairs_for_roi, 4326, margin=0.005 ) + ref_roi = [ 44.198651, 5.185954, diff --git a/tests/data/ref_output/classif_end2end_ventoux_lr.tif b/tests/data/ref_output/classif_end2end_ventoux_lr.tif index 63798efc..c13d8fd6 100644 Binary files a/tests/data/ref_output/classif_end2end_ventoux_lr.tif and b/tests/data/ref_output/classif_end2end_ventoux_lr.tif differ diff --git a/tests/data/ref_output/classif_end2end_ventoux_rl.tif b/tests/data/ref_output/classif_end2end_ventoux_rl.tif index c90010a8..2993d08f 100644 Binary files a/tests/data/ref_output/classif_end2end_ventoux_rl.tif and b/tests/data/ref_output/classif_end2end_ventoux_rl.tif differ diff --git a/tests/data/ref_output/classif_end2end_ventoux_split_no_merging.tif b/tests/data/ref_output/classif_end2end_ventoux_split_no_merging.tif index d4fe7c71..8f34d29d 100644 Binary files a/tests/data/ref_output/classif_end2end_ventoux_split_no_merging.tif and b/tests/data/ref_output/classif_end2end_ventoux_split_no_merging.tif differ diff --git a/tests/data/ref_output/classification_end2end_paca_aux_filling.tif b/tests/data/ref_output/classification_end2end_paca_aux_filling.tif index 6e2b7ff3..42983eed 100644 Binary files a/tests/data/ref_output/classification_end2end_paca_aux_filling.tif and b/tests/data/ref_output/classification_end2end_paca_aux_filling.tif differ diff --git a/tests/data/ref_output/classification_end2end_paca_aux_filling_0.tif b/tests/data/ref_output/classification_end2end_paca_aux_filling_0.tif index 464b0196..a0926bd3 100644 Binary files a/tests/data/ref_output/classification_end2end_paca_aux_filling_0.tif and b/tests/data/ref_output/classification_end2end_paca_aux_filling_0.tif differ diff --git a/tests/data/ref_output/classification_end2end_paca_aux_filling_1.tif b/tests/data/ref_output/classification_end2end_paca_aux_filling_1.tif index fbc6614f..44f471b9 100644 Binary files a/tests/data/ref_output/classification_end2end_paca_aux_filling_1.tif and b/tests/data/ref_output/classification_end2end_paca_aux_filling_1.tif differ diff --git a/tests/data/ref_output/classification_end2end_paca_aux_filling_2.tif b/tests/data/ref_output/classification_end2end_paca_aux_filling_2.tif index 464b0196..a0926bd3 100644 Binary files a/tests/data/ref_output/classification_end2end_paca_aux_filling_2.tif and b/tests/data/ref_output/classification_end2end_paca_aux_filling_2.tif differ diff --git a/tests/data/ref_output/classification_end2end_ventoux_no_elevation.tif b/tests/data/ref_output/classification_end2end_ventoux_no_elevation.tif index f224315e..44559fb0 100644 Binary files a/tests/data/ref_output/classification_end2end_ventoux_no_elevation.tif and b/tests/data/ref_output/classification_end2end_ventoux_no_elevation.tif differ diff --git a/tests/data/ref_output/classification_end2end_ventoux_split.tif b/tests/data/ref_output/classification_end2end_ventoux_split.tif index c80d061b..c27fd984 100644 Binary files a/tests/data/ref_output/classification_end2end_ventoux_split.tif and b/tests/data/ref_output/classification_end2end_ventoux_split.tif differ diff --git a/tests/data/ref_output/classification_end2end_ventoux_with_classif.tif b/tests/data/ref_output/classification_end2end_ventoux_with_classif.tif index 635d364d..005f6eef 100644 Binary files a/tests/data/ref_output/classification_end2end_ventoux_with_classif.tif and b/tests/data/ref_output/classification_end2end_ventoux_with_classif.tif differ diff --git a/tests/data/ref_output/clr_end2end_ventoux_split_no_merging.tif b/tests/data/ref_output/clr_end2end_ventoux_split_no_merging.tif index 6fcb8f66..609977a3 100644 Binary files a/tests/data/ref_output/clr_end2end_ventoux_split_no_merging.tif and b/tests/data/ref_output/clr_end2end_ventoux_split_no_merging.tif differ diff --git a/tests/data/ref_output/color_end2end_gizeh_crop_no_merging.tif b/tests/data/ref_output/color_end2end_gizeh_crop_no_merging.tif index 64bd365d..10a4d4ab 100644 Binary files a/tests/data/ref_output/color_end2end_gizeh_crop_no_merging.tif and b/tests/data/ref_output/color_end2end_gizeh_crop_no_merging.tif differ diff --git a/tests/data/ref_output/color_end2end_gizeh_fill.tif b/tests/data/ref_output/color_end2end_gizeh_fill.tif index 9309a948..6fc99bbd 100644 Binary files a/tests/data/ref_output/color_end2end_gizeh_fill.tif and b/tests/data/ref_output/color_end2end_gizeh_fill.tif differ diff --git a/tests/data/ref_output/color_end2end_gizeh_fill_with_zero.tif b/tests/data/ref_output/color_end2end_gizeh_fill_with_zero.tif index 272dfbbc..9159da4b 100644 Binary files a/tests/data/ref_output/color_end2end_gizeh_fill_with_zero.tif and b/tests/data/ref_output/color_end2end_gizeh_fill_with_zero.tif differ diff --git a/tests/data/ref_output/color_end2end_paca_aux_filling.tif b/tests/data/ref_output/color_end2end_paca_aux_filling.tif index ccf38a14..e4bd3cb3 100644 Binary files a/tests/data/ref_output/color_end2end_paca_aux_filling.tif and b/tests/data/ref_output/color_end2end_paca_aux_filling.tif differ diff --git a/tests/data/ref_output/color_end2end_paca_aux_filling_0.tif b/tests/data/ref_output/color_end2end_paca_aux_filling_0.tif index 7de50522..8efa34ca 100644 Binary files a/tests/data/ref_output/color_end2end_paca_aux_filling_0.tif and b/tests/data/ref_output/color_end2end_paca_aux_filling_0.tif differ diff --git a/tests/data/ref_output/color_end2end_paca_aux_filling_1.tif b/tests/data/ref_output/color_end2end_paca_aux_filling_1.tif index 166d7d05..2c8dfb8c 100644 Binary files a/tests/data/ref_output/color_end2end_paca_aux_filling_1.tif and b/tests/data/ref_output/color_end2end_paca_aux_filling_1.tif differ diff --git a/tests/data/ref_output/color_end2end_paca_aux_filling_2.tif b/tests/data/ref_output/color_end2end_paca_aux_filling_2.tif index e9c40717..d17c5b6e 100644 Binary files a/tests/data/ref_output/color_end2end_paca_aux_filling_2.tif and b/tests/data/ref_output/color_end2end_paca_aux_filling_2.tif differ diff --git a/tests/data/ref_output/color_end2end_paca_matches_filling.tif b/tests/data/ref_output/color_end2end_paca_matches_filling.tif index 40e2947f..92a213bb 100644 Binary files a/tests/data/ref_output/color_end2end_paca_matches_filling.tif and b/tests/data/ref_output/color_end2end_paca_matches_filling.tif differ diff --git a/tests/data/ref_output/color_end2end_ventoux.tif b/tests/data/ref_output/color_end2end_ventoux.tif index 7c6b942a..ffe2224c 100644 Binary files a/tests/data/ref_output/color_end2end_ventoux.tif and b/tests/data/ref_output/color_end2end_ventoux.tif differ diff --git a/tests/data/ref_output/color_end2end_ventoux_egm96.tif b/tests/data/ref_output/color_end2end_ventoux_egm96.tif index 7c6b942a..ffe2224c 100644 Binary files a/tests/data/ref_output/color_end2end_ventoux_egm96.tif and b/tests/data/ref_output/color_end2end_ventoux_egm96.tif differ diff --git a/tests/data/ref_output/color_end2end_ventoux_egm96_custom_geoid.tif b/tests/data/ref_output/color_end2end_ventoux_egm96_custom_geoid.tif index c4e02e16..a73f1610 100644 Binary files a/tests/data/ref_output/color_end2end_ventoux_egm96_custom_geoid.tif and b/tests/data/ref_output/color_end2end_ventoux_egm96_custom_geoid.tif differ diff --git a/tests/data/ref_output/color_end2end_ventoux_fusion.tif b/tests/data/ref_output/color_end2end_ventoux_fusion.tif index eefeb653..42347e78 100644 Binary files a/tests/data/ref_output/color_end2end_ventoux_fusion.tif and b/tests/data/ref_output/color_end2end_ventoux_fusion.tif differ diff --git a/tests/data/ref_output/color_end2end_ventoux_lr.tif b/tests/data/ref_output/color_end2end_ventoux_lr.tif index bce0c640..3150b509 100644 Binary files a/tests/data/ref_output/color_end2end_ventoux_lr.tif and b/tests/data/ref_output/color_end2end_ventoux_lr.tif differ diff --git a/tests/data/ref_output/color_end2end_ventoux_no_elevation.tif b/tests/data/ref_output/color_end2end_ventoux_no_elevation.tif index f6300235..eab1e919 100644 Binary files a/tests/data/ref_output/color_end2end_ventoux_no_elevation.tif and b/tests/data/ref_output/color_end2end_ventoux_no_elevation.tif differ diff --git a/tests/data/ref_output/color_end2end_ventoux_no_srtm.tif b/tests/data/ref_output/color_end2end_ventoux_no_srtm.tif index d11da03b..706170a7 100644 Binary files a/tests/data/ref_output/color_end2end_ventoux_no_srtm.tif and b/tests/data/ref_output/color_end2end_ventoux_no_srtm.tif differ diff --git a/tests/data/ref_output/color_end2end_ventoux_quality_stats.tif b/tests/data/ref_output/color_end2end_ventoux_quality_stats.tif index a3faa31a..efa7e0f5 100644 Binary files a/tests/data/ref_output/color_end2end_ventoux_quality_stats.tif and b/tests/data/ref_output/color_end2end_ventoux_quality_stats.tif differ diff --git a/tests/data/ref_output/color_end2end_ventoux_split.tif b/tests/data/ref_output/color_end2end_ventoux_split.tif index ffae8939..79f2b36c 100644 Binary files a/tests/data/ref_output/color_end2end_ventoux_split.tif and b/tests/data/ref_output/color_end2end_ventoux_split.tif differ diff --git a/tests/data/ref_output/color_end2end_ventoux_split_4326.tif b/tests/data/ref_output/color_end2end_ventoux_split_4326.tif index 74027b7d..721b015b 100644 Binary files a/tests/data/ref_output/color_end2end_ventoux_split_4326.tif and b/tests/data/ref_output/color_end2end_ventoux_split_4326.tif differ diff --git a/tests/data/ref_output/color_end2end_ventoux_with_color.tif b/tests/data/ref_output/color_end2end_ventoux_with_color.tif index 4169ccf5..36d2280b 100644 Binary files a/tests/data/ref_output/color_end2end_ventoux_with_color.tif and b/tests/data/ref_output/color_end2end_ventoux_with_color.tif differ diff --git a/tests/data/ref_output/color_end2end_ventoux_with_roi.tif b/tests/data/ref_output/color_end2end_ventoux_with_roi.tif index e01b72ae..3c6a51fd 100644 Binary files a/tests/data/ref_output/color_end2end_ventoux_with_roi.tif and b/tests/data/ref_output/color_end2end_ventoux_with_roi.tif differ diff --git a/tests/data/ref_output/color_end2end_ventoux_with_snap_to_img1.tif b/tests/data/ref_output/color_end2end_ventoux_with_snap_to_img1.tif index 866a03c0..9ff35db6 100644 Binary files a/tests/data/ref_output/color_end2end_ventoux_with_snap_to_img1.tif and b/tests/data/ref_output/color_end2end_ventoux_with_snap_to_img1.tif differ diff --git a/tests/data/ref_output/colorisation_end2end_gizeh_reentrance.tif b/tests/data/ref_output/colorisation_end2end_gizeh_reentrance.tif index 04e2f72f..e5bdd9e2 100644 Binary files a/tests/data/ref_output/colorisation_end2end_gizeh_reentrance.tif and b/tests/data/ref_output/colorisation_end2end_gizeh_reentrance.tif differ diff --git a/tests/data/ref_output/confidence_from_ambiguity1_end2end_ventoux_split.tif b/tests/data/ref_output/confidence_from_ambiguity1_end2end_ventoux_split.tif index 11274151..c55da6eb 100644 Binary files a/tests/data/ref_output/confidence_from_ambiguity1_end2end_ventoux_split.tif and b/tests/data/ref_output/confidence_from_ambiguity1_end2end_ventoux_split.tif differ diff --git a/tests/data/ref_output/confidence_from_ambiguity1_end2end_ventoux_split_no_merging.tif b/tests/data/ref_output/confidence_from_ambiguity1_end2end_ventoux_split_no_merging.tif index fb29f0a3..f71db71b 100644 Binary files a/tests/data/ref_output/confidence_from_ambiguity1_end2end_ventoux_split_no_merging.tif and b/tests/data/ref_output/confidence_from_ambiguity1_end2end_ventoux_split_no_merging.tif differ diff --git a/tests/data/ref_output/confidence_from_ambiguity2_end2end_ventoux_split.tif b/tests/data/ref_output/confidence_from_ambiguity2_end2end_ventoux_split.tif index 89c375b1..0665b9b7 100644 Binary files a/tests/data/ref_output/confidence_from_ambiguity2_end2end_ventoux_split.tif and b/tests/data/ref_output/confidence_from_ambiguity2_end2end_ventoux_split.tif differ diff --git a/tests/data/ref_output/confidence_from_ambiguity2_end2end_ventoux_split_no_merging.tif b/tests/data/ref_output/confidence_from_ambiguity2_end2end_ventoux_split_no_merging.tif index deebe4f5..523e9434 100644 Binary files a/tests/data/ref_output/confidence_from_ambiguity2_end2end_ventoux_split_no_merging.tif and b/tests/data/ref_output/confidence_from_ambiguity2_end2end_ventoux_split_no_merging.tif differ diff --git a/tests/data/ref_output/confidence_from_ambiguity_before_end2end_ventoux.tif b/tests/data/ref_output/confidence_from_ambiguity_before_end2end_ventoux.tif index d2511400..13239ac4 100644 Binary files a/tests/data/ref_output/confidence_from_ambiguity_before_end2end_ventoux.tif and b/tests/data/ref_output/confidence_from_ambiguity_before_end2end_ventoux.tif differ diff --git a/tests/data/ref_output/confidence_from_ambiguity_end2end_ventoux.tif b/tests/data/ref_output/confidence_from_ambiguity_end2end_ventoux.tif index 85c5528c..97a5b91e 100644 Binary files a/tests/data/ref_output/confidence_from_ambiguity_end2end_ventoux.tif and b/tests/data/ref_output/confidence_from_ambiguity_end2end_ventoux.tif differ diff --git a/tests/data/ref_output/confidence_from_ambiguity_end2end_ventoux_no_srtm.tif b/tests/data/ref_output/confidence_from_ambiguity_end2end_ventoux_no_srtm.tif index 0407a689..980b36e6 100644 Binary files a/tests/data/ref_output/confidence_from_ambiguity_end2end_ventoux_no_srtm.tif and b/tests/data/ref_output/confidence_from_ambiguity_end2end_ventoux_no_srtm.tif differ diff --git a/tests/data/ref_output/confidence_from_intensity_std_before_end2end_ventoux.tif b/tests/data/ref_output/confidence_from_intensity_std_before_end2end_ventoux.tif index 827ba3b8..7b1bf6f7 100644 Binary files a/tests/data/ref_output/confidence_from_intensity_std_before_end2end_ventoux.tif and b/tests/data/ref_output/confidence_from_intensity_std_before_end2end_ventoux.tif differ diff --git a/tests/data/ref_output/confidence_from_intensity_std_end2end_ventoux.tif b/tests/data/ref_output/confidence_from_intensity_std_end2end_ventoux.tif index 827ba3b8..7b1bf6f7 100644 Binary files a/tests/data/ref_output/confidence_from_intensity_std_end2end_ventoux.tif and b/tests/data/ref_output/confidence_from_intensity_std_end2end_ventoux.tif differ diff --git a/tests/data/ref_output/confidence_from_risk_max_before_end2end_ventoux.tif b/tests/data/ref_output/confidence_from_risk_max_before_end2end_ventoux.tif index cb1dc914..9a3891d6 100644 Binary files a/tests/data/ref_output/confidence_from_risk_max_before_end2end_ventoux.tif and b/tests/data/ref_output/confidence_from_risk_max_before_end2end_ventoux.tif differ diff --git a/tests/data/ref_output/confidence_from_risk_max_end2end_ventoux.tif b/tests/data/ref_output/confidence_from_risk_max_end2end_ventoux.tif index 69a84697..6832726f 100644 Binary files a/tests/data/ref_output/confidence_from_risk_max_end2end_ventoux.tif and b/tests/data/ref_output/confidence_from_risk_max_end2end_ventoux.tif differ diff --git a/tests/data/ref_output/confidence_from_risk_min_before_end2end_ventoux.tif b/tests/data/ref_output/confidence_from_risk_min_before_end2end_ventoux.tif index 9ee04f47..0c6cf409 100644 Binary files a/tests/data/ref_output/confidence_from_risk_min_before_end2end_ventoux.tif and b/tests/data/ref_output/confidence_from_risk_min_before_end2end_ventoux.tif differ diff --git a/tests/data/ref_output/confidence_from_risk_min_end2end_ventoux.tif b/tests/data/ref_output/confidence_from_risk_min_end2end_ventoux.tif index 945f0663..a6eda7ff 100644 Binary files a/tests/data/ref_output/confidence_from_risk_min_end2end_ventoux.tif and b/tests/data/ref_output/confidence_from_risk_min_end2end_ventoux.tif differ diff --git a/tests/data/ref_output/contributing_pair_end2end_ventoux_no_elevation.tif b/tests/data/ref_output/contributing_pair_end2end_ventoux_no_elevation.tif index dc2b94e9..c0dbb325 100644 Binary files a/tests/data/ref_output/contributing_pair_end2end_ventoux_no_elevation.tif and b/tests/data/ref_output/contributing_pair_end2end_ventoux_no_elevation.tif differ diff --git a/tests/data/ref_output/dem_max_end2end_ventoux.tif b/tests/data/ref_output/dem_max_end2end_ventoux.tif index a591e785..0e004166 100644 Binary files a/tests/data/ref_output/dem_max_end2end_ventoux.tif and b/tests/data/ref_output/dem_max_end2end_ventoux.tif differ diff --git a/tests/data/ref_output/dem_max_end2end_ventoux_8bit.tif b/tests/data/ref_output/dem_max_end2end_ventoux_8bit.tif index 683a7ebe..cd3e968a 100644 Binary files a/tests/data/ref_output/dem_max_end2end_ventoux_8bit.tif and b/tests/data/ref_output/dem_max_end2end_ventoux_8bit.tif differ diff --git a/tests/data/ref_output/dem_max_end2end_ventoux_no_srtm.tif b/tests/data/ref_output/dem_max_end2end_ventoux_no_srtm.tif index fb600bd2..ba153429 100644 Binary files a/tests/data/ref_output/dem_max_end2end_ventoux_no_srtm.tif and b/tests/data/ref_output/dem_max_end2end_ventoux_no_srtm.tif differ diff --git a/tests/data/ref_output/dem_max_end2end_ventoux_quality_stats.tif b/tests/data/ref_output/dem_max_end2end_ventoux_quality_stats.tif index 86d740d3..99265828 100644 Binary files a/tests/data/ref_output/dem_max_end2end_ventoux_quality_stats.tif and b/tests/data/ref_output/dem_max_end2end_ventoux_quality_stats.tif differ diff --git a/tests/data/ref_output/dem_median_end2end_ventoux.tif b/tests/data/ref_output/dem_median_end2end_ventoux.tif index 991cfc19..aef06795 100644 Binary files a/tests/data/ref_output/dem_median_end2end_ventoux.tif and b/tests/data/ref_output/dem_median_end2end_ventoux.tif differ diff --git a/tests/data/ref_output/dem_median_end2end_ventoux_8bit.tif b/tests/data/ref_output/dem_median_end2end_ventoux_8bit.tif index b389e060..a1344819 100644 Binary files a/tests/data/ref_output/dem_median_end2end_ventoux_8bit.tif and b/tests/data/ref_output/dem_median_end2end_ventoux_8bit.tif differ diff --git a/tests/data/ref_output/dem_median_end2end_ventoux_no_srtm.tif b/tests/data/ref_output/dem_median_end2end_ventoux_no_srtm.tif index 2365beff..acb51ebb 100644 Binary files a/tests/data/ref_output/dem_median_end2end_ventoux_no_srtm.tif and b/tests/data/ref_output/dem_median_end2end_ventoux_no_srtm.tif differ diff --git a/tests/data/ref_output/dem_median_end2end_ventoux_quality_stats.tif b/tests/data/ref_output/dem_median_end2end_ventoux_quality_stats.tif index 6e1cc5e0..38086dab 100644 Binary files a/tests/data/ref_output/dem_median_end2end_ventoux_quality_stats.tif and b/tests/data/ref_output/dem_median_end2end_ventoux_quality_stats.tif differ diff --git a/tests/data/ref_output/dem_min_end2end_ventoux.tif b/tests/data/ref_output/dem_min_end2end_ventoux.tif index 8d6cab8d..50d9d80b 100644 Binary files a/tests/data/ref_output/dem_min_end2end_ventoux.tif and b/tests/data/ref_output/dem_min_end2end_ventoux.tif differ diff --git a/tests/data/ref_output/dem_min_end2end_ventoux_8bit.tif b/tests/data/ref_output/dem_min_end2end_ventoux_8bit.tif index a124efa4..89e8cfff 100644 Binary files a/tests/data/ref_output/dem_min_end2end_ventoux_8bit.tif and b/tests/data/ref_output/dem_min_end2end_ventoux_8bit.tif differ diff --git a/tests/data/ref_output/dem_min_end2end_ventoux_no_srtm.tif b/tests/data/ref_output/dem_min_end2end_ventoux_no_srtm.tif index 054bfdd6..67d27d11 100644 Binary files a/tests/data/ref_output/dem_min_end2end_ventoux_no_srtm.tif and b/tests/data/ref_output/dem_min_end2end_ventoux_no_srtm.tif differ diff --git a/tests/data/ref_output/dem_min_end2end_ventoux_quality_stats.tif b/tests/data/ref_output/dem_min_end2end_ventoux_quality_stats.tif index f5b25df6..4538fcf2 100644 Binary files a/tests/data/ref_output/dem_min_end2end_ventoux_quality_stats.tif and b/tests/data/ref_output/dem_min_end2end_ventoux_quality_stats.tif differ diff --git a/tests/data/ref_output/dsm_end2end_gizeh_crop_no_merging.tif b/tests/data/ref_output/dsm_end2end_gizeh_crop_no_merging.tif index de116ff9..ef897ca6 100644 Binary files a/tests/data/ref_output/dsm_end2end_gizeh_crop_no_merging.tif and b/tests/data/ref_output/dsm_end2end_gizeh_crop_no_merging.tif differ diff --git a/tests/data/ref_output/dsm_end2end_gizeh_fill.tif b/tests/data/ref_output/dsm_end2end_gizeh_fill.tif index d184189d..ce285150 100644 Binary files a/tests/data/ref_output/dsm_end2end_gizeh_fill.tif and b/tests/data/ref_output/dsm_end2end_gizeh_fill.tif differ diff --git a/tests/data/ref_output/dsm_end2end_gizeh_fill_with_zero.tif b/tests/data/ref_output/dsm_end2end_gizeh_fill_with_zero.tif index 04dbac87..0901b9bf 100644 Binary files a/tests/data/ref_output/dsm_end2end_gizeh_fill_with_zero.tif and b/tests/data/ref_output/dsm_end2end_gizeh_fill_with_zero.tif differ diff --git a/tests/data/ref_output/dsm_end2end_paca_bulldozer.tif b/tests/data/ref_output/dsm_end2end_paca_bulldozer.tif index d957c871..5bdc7027 100644 Binary files a/tests/data/ref_output/dsm_end2end_paca_bulldozer.tif and b/tests/data/ref_output/dsm_end2end_paca_bulldozer.tif differ diff --git a/tests/data/ref_output/dsm_end2end_paca_matches_filling.tif b/tests/data/ref_output/dsm_end2end_paca_matches_filling.tif index aa23e990..7c526c59 100644 Binary files a/tests/data/ref_output/dsm_end2end_paca_matches_filling.tif and b/tests/data/ref_output/dsm_end2end_paca_matches_filling.tif differ diff --git a/tests/data/ref_output/dsm_end2end_ventoux.tif b/tests/data/ref_output/dsm_end2end_ventoux.tif index 823ba19e..8b73f94a 100644 Binary files a/tests/data/ref_output/dsm_end2end_ventoux.tif and b/tests/data/ref_output/dsm_end2end_ventoux.tif differ diff --git a/tests/data/ref_output/dsm_end2end_ventoux_egm96.tif b/tests/data/ref_output/dsm_end2end_ventoux_egm96.tif index e203648e..771c003c 100644 Binary files a/tests/data/ref_output/dsm_end2end_ventoux_egm96.tif and b/tests/data/ref_output/dsm_end2end_ventoux_egm96.tif differ diff --git a/tests/data/ref_output/dsm_end2end_ventoux_egm96_custom_geoid.tif b/tests/data/ref_output/dsm_end2end_ventoux_egm96_custom_geoid.tif index c6c65fa1..bcc92326 100644 Binary files a/tests/data/ref_output/dsm_end2end_ventoux_egm96_custom_geoid.tif and b/tests/data/ref_output/dsm_end2end_ventoux_egm96_custom_geoid.tif differ diff --git a/tests/data/ref_output/dsm_end2end_ventoux_no_elevation.tif b/tests/data/ref_output/dsm_end2end_ventoux_no_elevation.tif index 5a0ccd34..c1957d30 100644 Binary files a/tests/data/ref_output/dsm_end2end_ventoux_no_elevation.tif and b/tests/data/ref_output/dsm_end2end_ventoux_no_elevation.tif differ diff --git a/tests/data/ref_output/dsm_end2end_ventoux_no_srtm.tif b/tests/data/ref_output/dsm_end2end_ventoux_no_srtm.tif index 7bc9f223..b5fad0bf 100644 Binary files a/tests/data/ref_output/dsm_end2end_ventoux_no_srtm.tif and b/tests/data/ref_output/dsm_end2end_ventoux_no_srtm.tif differ diff --git a/tests/data/ref_output/dsm_end2end_ventoux_quality_stats.tif b/tests/data/ref_output/dsm_end2end_ventoux_quality_stats.tif index 8acb7e2f..86d48fa1 100644 Binary files a/tests/data/ref_output/dsm_end2end_ventoux_quality_stats.tif and b/tests/data/ref_output/dsm_end2end_ventoux_quality_stats.tif differ diff --git a/tests/data/ref_output/dsm_end2end_ventoux_split.tif b/tests/data/ref_output/dsm_end2end_ventoux_split.tif index 55417837..d8f96ac6 100644 Binary files a/tests/data/ref_output/dsm_end2end_ventoux_split.tif and b/tests/data/ref_output/dsm_end2end_ventoux_split.tif differ diff --git a/tests/data/ref_output/dsm_end2end_ventoux_split_4326.tif b/tests/data/ref_output/dsm_end2end_ventoux_split_4326.tif index fa5ddf3a..dcc0812c 100644 Binary files a/tests/data/ref_output/dsm_end2end_ventoux_split_4326.tif and b/tests/data/ref_output/dsm_end2end_ventoux_split_4326.tif differ diff --git a/tests/data/ref_output/dsm_end2end_ventoux_split_no_merging.tif b/tests/data/ref_output/dsm_end2end_ventoux_split_no_merging.tif index 8a152042..21b4faf7 100644 Binary files a/tests/data/ref_output/dsm_end2end_ventoux_split_no_merging.tif and b/tests/data/ref_output/dsm_end2end_ventoux_split_no_merging.tif differ diff --git a/tests/data/ref_output/dsm_end2end_ventoux_with_classif.tif b/tests/data/ref_output/dsm_end2end_ventoux_with_classif.tif index 823ba19e..8b73f94a 100644 Binary files a/tests/data/ref_output/dsm_end2end_ventoux_with_classif.tif and b/tests/data/ref_output/dsm_end2end_ventoux_with_classif.tif differ diff --git a/tests/data/ref_output/dsm_end2end_ventoux_with_color.tif b/tests/data/ref_output/dsm_end2end_ventoux_with_color.tif index 75b7fa66..8b73f94a 100644 Binary files a/tests/data/ref_output/dsm_end2end_ventoux_with_color.tif and b/tests/data/ref_output/dsm_end2end_ventoux_with_color.tif differ diff --git a/tests/data/ref_output/dsm_end2end_ventoux_with_roi.tif b/tests/data/ref_output/dsm_end2end_ventoux_with_roi.tif index aeb754cb..f3765368 100644 Binary files a/tests/data/ref_output/dsm_end2end_ventoux_with_roi.tif and b/tests/data/ref_output/dsm_end2end_ventoux_with_roi.tif differ diff --git a/tests/data/ref_output/dsm_end2end_ventoux_with_snap_to_img1.tif b/tests/data/ref_output/dsm_end2end_ventoux_with_snap_to_img1.tif index dfebdf68..79fd5ac8 100644 Binary files a/tests/data/ref_output/dsm_end2end_ventoux_with_snap_to_img1.tif and b/tests/data/ref_output/dsm_end2end_ventoux_with_snap_to_img1.tif differ diff --git a/tests/data/ref_output/dsm_mean_end2end_ventoux_quality_stats.tif b/tests/data/ref_output/dsm_mean_end2end_ventoux_quality_stats.tif index fee2bbda..2392f7aa 100644 Binary files a/tests/data/ref_output/dsm_mean_end2end_ventoux_quality_stats.tif and b/tests/data/ref_output/dsm_mean_end2end_ventoux_quality_stats.tif differ diff --git a/tests/data/ref_output/dsm_n_pts_end2end_ventoux_quality_stats.tif b/tests/data/ref_output/dsm_n_pts_end2end_ventoux_quality_stats.tif index 21917a52..b079daec 100644 Binary files a/tests/data/ref_output/dsm_n_pts_end2end_ventoux_quality_stats.tif and b/tests/data/ref_output/dsm_n_pts_end2end_ventoux_quality_stats.tif differ diff --git a/tests/data/ref_output/dsm_pts_in_cell_end2end_ventoux_quality_stats.tif b/tests/data/ref_output/dsm_pts_in_cell_end2end_ventoux_quality_stats.tif index 9d398eeb..4c23d9c9 100644 Binary files a/tests/data/ref_output/dsm_pts_in_cell_end2end_ventoux_quality_stats.tif and b/tests/data/ref_output/dsm_pts_in_cell_end2end_ventoux_quality_stats.tif differ diff --git a/tests/data/ref_output/dsm_std_end2end_ventoux_quality_stats.tif b/tests/data/ref_output/dsm_std_end2end_ventoux_quality_stats.tif index 3446cb55..dca0f679 100644 Binary files a/tests/data/ref_output/dsm_std_end2end_ventoux_quality_stats.tif and b/tests/data/ref_output/dsm_std_end2end_ventoux_quality_stats.tif differ diff --git a/tests/data/ref_output/epi_pc_X_end2end_ventoux_no_elevation.tif b/tests/data/ref_output/epi_pc_X_end2end_ventoux_no_elevation.tif index 42e10d31..ed21338b 100644 Binary files a/tests/data/ref_output/epi_pc_X_end2end_ventoux_no_elevation.tif and b/tests/data/ref_output/epi_pc_X_end2end_ventoux_no_elevation.tif differ diff --git a/tests/data/ref_output/epi_pc_Y_end2end_ventoux_no_elevation.tif b/tests/data/ref_output/epi_pc_Y_end2end_ventoux_no_elevation.tif index 3f901991..cc9fe657 100644 Binary files a/tests/data/ref_output/epi_pc_Y_end2end_ventoux_no_elevation.tif and b/tests/data/ref_output/epi_pc_Y_end2end_ventoux_no_elevation.tif differ diff --git a/tests/data/ref_output/epi_pc_Z_end2end_ventoux_no_elevation.tif b/tests/data/ref_output/epi_pc_Z_end2end_ventoux_no_elevation.tif index 7c8ef3a1..88d9b461 100644 Binary files a/tests/data/ref_output/epi_pc_Z_end2end_ventoux_no_elevation.tif and b/tests/data/ref_output/epi_pc_Z_end2end_ventoux_no_elevation.tif differ diff --git a/tests/data/ref_output/epi_pc_classification_end2end_ventoux_no_elevation.tif b/tests/data/ref_output/epi_pc_classification_end2end_ventoux_no_elevation.tif index aadac11f..ee6e6d7d 100644 Binary files a/tests/data/ref_output/epi_pc_classification_end2end_ventoux_no_elevation.tif and b/tests/data/ref_output/epi_pc_classification_end2end_ventoux_no_elevation.tif differ diff --git a/tests/data/ref_output/epi_pc_color_end2end_ventoux_no_elevation.tif b/tests/data/ref_output/epi_pc_color_end2end_ventoux_no_elevation.tif index 262571b6..264778d3 100644 Binary files a/tests/data/ref_output/epi_pc_color_end2end_ventoux_no_elevation.tif and b/tests/data/ref_output/epi_pc_color_end2end_ventoux_no_elevation.tif differ diff --git a/tests/data/ref_output/filling_end2end_gizeh_fill.tif b/tests/data/ref_output/filling_end2end_gizeh_fill.tif index c2e50095..8ca0eddf 100644 Binary files a/tests/data/ref_output/filling_end2end_gizeh_fill.tif and b/tests/data/ref_output/filling_end2end_gizeh_fill.tif differ diff --git a/tests/data/ref_output/filling_end2end_gizeh_fill_with_zero.tif b/tests/data/ref_output/filling_end2end_gizeh_fill_with_zero.tif index 7b216c5b..ce3d95f4 100644 Binary files a/tests/data/ref_output/filling_end2end_gizeh_fill_with_zero.tif and b/tests/data/ref_output/filling_end2end_gizeh_fill_with_zero.tif differ diff --git a/tests/data/ref_output/filling_end2end_ventoux_no_elevation.tif b/tests/data/ref_output/filling_end2end_ventoux_no_elevation.tif index e6cb141b..dd0ff0e9 100644 Binary files a/tests/data/ref_output/filling_end2end_ventoux_no_elevation.tif and b/tests/data/ref_output/filling_end2end_ventoux_no_elevation.tif differ diff --git a/tests/data/ref_output/filling_end2end_ventoux_split.tif b/tests/data/ref_output/filling_end2end_ventoux_split.tif index 6cf1c84b..375d9ec7 100644 Binary files a/tests/data/ref_output/filling_end2end_ventoux_split.tif and b/tests/data/ref_output/filling_end2end_ventoux_split.tif differ diff --git a/tests/data/ref_output/filling_end2end_ventoux_split_no_merging.tif b/tests/data/ref_output/filling_end2end_ventoux_split_no_merging.tif index 9829eeeb..72edc6aa 100644 Binary files a/tests/data/ref_output/filling_end2end_ventoux_split_no_merging.tif and b/tests/data/ref_output/filling_end2end_ventoux_split_no_merging.tif differ diff --git a/tests/data/ref_output/left_grid.nc b/tests/data/ref_output/left_grid.nc index 4424ef63..e050a059 100644 Binary files a/tests/data/ref_output/left_grid.nc and b/tests/data/ref_output/left_grid.nc differ diff --git a/tests/data/ref_output/left_grid_default_alt.nc b/tests/data/ref_output/left_grid_default_alt.nc index 2a05d102..23a7f520 100644 Binary files a/tests/data/ref_output/left_grid_default_alt.nc and b/tests/data/ref_output/left_grid_default_alt.nc differ diff --git a/tests/data/ref_output/mask_end2end_gizeh_crop_no_merging.tif b/tests/data/ref_output/mask_end2end_gizeh_crop_no_merging.tif index a6d48021..cab01529 100644 Binary files a/tests/data/ref_output/mask_end2end_gizeh_crop_no_merging.tif and b/tests/data/ref_output/mask_end2end_gizeh_crop_no_merging.tif differ diff --git a/tests/data/ref_output/mask_end2end_gizeh_fill.tif b/tests/data/ref_output/mask_end2end_gizeh_fill.tif index 80b01d12..51cec079 100644 Binary files a/tests/data/ref_output/mask_end2end_gizeh_fill.tif and b/tests/data/ref_output/mask_end2end_gizeh_fill.tif differ diff --git a/tests/data/ref_output/mask_end2end_gizeh_fill_with_zero.tif b/tests/data/ref_output/mask_end2end_gizeh_fill_with_zero.tif index 764a88d3..f9f02b57 100644 Binary files a/tests/data/ref_output/mask_end2end_gizeh_fill_with_zero.tif and b/tests/data/ref_output/mask_end2end_gizeh_fill_with_zero.tif differ diff --git a/tests/data/ref_output/mask_end2end_paca_bulldozer.tif b/tests/data/ref_output/mask_end2end_paca_bulldozer.tif index ea0eedb5..3f029fca 100644 Binary files a/tests/data/ref_output/mask_end2end_paca_bulldozer.tif and b/tests/data/ref_output/mask_end2end_paca_bulldozer.tif differ diff --git a/tests/data/ref_output/mask_end2end_paca_matches_filling.tif b/tests/data/ref_output/mask_end2end_paca_matches_filling.tif index d17b4f9c..0f96fdc1 100644 Binary files a/tests/data/ref_output/mask_end2end_paca_matches_filling.tif and b/tests/data/ref_output/mask_end2end_paca_matches_filling.tif differ diff --git a/tests/data/ref_output/mask_end2end_ventoux_no_elevation.tif b/tests/data/ref_output/mask_end2end_ventoux_no_elevation.tif index 6026dab3..170d8414 100644 Binary files a/tests/data/ref_output/mask_end2end_ventoux_no_elevation.tif and b/tests/data/ref_output/mask_end2end_ventoux_no_elevation.tif differ diff --git a/tests/data/ref_output/performance_map_end2end_gizeh_crop_no_merging.tif b/tests/data/ref_output/performance_map_end2end_gizeh_crop_no_merging.tif index 7c079b55..59a18947 100644 Binary files a/tests/data/ref_output/performance_map_end2end_gizeh_crop_no_merging.tif and b/tests/data/ref_output/performance_map_end2end_gizeh_crop_no_merging.tif differ diff --git a/tests/data/ref_output/performance_map_end2end_ventoux_split.tif b/tests/data/ref_output/performance_map_end2end_ventoux_split.tif index 2b1b0992..88d05d31 100644 Binary files a/tests/data/ref_output/performance_map_end2end_ventoux_split.tif and b/tests/data/ref_output/performance_map_end2end_ventoux_split.tif differ diff --git a/tests/data/ref_output/performance_map_end2end_ventoux_split_no_merging.tif b/tests/data/ref_output/performance_map_end2end_ventoux_split_no_merging.tif index 669e05f3..55097b9d 100644 Binary files a/tests/data/ref_output/performance_map_end2end_ventoux_split_no_merging.tif and b/tests/data/ref_output/performance_map_end2end_ventoux_split_no_merging.tif differ diff --git a/tests/data/ref_output/phased_dsm_end2end_ventoux_fusion.tif b/tests/data/ref_output/phased_dsm_end2end_ventoux_fusion.tif index 6700e411..129d2594 100644 Binary files a/tests/data/ref_output/phased_dsm_end2end_ventoux_fusion.tif and b/tests/data/ref_output/phased_dsm_end2end_ventoux_fusion.tif differ diff --git a/tests/data/ref_output/phased_dsm_end2end_ventoux_lr.tif b/tests/data/ref_output/phased_dsm_end2end_ventoux_lr.tif index d2073d65..cdb60ff6 100644 Binary files a/tests/data/ref_output/phased_dsm_end2end_ventoux_lr.tif and b/tests/data/ref_output/phased_dsm_end2end_ventoux_lr.tif differ diff --git a/tests/data/ref_output/phased_dsm_end2end_ventoux_rl.tif b/tests/data/ref_output/phased_dsm_end2end_ventoux_rl.tif index 6700e411..129d2594 100644 Binary files a/tests/data/ref_output/phased_dsm_end2end_ventoux_rl.tif and b/tests/data/ref_output/phased_dsm_end2end_ventoux_rl.tif differ diff --git a/tests/data/ref_output/right_grid.nc b/tests/data/ref_output/right_grid.nc index 1b030d1f..1a3f12cb 100644 Binary files a/tests/data/ref_output/right_grid.nc and b/tests/data/ref_output/right_grid.nc differ diff --git a/tests/data/ref_output/right_grid_default_alt.nc b/tests/data/ref_output/right_grid_default_alt.nc index 480cf44c..827198b1 100644 Binary files a/tests/data/ref_output/right_grid_default_alt.nc and b/tests/data/ref_output/right_grid_default_alt.nc differ diff --git a/tests/data/ref_output/source_pc_end2end_ventoux_split_4326.tif b/tests/data/ref_output/source_pc_end2end_ventoux_split_4326.tif index 72076e3d..151b389a 100644 Binary files a/tests/data/ref_output/source_pc_end2end_ventoux_split_4326.tif and b/tests/data/ref_output/source_pc_end2end_ventoux_split_4326.tif differ diff --git a/tests/data/ref_output/triangulation1_ref.nc b/tests/data/ref_output/triangulation1_ref.nc index 43f67481..e53da4ba 100755 Binary files a/tests/data/ref_output/triangulation1_ref.nc and b/tests/data/ref_output/triangulation1_ref.nc differ diff --git a/tests/data/ref_output/triangulation1_ref_intervals.nc b/tests/data/ref_output/triangulation1_ref_intervals.nc index ee17b79d..e0332e95 100644 Binary files a/tests/data/ref_output/triangulation1_ref_intervals.nc and b/tests/data/ref_output/triangulation1_ref_intervals.nc differ diff --git a/tests/data/ref_output/weights_end2end_ventoux_lr.tif b/tests/data/ref_output/weights_end2end_ventoux_lr.tif index ad377d76..9b716398 100644 Binary files a/tests/data/ref_output/weights_end2end_ventoux_lr.tif and b/tests/data/ref_output/weights_end2end_ventoux_lr.tif differ diff --git a/tests/data/ref_output/weights_end2end_ventoux_rl.tif b/tests/data/ref_output/weights_end2end_ventoux_rl.tif index 6e28aa0d..c55e2f90 100644 Binary files a/tests/data/ref_output/weights_end2end_ventoux_rl.tif and b/tests/data/ref_output/weights_end2end_ventoux_rl.tif differ diff --git a/tests/data/ref_output_application/grid_generation/grid_generation_gizeh_ROI_ref_color_shareloc b/tests/data/ref_output_application/grid_generation/grid_generation_gizeh_ROI_ref_color_shareloc index 007f3e9d..a1c5e8ad 100644 Binary files a/tests/data/ref_output_application/grid_generation/grid_generation_gizeh_ROI_ref_color_shareloc and b/tests/data/ref_output_application/grid_generation/grid_generation_gizeh_ROI_ref_color_shareloc differ diff --git a/tests/data/ref_output_application/grid_generation/grid_generation_gizeh_ROI_ref_no_color_shareloc b/tests/data/ref_output_application/grid_generation/grid_generation_gizeh_ROI_ref_no_color_shareloc index 41117e96..ced4eda6 100644 Binary files a/tests/data/ref_output_application/grid_generation/grid_generation_gizeh_ROI_ref_no_color_shareloc and b/tests/data/ref_output_application/grid_generation/grid_generation_gizeh_ROI_ref_no_color_shareloc differ diff --git a/tests/data/ref_output_application/ground_truth_reprojection/ref_epipolar_disp_ground_truth_left.tif b/tests/data/ref_output_application/ground_truth_reprojection/ref_epipolar_disp_ground_truth_left.tif index 604eea5b..03935bba 100644 Binary files a/tests/data/ref_output_application/ground_truth_reprojection/ref_epipolar_disp_ground_truth_left.tif and b/tests/data/ref_output_application/ground_truth_reprojection/ref_epipolar_disp_ground_truth_left.tif differ diff --git a/tests/data/ref_output_application/ground_truth_reprojection/ref_epipolar_disp_ground_truth_right.tif b/tests/data/ref_output_application/ground_truth_reprojection/ref_epipolar_disp_ground_truth_right.tif index 81e1f26f..4344eab3 100644 Binary files a/tests/data/ref_output_application/ground_truth_reprojection/ref_epipolar_disp_ground_truth_right.tif and b/tests/data/ref_output_application/ground_truth_reprojection/ref_epipolar_disp_ground_truth_right.tif differ diff --git a/tests/helpers.py b/tests/helpers.py index 5cfd3aa8..e93e44fc 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -151,17 +151,20 @@ def get_geoid_path(): return os.path.join(cars_path(), "cars/conf/geoid/egm96.grd") -def get_geometry_plugin(dem=None, default_alt=None) -> AbstractGeometry: +def get_geometry_plugin( + conf="SharelocGeometry", dem=None, default_alt=None +) -> AbstractGeometry: """ returns the default Shareloc geometry plugin for test + :param conf: conf to use :param dem: if defined, dem to use in AbstractGeometry object returned :param default_alt: default alt optional used in Abstractgeometry returned :return: AbstractGeometry object to use in tests """ return AbstractGeometry( # pylint: disable=abstract-class-instantiated - "SharelocGeometry", + conf, dem=dem, geoid=get_geoid_path(), default_alt=default_alt, diff --git a/tests/pipelines/test_wrappers.py b/tests/pipelines/test_wrappers.py index 320ef435..3033d528 100644 --- a/tests/pipelines/test_wrappers.py +++ b/tests/pipelines/test_wrappers.py @@ -197,7 +197,9 @@ def test_epipolar_pipeline( geomodel2, grid1, grid2, - get_geometry_plugin(), + get_geometry_plugin( + conf={"plugin_name": "SharelocGeometry", "interpolator": "linear"} + ), 32636, ) diff --git a/tests/test_end2end.py b/tests/test_end2end.py index 3779504d..5e11d68b 100644 --- a/tests/test_end2end.py +++ b/tests/test_end2end.py @@ -4564,11 +4564,11 @@ def test_end2end_ventoux_egm96_geoid(): "left_right" ] # global_disp_min -21 shareloc - assert out_disp_compute["global_disp_min"] > -68 - assert out_disp_compute["global_disp_min"] < -66 + assert out_disp_compute["global_disp_min"] > -62 + assert out_disp_compute["global_disp_min"] < -61 # global max: 86 shareloc - assert out_disp_compute["global_disp_max"] > 45 - assert out_disp_compute["global_disp_max"] < 46 + assert out_disp_compute["global_disp_max"] > 43 + assert out_disp_compute["global_disp_max"] < 45 # Ref output dir dependent from geometry plugin chosen ref_output_dir = "ref_output" @@ -4792,11 +4792,11 @@ def test_end2end_ventoux_egm96_geoid(): "left_right" ] # global_disp_min -21 shareloc - assert out_disp_compute["global_disp_min"] > -68 - assert out_disp_compute["global_disp_min"] < -66 + assert out_disp_compute["global_disp_min"] > -63 + assert out_disp_compute["global_disp_min"] < -61 # global max: 86 shareloc - assert out_disp_compute["global_disp_max"] > 45 - assert out_disp_compute["global_disp_max"] < 46 + assert out_disp_compute["global_disp_max"] > 43 + assert out_disp_compute["global_disp_max"] < 45 # Ref output dir dependent from geometry plugin chosen ref_output_dir = "ref_output" diff --git a/tutorials/sensor_to_dense_dsm_matching_methods_comparison.ipynb b/tutorials/sensor_to_dense_dsm_matching_methods_comparison.ipynb index a0bd452f..dfa4c1d8 100644 --- a/tutorials/sensor_to_dense_dsm_matching_methods_comparison.ipynb +++ b/tutorials/sensor_to_dense_dsm_matching_methods_comparison.ipynb @@ -70,7 +70,6 @@ "from cars.pipelines.pipeline_constants import GEOMETRY_PLUGIN\n", "\n", "# Conf, core, orchestrator\n", - "from cars.core.geometry.abstract_geometry import AbstractGeometry\n", "from cars.core import cars_logging\n", "from cars.core import inputs, preprocessing\n", "from cars.core.utils import safe_makedirs\n", @@ -556,7 +555,7 @@ " # Correct grids with former matches\n", " # Transform matches to new grids\n", " new_grid_matches_array = (\n", - " AbstractGeometry.transform_matches_from_grids(\n", + " geom_plugin_without_dem_and_geoid.transform_matches_from_grids(\n", " corrected_matches_array,\n", " grid_left,\n", " corrected_grid_right,\n", @@ -1377,7 +1376,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.14" + "version": "3.10.12" }, "vscode": { "interpreter": { diff --git a/tutorials/sensor_to_dense_dsm_step_by_step.ipynb b/tutorials/sensor_to_dense_dsm_step_by_step.ipynb index fe1ab23d..105175b3 100644 --- a/tutorials/sensor_to_dense_dsm_step_by_step.ipynb +++ b/tutorials/sensor_to_dense_dsm_step_by_step.ipynb @@ -64,7 +64,6 @@ "from cars.pipelines.pipeline_constants import GEOMETRY_PLUGIN\n", "\n", "# Conf, core, orchestrator\n", - "from cars.core.geometry.abstract_geometry import AbstractGeometry\n", "from cars.core import cars_logging\n", "from cars.core import inputs, preprocessing\n", "from cars.core.utils import safe_makedirs\n", @@ -748,7 +747,7 @@ " # Correct grids with former matches\n", " # Transform matches to new grids\n", " new_grid_matches_array = (\n", - " AbstractGeometry.transform_matches_from_grids(\n", + " geom_plugin_without_dem_and_geoid.transform_matches_from_grids(\n", " corrected_matches_array,\n", " grid_left,\n", " corrected_grid_right,\n", @@ -1277,7 +1276,7 @@ ], "metadata": { "kernelspec": { - "display_name": "cars_env", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -1291,7 +1290,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.14" + "version": "3.10.12" } }, "nbformat": 4, diff --git a/tutorials/sensor_to_dsm_from_a_priori.ipynb b/tutorials/sensor_to_dsm_from_a_priori.ipynb index 2c2734d0..a031a84c 100644 --- a/tutorials/sensor_to_dsm_from_a_priori.ipynb +++ b/tutorials/sensor_to_dsm_from_a_priori.ipynb @@ -1184,7 +1184,7 @@ ], "metadata": { "kernelspec": { - "display_name": "cars-0.7.7", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -1198,7 +1198,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.14" + "version": "3.10.12" } }, "nbformat": 4,