diff --git a/cars/applications/dense_matching/census_mccnn_sgm.py b/cars/applications/dense_matching/census_mccnn_sgm.py index 41820dcc..7c20b620 100644 --- a/cars/applications/dense_matching/census_mccnn_sgm.py +++ b/cars/applications/dense_matching/census_mccnn_sgm.py @@ -33,11 +33,14 @@ # Third party imports import affine import numpy as np +import pandora import rasterio import xarray as xr from affine import Affine from json_checker import And, Checker, Or +from pandora.check_configuration import check_pipeline_section from pandora.img_tools import add_global_disparity +from pandora.state_machine import PandoraMachine from scipy.ndimage import generic_filter import cars.applications.dense_matching.dense_matching_constants as dm_cst @@ -225,6 +228,27 @@ def check_conf(self, conf): self.loader = pandora_loader self.corr_config = collections.OrderedDict(pandora_loader.get_conf()) + # Instantiate margins from pandora check conf + # create the dataset + fake_dataset = xr.Dataset( + data_vars={}, + coords={ + "band_im": [(None)], + "row": np.arange(10), + "col": np.arange(10), + }, + attrs={"disparity_source": [-1, 1]}, + ) + # Import plugins before checking configuration + pandora.import_plugin() + pandora_machine = PandoraMachine() + corr_config_pipeline = {"pipeline": dict(self.corr_config["pipeline"])} + + _ = check_pipeline_section( + corr_config_pipeline, fake_dataset, fake_dataset, pandora_machine + ) + self.margins = pandora_machine.margins.global_margins + overloaded_conf["loader_conf"] = self.corr_config application_schema = { @@ -299,7 +323,7 @@ def get_margins_fun(self, grid_left, disp_range_grid): matching method, to use during resampling :param grid_left: left epipolar grid - :param disp_min_grid: minimum and maximum disparity grid + :param disp_range_grid: minimum and maximum disparity grid :return: function that generates margin for given roi """ @@ -408,8 +432,8 @@ def margins_wrapper(row_min, row_max, col_min, col_max): disp_max = int(math.ceil(disp_max)) # Compute margins for the correlator - # TODO use loader correlators - margins = dm_tools.get_margins(disp_min, disp_max, self.corr_config) + margins = dm_tools.get_margins(self.margins, disp_min, disp_max) + return margins return margins_wrapper diff --git a/cars/applications/dense_matching/dense_matching.py b/cars/applications/dense_matching/dense_matching.py index bf6c6450..9e475ff4 100644 --- a/cars/applications/dense_matching/dense_matching.py +++ b/cars/applications/dense_matching/dense_matching.py @@ -106,14 +106,13 @@ def get_optimal_tile_size(self, disp_range_grid, max_ram_per_worker): """ @abstractmethod - def get_margins_fun(self, grid_left, disp_min_grid, disp_max_grid): + def get_margins_fun(self, grid_left, disp_range_grid): """ Get Margins function that generates margins needed by matching method, to use during resampling :param grid_left: left epipolar grid - :param disp_min_grid: minimum disparity grid - :param disp_max_grid: maximum disparity grid + :param disp_range_grid: minimum and maximum disparity grid :return: function that generates margin for given roi """ diff --git a/cars/applications/dense_matching/dense_matching_tools.py b/cars/applications/dense_matching/dense_matching_tools.py index c2515b24..6b44e3d2 100644 --- a/cars/applications/dense_matching/dense_matching_tools.py +++ b/cars/applications/dense_matching/dense_matching_tools.py @@ -30,7 +30,6 @@ import numpy as np import pandora -import pandora.marge import xarray as xr # Third party imports @@ -55,19 +54,54 @@ from cars.core import constants_disparity as cst_disp -def get_margins(disp_min, disp_max, corr_cfg): +def get_margins(margin, disp_min, disp_max): """ Get margins for the dense matching steps + :param margin: margins object + :type margin: Margins :param disp_min: Minimum disparity :type disp_min: int :param disp_max: Maximum disparity :type disp_max: int - :param corr_cfg: Correlator configuration - :type corr_cfg: dict :return: margins of the matching algorithm used """ - return pandora.marge.get_margins(disp_min, disp_max, corr_cfg["pipeline"]) + + corner = ["left", "up", "right", "down"] + col = np.arange(len(corner)) + + left_margins = [ + margin.left + disp_max, + margin.up, + margin.right - disp_min, + margin.down, + ] + right_margins = [ + margin.left - disp_min, + margin.up, + margin.right + disp_max, + margin.down, + ] + same_margins = [ + max(left, right) + for left, right in zip(left_margins, right_margins, strict=True) + ] + + margins = xr.Dataset( + { + "left_margin": ( + ["col"], + same_margins, + ) + }, + coords={"col": col}, + ) + margins["right_margin"] = xr.DataArray(same_margins, dims=["col"]) + + margins.attrs["disp_min"] = disp_min + margins.attrs["disp_max"] = disp_max + + return margins def get_masks_from_pandora( diff --git a/cars/pipelines/default/default_pipeline.py b/cars/pipelines/default/default_pipeline.py index 222d5974..fd9d3497 100644 --- a/cars/pipelines/default/default_pipeline.py +++ b/cars/pipelines/default/default_pipeline.py @@ -1639,7 +1639,8 @@ def sensor_to_depth_maps(self): # noqa: C901 # Get margins used in dense matching, dense_matching_margins_fun = ( self.dense_matching_app.get_margins_fun( - self.pairs[pair_key]["corrected_grid_left"], disp_range_grid + self.pairs[pair_key]["corrected_grid_left"], + disp_range_grid, ) ) diff --git a/tests/applications/dense_matching/test_dense_matching_config.py b/tests/applications/dense_matching/test_dense_matching_config.py index 6abbf02d..928b72a4 100644 --- a/tests/applications/dense_matching/test_dense_matching_config.py +++ b/tests/applications/dense_matching/test_dense_matching_config.py @@ -146,7 +146,17 @@ def test_check_conf_with_error( "min_elevation_offset": 20, "max_elevation_offset": max_offset, # should be > min "generate_confidence_intervals": confidence_intervals, - "loader_conf": {"pipeline": {"disparity": {}}}, + "loader_conf": { + "input": {}, + "pipeline": { + "matching_cost": { + "matching_cost_method": "census", + "window_size": 5, + "subpix": 1, + }, + "disparity": {"disparity_method": "wta"}, + }, + }, } with pytest.raises(expected_error): _ = CensusMccnnSgm(conf) 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 7cddaddb..f224315e 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/cloud1_ref_pandora b/tests/data/ref_output/cloud1_ref_pandora index 66bc9faf..6e026e60 100644 Binary files a/tests/data/ref_output/cloud1_ref_pandora and b/tests/data/ref_output/cloud1_ref_pandora differ diff --git a/tests/data/ref_output/color_end2end_gizeh_fill.tif b/tests/data/ref_output/color_end2end_gizeh_fill.tif index 0131c69b..9309a948 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_paca_aux_filling.tif b/tests/data/ref_output/color_end2end_paca_aux_filling.tif index f9c7e21a..eb7d1303 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_1.tif b/tests/data/ref_output/color_end2end_paca_aux_filling_1.tif index f9c7e21a..eb7d1303 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_matches_filling.tif b/tests/data/ref_output/color_end2end_paca_matches_filling.tif index e7a97c26..3bb2c4b8 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 5bdc7e32..7c6b942a 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 5bdc7e32..7c6b942a 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 57016509..c4e02e16 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_no_elevation.tif b/tests/data/ref_output/color_end2end_ventoux_no_elevation.tif index e375090a..f6300235 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 c1814742..d11da03b 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 5496e966..a3faa31a 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_with_color.tif b/tests/data/ref_output/color_end2end_ventoux_with_color.tif index 1976a521..11ec96ff 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_snap_to_img1.tif b/tests/data/ref_output/color_end2end_ventoux_with_snap_to_img1.tif index b4ff8bc1..866a03c0 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/confidence_from_ambiguity1_end2end_ventoux_split.tif b/tests/data/ref_output/confidence_from_ambiguity1_end2end_ventoux_split.tif index 59f81b94..11274151 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 bbd16850..fb29f0a3 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 c00f0410..89c375b1 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 53557826..deebe4f5 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 faaca226..d2511400 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 d49eceb9..85c5528c 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 9b1473fb..0407a689 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 2d149136..827ba3b8 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 2d149136..827ba3b8 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 8ce60c8d..cb1dc914 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 4ef0fcda..69a84697 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 d2d3de6e..9ee04f47 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 3b1912ce..945f0663 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 761b8e69..dc2b94e9 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/dsm_end2end_gizeh_fill.tif b/tests/data/ref_output/dsm_end2end_gizeh_fill.tif index 55bbb900..d184189d 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_paca_bulldozer.tif b/tests/data/ref_output/dsm_end2end_paca_bulldozer.tif index 577821b5..22b326f7 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 fb45e2f2..f2e29be9 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 1fd4b1ba..823ba19e 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 3a607016..e203648e 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 fb74949b..c6c65fa1 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 90ec5b4c..5a0ccd34 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 7a74fbec..7bc9f223 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 a3aa2268..8acb7e2f 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_with_classif.tif b/tests/data/ref_output/dsm_end2end_ventoux_with_classif.tif index 1fd4b1ba..823ba19e 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 1fd4b1ba..823ba19e 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_snap_to_img1.tif b/tests/data/ref_output/dsm_end2end_ventoux_with_snap_to_img1.tif index 1b0c7019..dfebdf68 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 8ca0b9c5..fee2bbda 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 e63e2ddf..21917a52 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 5cb3c6bf..9d398eeb 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 63bcff55..3446cb55 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 1b73f600..42e10d31 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 3c5d75e7..3f901991 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 3e42d0c1..7c8ef3a1 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/filling_end2end_gizeh_fill.tif b/tests/data/ref_output/filling_end2end_gizeh_fill.tif index db38ad6a..c2e50095 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_ventoux_no_elevation.tif b/tests/data/ref_output/filling_end2end_ventoux_no_elevation.tif index 95e5cb73..e6cb141b 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/mask_end2end_gizeh_fill.tif b/tests/data/ref_output/mask_end2end_gizeh_fill.tif index 6812f598..80b01d12 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_paca_bulldozer.tif b/tests/data/ref_output/mask_end2end_paca_bulldozer.tif index 9ff18e67..42ba0b40 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 d8256ece..ae201af7 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 d3b37fce..6026dab3 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_ventoux_split.tif b/tests/data/ref_output/performance_map_end2end_ventoux_split.tif index d5db0380..0b5d87d8 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 5a2d450f..2dd3fa87 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/pipelines/test_wrappers.py b/tests/pipelines/test_wrappers.py index 7270be00..320ef435 100644 --- a/tests/pipelines/test_wrappers.py +++ b/tests/pipelines/test_wrappers.py @@ -29,6 +29,7 @@ # Third party imports import pytest from pandora.img_tools import get_metadata +from pandora.margins import Margins # CARS imports import cars.applications.dense_matching.dense_matching_tools as dense_match @@ -111,8 +112,11 @@ def test_epipolar_pipeline( global_disp_min = -19 global_disp_max = 15 + # cumulative margins between sgm (40) and matching_cost (ws/2) + margins = Margins(42, 42, 42, 42) + initial_margins = dense_match.get_margins( - global_disp_min, global_disp_max, corr_cfg + margins, global_disp_min, global_disp_max ) pandora_margins = initial_margins["left_margin"].values