diff --git a/cars/applications/dense_matching/census_mccnn_sgm.py b/cars/applications/dense_matching/census_mccnn_sgm.py index 3630d8de..42aa346f 100644 --- a/cars/applications/dense_matching/census_mccnn_sgm.py +++ b/cars/applications/dense_matching/census_mccnn_sgm.py @@ -704,7 +704,7 @@ def generate_disparity_grids( # noqa: C901 dem_max, lon_mean, lat_mean, points_cloud_conversion ) - # sensors positions as index + # sensors physical positions ( ind_cols_sensor, ind_rows_sensor, diff --git a/cars/applications/grid_generation/grid_correction.py b/cars/applications/grid_generation/grid_correction.py index e1b00d5f..716fec1d 100644 --- a/cars/applications/grid_generation/grid_correction.py +++ b/cars/applications/grid_generation/grid_correction.py @@ -218,23 +218,21 @@ def estimate_right_grid_correction( spacing = grid_right.attributes["grid_spacing"] # Form 3D array with grid positions - x_values_1d = np.linspace( + x_values_1d = np.arange( origin[0], origin[0] + right_grid.shape[0] * spacing[0], - right_grid.shape[0], + spacing[0], ) - y_values_1d = np.linspace( + y_values_1d = np.arange( origin[1], origin[1] + right_grid.shape[1] * spacing[1], - right_grid.shape[1], + spacing[1], ) x_values_2d, y_values_2d = np.meshgrid(y_values_1d, x_values_1d) # Compute corresponding point in sensor geometry (grid encodes (x_sensor - # x_epi,y_sensor - y__epi) source_points = right_grid - source_points[:, :, 0] += x_values_2d - source_points[:, :, 1] += y_values_2d # Extract matches for convenience matches_y1 = matches[:, 1] diff --git a/cars/applications/resampling/resampling_tools.py b/cars/applications/resampling/resampling_tools.py index 1676709a..41672ac0 100644 --- a/cars/applications/resampling/resampling_tools.py +++ b/cars/applications/resampling/resampling_tools.py @@ -23,8 +23,6 @@ contains functions used for epipolar resampling """ -import logging - # Standard imports import math @@ -32,13 +30,14 @@ import numpy as np import rasterio as rio import resample as cresample -from rasterio.windows import Window, bounds, from_bounds +from rasterio.windows import Window, bounds from cars.conf import mask_cst as msk_cst # CARS imports from cars.core import constants as cst from cars.core import datasets, inputs, tiling +from cars.core.geometry import abstract_geometry from cars.data_structures import cars_dataset @@ -261,6 +260,7 @@ def resample_image( # Localize blocks of the tile to resample if step is None: step = region[2] - region[0] + xmin_of_blocks = np.arange(region[0], region[2], step) xmax_of_blocks = np.append( np.arange(region[0] + step, region[2], step), region[2] @@ -300,24 +300,19 @@ def resample_image( grid_as_array = grid_as_array.astype(np.float32) grid_as_array = grid_as_array.astype(np.float64) - # deformation to localization - grid_as_array[0, ...] += np.arange( - oversampling * grid_region[0], - oversampling * (grid_region[2] + 1), - step=oversampling, - ) - grid_as_array[1, ...] += np.arange( - oversampling * grid_region[1], - oversampling * (grid_region[3] + 1), - step=oversampling, - ).T[..., np.newaxis] - # get needed source bounding box left = math.floor(np.amin(grid_as_array[0, ...])) right = math.ceil(np.amax(grid_as_array[0, ...])) top = math.floor(np.amin(grid_as_array[1, ...])) bottom = math.ceil(np.amax(grid_as_array[1, ...])) + # transform xmin and xmax positions to index + (top, bottom, left, right) = ( + abstract_geometry.min_max_to_index_min_max( + left, right, top, bottom, img_reader.transform + ) + ) + # filter margin for bicubic = 2 filter_margin = 2 top -= filter_margin @@ -325,32 +320,13 @@ def resample_image( left -= filter_margin right += filter_margin - # extract src according to grid values - transform = img_reader.transform - res_x = int(transform[0] / abs(transform[0])) - res_y = int(transform[4] / abs(transform[4])) - - (full_left, full_bottom, full_right, full_top) = img_reader.bounds - - left, right, top, bottom = ( - res_x * left, - res_x * right, - res_y * top, - res_y * bottom, - ) + left, right = list(np.clip([left, right], 0, img_reader.shape[0])) + top, bottom = list(np.clip([top, bottom], 0, img_reader.shape[1])) - full_bounds_window = from_bounds( - full_left, full_bottom, full_right, full_top, transform - ) - img_window = from_bounds(left, bottom, right, top, transform) + img_window = Window.from_slices([left, right], [top, bottom]) - # Crop window to be in image in_sensor = True - try: - img_window = img_window.intersection(full_bounds_window) - except rio.errors.WindowError: - # Window not in sensor image - logging.debug("Window not in sensor image") + if right - left == 0 or bottom - top == 0: in_sensor = False # round window @@ -358,16 +334,14 @@ def resample_image( img_window = img_window.round_lengths() # Compute offset - tile_bounds = bounds(img_window, transform) - tile_bounds_with_res = [ - res_x * tile_bounds[0], - res_y * tile_bounds[1], - res_x * tile_bounds[2], - res_y * tile_bounds[3], - ] + transform = img_reader.transform - x_offset = min(tile_bounds_with_res[0], tile_bounds_with_res[2]) - y_offset = min(tile_bounds_with_res[1], tile_bounds_with_res[3]) + res_x = float(abs(transform[0])) + res_y = float(abs(transform[4])) + tile_bounds = list(bounds(img_window, transform)) + + x_offset = min(tile_bounds[0], tile_bounds[2]) + y_offset = min(tile_bounds[1], tile_bounds[3]) if in_sensor: # Get sensor data @@ -377,6 +351,10 @@ def resample_image( grid_as_array[0, ...] -= x_offset grid_as_array[1, ...] -= y_offset + # apply input resolution + grid_as_array[0, ...] /= res_x + grid_as_array[1, ...] /= res_y + block_resamp = cresample.grid( img_as_array, grid_as_array, diff --git a/cars/core/geometry/abstract_geometry.py b/cars/core/geometry/abstract_geometry.py index b0801472..36322c9f 100644 --- a/cars/core/geometry/abstract_geometry.py +++ b/cars/core/geometry/abstract_geometry.py @@ -32,6 +32,7 @@ from scipy import interpolate from scipy.interpolate import LinearNDInterpolator from shapely.geometry import Polygon +from shareloc import proj_utils from cars.core import constants as cst from cars.core import constants_disparity as cst_disp @@ -363,11 +364,8 @@ def sensor_position_from_grid( # create regular grid points positions points = (cols, rows) - grid_row, grid_col = np.mgrid[ - ori_row:last_row:step_row, ori_col:last_col:step_col - ] - sensor_row_positions = row_dep + grid_row - sensor_col_positions = col_dep + grid_col + sensor_row_positions = row_dep + sensor_col_positions = col_dep # interpolate sensor positions interp_row = interpolate.interpn( @@ -644,3 +642,75 @@ def image_envelope(self, sensor, geomodel, shp=None): outputs.write_vector([poly_bb], shp, 4326, driver="ESRI Shapefile") return u_l, u_r, l_l, l_r + + +def min_max_to_physical_min_max(xmin, xmax, ymin, ymax, transform): + """ + Transform min max index to position min max + + :param xmin: xmin + :type xmin: int + :param xmax: xmax + :type xmax: int + :param ymin: ymin + :type ymin: int + :param ymax: ymax + :type ymax: int + :param transform: transform + :type transform: Affine + + :return: xmin, xmax, ymin, ymax + :rtype: list(int) + """ + + cols_ind = np.array([xmin, xmin, xmax, xmax]) + rows_ind = np.array([ymin, ymax, ymin, ymax]) + + rows_pos, cols_pos = proj_utils.transform_index_to_physical_point( + transform, + rows_ind, + cols_ind, + ) + + return ( + np.min(cols_pos), + np.max(cols_pos), + np.min(rows_pos), + np.max(rows_pos), + ) + + +def min_max_to_index_min_max(xmin, xmax, ymin, ymax, transform): + """ + Transform min max position to index min max + + :param xmin: xmin + :type xmin: int + :param xmax: xmax + :type xmax: int + :param ymin: ymin + :type ymin: int + :param ymax: ymax + :type ymax: int + :param transform: transform + :type transform: Affine + + :return: xmin, xmax, ymin, ymax + :rtype: list(int) + """ + + cols_ind = np.array([xmin, xmin, xmax, xmax]) + rows_ind = np.array([ymin, ymax, ymin, ymax]) + + rows_pos, cols_pos = proj_utils.transform_physical_point_to_index( + ~transform, + rows_ind, + cols_ind, + ) + + return ( + np.min(cols_pos), + np.max(cols_pos), + np.min(rows_pos), + np.max(rows_pos), + ) diff --git a/cars/core/geometry/shareloc_geometry.py b/cars/core/geometry/shareloc_geometry.py index 0abdee5b..9f04d0da 100644 --- a/cars/core/geometry/shareloc_geometry.py +++ b/cars/core/geometry/shareloc_geometry.py @@ -25,7 +25,7 @@ import logging from typing import List, Tuple, Union -import bindings_cpp +import bindings_cpp # pylint: disable=E0401 import numpy as np import rasterio as rio import shareloc.geofunctions.rectification as rectif @@ -373,7 +373,6 @@ def generate_epipolar_grids( grid2, [epipolar_size_y, epipolar_size_x], alt_to_disp_ratio, - _, ) = rectif.compute_stereorectification_epipolar_grids( image1, shareloc_model1, @@ -388,21 +387,20 @@ def generate_epipolar_grids( grid1 = grid1[:, :, 0:2][:, :, ::-1] grid2 = grid2[:, :, 0:2][:, :, ::-1] - # compute associated characteristics + epipolar_size_x = int(np.floor(epipolar_size_x)) + epipolar_size_y = int(np.floor(epipolar_size_y)) + + origin = [0.0, 0.0] + spacing = [float(epipolar_step), float(epipolar_step)] + + # alt_to_disp_ratio does not consider image resolution with rio.open(sensor1, "r") as rio_dst: pixel_size_x, pixel_size_y = ( rio_dst.transform[0], rio_dst.transform[4], ) - mean_size = (abs(pixel_size_x) + abs(pixel_size_y)) / 2 - epipolar_size_x = int(np.floor(epipolar_size_x * mean_size)) - epipolar_size_y = int(np.floor(epipolar_size_y * mean_size)) - - origin = [0.0, 0.0] - spacing = [float(epipolar_step), float(epipolar_step)] - - disp_to_alt_ratio = 1 / alt_to_disp_ratio + disp_to_alt_ratio = mean_size / alt_to_disp_ratio return ( grid1, diff --git a/cars/pipelines/sensor_to_dense_dsm/sensor_to_dense_dsm_pipeline.py b/cars/pipelines/sensor_to_dense_dsm/sensor_to_dense_dsm_pipeline.py index 3162fdd4..e80ad2b4 100644 --- a/cars/pipelines/sensor_to_dense_dsm/sensor_to_dense_dsm_pipeline.py +++ b/cars/pipelines/sensor_to_dense_dsm/sensor_to_dense_dsm_pipeline.py @@ -731,7 +731,6 @@ def run(self): # noqa C901 pair_key=pair_key, orchestrator=cars_orchestrator, ) - # Correct grid right pairs[pair_key]["corrected_grid_right"] = ( grid_correction.correct_grid( diff --git a/docs/source/howto.rst b/docs/source/howto.rst index 70b16ccb..1c73097e 100644 --- a/docs/source/howto.rst +++ b/docs/source/howto.rst @@ -207,6 +207,46 @@ Any OTB application can be ran in docker docker run --entrypoint=/bin/bash cnes/cars otbcli_BandMath -help +.. _resample_image: + +Resample an image +======================== + +If you want to upscale or downscale the resolution of you input data, use rasterio: + +.. code-block:: python + + import rasterio + from rasterio.enums import Resampling + # Get data + upscale_factor = 0.5 + with rasterio.open("example.tif") as dataset: + # resample data to target shape + data = dataset.read( + out_shape=( + dataset.count, + int(dataset.height * upscale_factor), + int(dataset.width * upscale_factor) + ), + resampling=Resampling.bilinear + ) + # scale image transform + transform = dataset.transform * dataset.transform.scale( + (dataset.width / data.shape[-1]), + (dataset.height / data.shape[-2]) + ) + profile = dataset.profile + # Save data + profile.update( + width=data.shape[-1], + height=data.shape[-2], + transform=transform + ) + with rasterio.open('resampled_example.tif', 'w', **profile) as dst: + dst.write(data) + + + Use CARS with Pleiades images ... ======================================== diff --git a/setup.cfg b/setup.cfg index 1a0bd352..b01024e2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -81,7 +81,7 @@ install_requires = cars-rasterize==0.2.* cars-resample==0.1.* vlsift==0.1.* - shareloc==0.2.2 + shareloc==0.2.3 package_dir = . = cars diff --git a/tests/applications/grid_generation/test_grids.py b/tests/applications/grid_generation/test_grids.py index 86ca8875..ef596162 100644 --- a/tests/applications/grid_generation/test_grids.py +++ b/tests/applications/grid_generation/test_grids.py @@ -54,6 +54,30 @@ ) +def generate_grid_xr_dataset(grid_np): + """ + Transform numpy grid to dataset grid + """ + rows = np.arange(0, grid_np.shape[0]) + cols = np.arange(0, grid_np.shape[1]) + dataset_grid = xr.Dataset( + { + "x": xr.DataArray( + data=grid_np[:, :, 0], + dims=["row", "col"], + coords={"row": rows, "col": cols}, + ), + "y": xr.DataArray( + data=grid_np[:, :, 1], + dims=["row", "col"], + coords={"row": rows, "col": cols}, + ), + } + ) + + return dataset_grid + + @pytest.mark.unit_tests def test_correct_right_grid(): """ @@ -105,7 +129,7 @@ def test_correct_right_grid(): # Uncomment to update ref # np.save(absolute_data_path("ref_output/corrected_right_grid.npy"), - # corrected_grid) + # corrected_grid) corrected_grid_ref = np.load( absolute_data_path("ref_output/corrected_right_grid.npy") ) @@ -196,8 +220,8 @@ def test_generate_epipolar_grids_default_alt_shareloc(images_and_grids_conf): np.testing.assert_almost_equal(baseline, 1.420566289522033, decimal=10) # Uncomment to update baseline - # left_grid.to_netcdf(absolute_data_path( - # "ref_output/left_grid_default_alt.nc")) + # generate_grid_xr_dataset(left_grid).to_netcdf(absolute_data_path( + # "ref_output/left_grid_default_alt.nc")) left_grid_ref = xr.open_dataset( absolute_data_path("ref_output/left_grid_default_alt.nc") @@ -206,7 +230,7 @@ def test_generate_epipolar_grids_default_alt_shareloc(images_and_grids_conf): assert np.allclose(left_grid_ref["y"].values, left_grid[:, :, 1]) # Uncomment to update baseline - # right_grid.to_netcdf(absolute_data_path( + # generate_grid_xr_dataset(right_grid).to_netcdf(absolute_data_path( # "ref_output/right_grid_default_alt.nc")) right_grid_ref = xr.open_dataset( @@ -255,7 +279,8 @@ def test_generate_epipolar_grids_shareloc(images_and_grids_conf): np.testing.assert_almost_equal(baseline, 1.4205717708948564, decimal=10) # Uncomment to update baseline - # left_grid.to_netcdf(absolute_data_path("ref_output/left_grid.nc")) + # generate_grid_xr_dataset(left_grid).to_netcdf( + # absolute_data_path("ref_output/left_grid.nc")) left_grid_ref = xr.open_dataset( absolute_data_path("ref_output/left_grid.nc") @@ -264,7 +289,8 @@ def test_generate_epipolar_grids_shareloc(images_and_grids_conf): assert np.allclose(left_grid_ref["y"].values, left_grid[:, :, 1]) # Uncomment to update baseline - # right_grid.to_netcdf(absolute_data_path("ref_output/right_grid.nc")) + # generate_grid_xr_dataset(right_grid).to_netcdf( + # absolute_data_path("ref_output/right_grid.nc")) right_grid_ref = xr.open_dataset( absolute_data_path("ref_output/right_grid.nc") diff --git a/tests/applications/resampling/test_resampling.py b/tests/applications/resampling/test_resampling.py index 65cc5484..a3774e67 100644 --- a/tests/applications/resampling/test_resampling.py +++ b/tests/applications/resampling/test_resampling.py @@ -76,6 +76,9 @@ def test_resample_image(): nodata=nodata, ) + # Uncomment to update baseline + # test_dataset.to_netcdf(absolute_data_path("ref_output/data1_ref_left.nc")) + # For convenience we use same reference as test_epipolar_rectify_images_1 ref_dataset = xr.open_dataset( absolute_data_path("ref_output/data1_ref_left.nc") @@ -87,7 +90,7 @@ def test_resample_image(): ref_dataset.attrs.pop(cst.EPI_MARGINS, None) ref_dataset.attrs.pop(cst.EPI_DISP_MIN, None) ref_dataset.attrs.pop(cst.EPI_DISP_MAX, None) - ref_dataset.attrs["region"] = ref_dataset.attrs[cst.ROI_WITH_MARGINS] + ref_dataset.attrs.pop(cst.ROI_WITH_MARGINS, None) ref_dataset.attrs.pop(cst.ROI_WITH_MARGINS, None) assert_same_datasets(test_dataset, ref_dataset) diff --git a/tests/applications/triangulation/test_triangulation_tools.py b/tests/applications/triangulation/test_triangulation_tools.py index f2c1a29f..f87d5521 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.197362922602653, decimal=10) - np.testing.assert_almost_equal(llh.y[0], 44.207981250033235, decimal=10) + np.testing.assert_almost_equal(llh.x[0], 5.197378451223451, decimal=10) + np.testing.assert_almost_equal(llh.y[0], 44.20798042602802, decimal=10) # for altitude, 10**(-3) have been checked - np.testing.assert_almost_equal(llh.z[0], 511.4382467297837, decimal=10) + np.testing.assert_almost_equal(llh.z[0], 512.807649359107, decimal=10) # np.testing.assert_almost_equal(llh.z[0], 511.4383088) assert llh[cst.DISPARITY][0] == 0.0 assert llh[cst.POINTS_CLOUD_CORR_MSK][0] == 255 diff --git a/tests/core/geometry/test_abstract_geometry.py b/tests/core/geometry/test_abstract_geometry.py index 1f4fbd1d..ab4af7a7 100644 --- a/tests/core/geometry/test_abstract_geometry.py +++ b/tests/core/geometry/test_abstract_geometry.py @@ -95,33 +95,33 @@ def ref_sensor_coords(): left_sensor_coords = np.array( [ [-5737.38623047, -1539.64440918], - [-5737.12719727, -1540.61027832], - [-5736.86816406, -1541.57614746], - [-5736.60913086, -1542.5420166], - [-5736.42036133, -1539.38536784], - [-5736.16132867, -1540.35123711], - [-5735.90229601, -1541.31710639], - [-5735.64326335, -1542.28297567], - [-5735.45449219, -1539.1263265], - [-5735.19546007, -1540.09219591], - [-5734.93642795, -1541.05806532], - [-5734.67739583, -1542.02393473], + [-5738.12719727, -1540.61027832], + [-5738.86816406, -1541.57614746], + [-5739.60913086, -1542.5420166], + [-5736.42036133, -1540.38536784], + [-5737.16132867, -1541.35123711], + [-5737.90229601, -1542.31710639], + [-5738.64326335, -1543.28297567], + [-5735.45449219, -1541.1263265], + [-5736.19546007, -1542.09219591], + [-5736.93642795, -1543.05806532], + [-5737.67739583, -1544.02393473], ] ) right_sensor_coords = np.array( [ [-5737.38623047, -1539.64440918], - [-5737.12719727, -1540.61027832], - [-5736.86816406, -1541.57614746], - [-5736.60913086, -1542.5420166], - [-5735.38423069, -1543.24884494], - [-5734.86616536, -1545.1805835], - [-5734.34810004, -1547.11232205], - [-5733.83003472, -1549.0440606], - [-5733.38223524, -1546.85328179], - [-5732.86417101, -1548.78502062], - [-5732.34610677, -1550.71675944], - [-5731.82804253, -1552.64849826], + [-5738.12719727, -1540.61027832], + [-5738.86816406, -1541.57614746], + [-5739.60913086, -1542.5420166], + [-5739.38423069, -1544.24884494], + [-5740.86616536, -1546.1805835], + [-5742.34810004, -1548.11232205], + [-5743.83003472, -1550.0440606], + [-5741.38223524, -1548.85328179], + [-5742.86417101, -1550.78502062], + [-5744.34610677, -1552.71675944], + [-5745.82804253, -1554.64849826], ] ) diff --git a/tests/data/input/preprocessing_input/left_epipolar_grid_reunion.tif b/tests/data/input/preprocessing_input/left_epipolar_grid_reunion.tif index 0a8d786d..0f29f0b6 100644 Binary files a/tests/data/input/preprocessing_input/left_epipolar_grid_reunion.tif and b/tests/data/input/preprocessing_input/left_epipolar_grid_reunion.tif differ diff --git a/tests/data/input/preprocessing_input/right_epipolar_grid_reunion.tif b/tests/data/input/preprocessing_input/right_epipolar_grid_reunion.tif index 8f8e228e..d1f1691c 100644 Binary files a/tests/data/input/preprocessing_input/right_epipolar_grid_reunion.tif and b/tests/data/input/preprocessing_input/right_epipolar_grid_reunion.tif differ diff --git a/tests/data/input/stereo_input/left_epipolar_grid.tif b/tests/data/input/stereo_input/left_epipolar_grid.tif index f28aa723..4cfc7e97 100644 Binary files a/tests/data/input/stereo_input/left_epipolar_grid.tif and b/tests/data/input/stereo_input/left_epipolar_grid.tif differ diff --git a/tests/data/input/stereo_input/right_epipolar_grid.tif b/tests/data/input/stereo_input/right_epipolar_grid.tif index 30530374..1e8cd382 100644 Binary files a/tests/data/input/stereo_input/right_epipolar_grid.tif and b/tests/data/input/stereo_input/right_epipolar_grid.tif differ diff --git a/tests/data/ref_output/classif_end2end_ventoux_split.tif b/tests/data/ref_output/classif_end2end_ventoux_split.tif index 56cf4f55..8fa04160 100644 Binary files a/tests/data/ref_output/classif_end2end_ventoux_split.tif and b/tests/data/ref_output/classif_end2end_ventoux_split.tif differ diff --git a/tests/data/ref_output/classif_end2end_ventoux_with_classif.tif b/tests/data/ref_output/classif_end2end_ventoux_with_classif.tif index ff788f28..1df04975 100644 Binary files a/tests/data/ref_output/classif_end2end_ventoux_with_classif.tif and b/tests/data/ref_output/classif_end2end_ventoux_with_classif.tif differ diff --git a/tests/data/ref_output/cloud1_ref_pandora b/tests/data/ref_output/cloud1_ref_pandora index 50ca87bd..1f0ef560 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/clr_end2end_gizeh_crop.tif b/tests/data/ref_output/clr_end2end_gizeh_crop.tif index 9ca79f4d..00c5944a 100644 Binary files a/tests/data/ref_output/clr_end2end_gizeh_crop.tif and b/tests/data/ref_output/clr_end2end_gizeh_crop.tif differ diff --git a/tests/data/ref_output/clr_end2end_gizeh_crop_no_merging.tif b/tests/data/ref_output/clr_end2end_gizeh_crop_no_merging.tif index b7b2ab4d..f8e535b0 100644 Binary files a/tests/data/ref_output/clr_end2end_gizeh_crop_no_merging.tif and b/tests/data/ref_output/clr_end2end_gizeh_crop_no_merging.tif differ diff --git a/tests/data/ref_output/clr_end2end_gizeh_fill.tif b/tests/data/ref_output/clr_end2end_gizeh_fill.tif index 20aaf9b9..c73aad51 100644 Binary files a/tests/data/ref_output/clr_end2end_gizeh_fill.tif and b/tests/data/ref_output/clr_end2end_gizeh_fill.tif differ diff --git a/tests/data/ref_output/clr_end2end_gizeh_fill_with_zero.tif b/tests/data/ref_output/clr_end2end_gizeh_fill_with_zero.tif index 1b715464..2d187702 100644 Binary files a/tests/data/ref_output/clr_end2end_gizeh_fill_with_zero.tif and b/tests/data/ref_output/clr_end2end_gizeh_fill_with_zero.tif differ diff --git a/tests/data/ref_output/clr_end2end_paca.tif b/tests/data/ref_output/clr_end2end_paca.tif index f6765621..fa68fca9 100644 Binary files a/tests/data/ref_output/clr_end2end_paca.tif and b/tests/data/ref_output/clr_end2end_paca.tif differ diff --git a/tests/data/ref_output/clr_end2end_ventoux.tif b/tests/data/ref_output/clr_end2end_ventoux.tif index d1fad6e9..39790611 100644 Binary files a/tests/data/ref_output/clr_end2end_ventoux.tif and b/tests/data/ref_output/clr_end2end_ventoux.tif differ diff --git a/tests/data/ref_output/clr_end2end_ventoux_egm96.tif b/tests/data/ref_output/clr_end2end_ventoux_egm96.tif index d1fad6e9..4932e165 100644 Binary files a/tests/data/ref_output/clr_end2end_ventoux_egm96.tif and b/tests/data/ref_output/clr_end2end_ventoux_egm96.tif differ diff --git a/tests/data/ref_output/clr_end2end_ventoux_egm96_custom_geoid.tif b/tests/data/ref_output/clr_end2end_ventoux_egm96_custom_geoid.tif index 5224f9e1..597982f9 100644 Binary files a/tests/data/ref_output/clr_end2end_ventoux_egm96_custom_geoid.tif and b/tests/data/ref_output/clr_end2end_ventoux_egm96_custom_geoid.tif differ diff --git a/tests/data/ref_output/clr_end2end_ventoux_no_srtm.tif b/tests/data/ref_output/clr_end2end_ventoux_no_srtm.tif index 14294fc2..f4cd6959 100644 Binary files a/tests/data/ref_output/clr_end2end_ventoux_no_srtm.tif and b/tests/data/ref_output/clr_end2end_ventoux_no_srtm.tif differ diff --git a/tests/data/ref_output/clr_end2end_ventoux_quality_stats.tif b/tests/data/ref_output/clr_end2end_ventoux_quality_stats.tif index f7ff3ee1..8c7158fb 100644 Binary files a/tests/data/ref_output/clr_end2end_ventoux_quality_stats.tif and b/tests/data/ref_output/clr_end2end_ventoux_quality_stats.tif differ diff --git a/tests/data/ref_output/clr_end2end_ventoux_split.tif b/tests/data/ref_output/clr_end2end_ventoux_split.tif index 43eb0a85..14987bb6 100644 Binary files a/tests/data/ref_output/clr_end2end_ventoux_split.tif and b/tests/data/ref_output/clr_end2end_ventoux_split.tif differ diff --git a/tests/data/ref_output/clr_end2end_ventoux_split_4326.tif b/tests/data/ref_output/clr_end2end_ventoux_split_4326.tif index 8bac6604..467f1442 100644 Binary files a/tests/data/ref_output/clr_end2end_ventoux_split_4326.tif and b/tests/data/ref_output/clr_end2end_ventoux_split_4326.tif differ diff --git a/tests/data/ref_output/clr_end2end_ventoux_with_color.tif b/tests/data/ref_output/clr_end2end_ventoux_with_color.tif index 947ff57c..6b09f1a4 100644 Binary files a/tests/data/ref_output/clr_end2end_ventoux_with_color.tif and b/tests/data/ref_output/clr_end2end_ventoux_with_color.tif differ diff --git a/tests/data/ref_output/clr_end2end_ventoux_with_roi.tif b/tests/data/ref_output/clr_end2end_ventoux_with_roi.tif index a09d2e07..e5b243f4 100644 Binary files a/tests/data/ref_output/clr_end2end_ventoux_with_roi.tif and b/tests/data/ref_output/clr_end2end_ventoux_with_roi.tif differ diff --git a/tests/data/ref_output/clr_end2end_ventoux_with_snap_to_img1.tif b/tests/data/ref_output/clr_end2end_ventoux_with_snap_to_img1.tif index 2dfa6b45..c27b8c24 100644 Binary files a/tests/data/ref_output/clr_end2end_ventoux_with_snap_to_img1.tif and b/tests/data/ref_output/clr_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 d8e399db..aa5c863c 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_ambiguity2_end2end_ventoux_split.tif b/tests/data/ref_output/confidence_from_ambiguity2_end2end_ventoux_split.tif index ec4f98bd..61a86e50 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_ambiguity_before_end2end_ventoux.tif b/tests/data/ref_output/confidence_from_ambiguity_before_end2end_ventoux.tif index 0a21f4a1..5b9b350f 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 5b6732b8..b421d3f1 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 31e32ed0..eb526a2f 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 1c7ed3ab..37b3ae8a 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 1c7ed3ab..37b3ae8a 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 84769ecf..32f95934 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 835aa830..3540a370 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 7e3d51eb..772f0db8 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 baa9ae6a..f7ee10e5 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/corrected_right_grid.npy b/tests/data/ref_output/corrected_right_grid.npy index 416d7f38..8b18b1e0 100644 Binary files a/tests/data/ref_output/corrected_right_grid.npy and b/tests/data/ref_output/corrected_right_grid.npy differ diff --git a/tests/data/ref_output/data1_ref_clr b/tests/data/ref_output/data1_ref_clr index 178eb402..e82df7b7 100644 Binary files a/tests/data/ref_output/data1_ref_clr and b/tests/data/ref_output/data1_ref_clr differ diff --git a/tests/data/ref_output/data1_ref_left.nc b/tests/data/ref_output/data1_ref_left.nc index 02efb1c1..89c03f17 100644 Binary files a/tests/data/ref_output/data1_ref_left.nc and b/tests/data/ref_output/data1_ref_left.nc differ diff --git a/tests/data/ref_output/data1_ref_right.nc b/tests/data/ref_output/data1_ref_right.nc index d8718297..d87de7da 100644 Binary files a/tests/data/ref_output/data1_ref_right.nc and b/tests/data/ref_output/data1_ref_right.nc differ diff --git a/tests/data/ref_output/data3_ref_clr_4bands b/tests/data/ref_output/data3_ref_clr_4bands index 7179f92c..52c0f0b3 100644 Binary files a/tests/data/ref_output/data3_ref_clr_4bands and b/tests/data/ref_output/data3_ref_clr_4bands differ diff --git a/tests/data/ref_output/dem_max_end2end_ventoux.tif b/tests/data/ref_output/dem_max_end2end_ventoux.tif index a3e15734..bca7fba0 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 4111ff9c..8301261b 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 95f0de68..73f10715 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 c25dbf6c..9b3d3300 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 eafc3d86..8d2298db 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_no_srtm.tif b/tests/data/ref_output/dem_median_end2end_ventoux_no_srtm.tif index 1cda8b41..f6406113 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 eb769f1c..fb496c25 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 e0c2c760..a619fb80 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 a105099f..55816e00 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 0ed26886..4f302269 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 a619fb80..048f5f79 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.tif b/tests/data/ref_output/dsm_end2end_gizeh_crop.tif index 593c5e1e..7331b01d 100644 Binary files a/tests/data/ref_output/dsm_end2end_gizeh_crop.tif and b/tests/data/ref_output/dsm_end2end_gizeh_crop.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 472f2e24..2662d0f3 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 5334676e..1fa86be8 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 72640f76..bbb5aa56 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.tif b/tests/data/ref_output/dsm_end2end_paca.tif index 0fb50603..3123b941 100644 Binary files a/tests/data/ref_output/dsm_end2end_paca.tif and b/tests/data/ref_output/dsm_end2end_paca.tif differ diff --git a/tests/data/ref_output/dsm_end2end_ventoux.tif b/tests/data/ref_output/dsm_end2end_ventoux.tif index 5736c117..ec3edae3 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 9e13e743..7a459583 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 49834a4d..5f3afdc8 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_srtm.tif b/tests/data/ref_output/dsm_end2end_ventoux_no_srtm.tif index 2890fcf6..7dc14343 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 f65af27b..8a7fef39 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 f228368e..d11da70c 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 81f201c8..3a4ffd93 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_with_classif.tif b/tests/data/ref_output/dsm_end2end_ventoux_with_classif.tif index 5736c117..ec3edae3 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 5736c117..ec3edae3 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 3e79dfcc..dbb53bce 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 d413d3cb..900da0be 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 19e5d0b8..e23594fa 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 70225ea9..bde9b041 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 691f7bdb..c5c2a232 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 cab0ad07..ae17340c 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/filling_end2end_gizeh_fill.tif b/tests/data/ref_output/filling_end2end_gizeh_fill.tif index 41d7fe8b..12fb0849 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 e6f50721..a44431b6 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_split.tif b/tests/data/ref_output/filling_end2end_ventoux_split.tif index 2224cb23..ecbbbae3 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/left_grid.nc b/tests/data/ref_output/left_grid.nc index 567957c9..4424ef63 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 573fbd14..2a05d102 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/matches.npy b/tests/data/ref_output/matches.npy index f6cb5751..fb553639 100644 Binary files a/tests/data/ref_output/matches.npy and b/tests/data/ref_output/matches.npy differ diff --git a/tests/data/ref_output/msk_end2end_gizeh_crop.tif b/tests/data/ref_output/msk_end2end_gizeh_crop.tif index daa5889d..ae57dfae 100644 Binary files a/tests/data/ref_output/msk_end2end_gizeh_crop.tif and b/tests/data/ref_output/msk_end2end_gizeh_crop.tif differ diff --git a/tests/data/ref_output/msk_end2end_gizeh_crop_no_merging.tif b/tests/data/ref_output/msk_end2end_gizeh_crop_no_merging.tif index f05ef0df..9b48c361 100644 Binary files a/tests/data/ref_output/msk_end2end_gizeh_crop_no_merging.tif and b/tests/data/ref_output/msk_end2end_gizeh_crop_no_merging.tif differ diff --git a/tests/data/ref_output/msk_end2end_gizeh_fill.tif b/tests/data/ref_output/msk_end2end_gizeh_fill.tif index ca967391..0e8b58e8 100644 Binary files a/tests/data/ref_output/msk_end2end_gizeh_fill.tif and b/tests/data/ref_output/msk_end2end_gizeh_fill.tif differ diff --git a/tests/data/ref_output/msk_end2end_gizeh_fill_with_zero.tif b/tests/data/ref_output/msk_end2end_gizeh_fill_with_zero.tif index 5075714d..87746435 100644 Binary files a/tests/data/ref_output/msk_end2end_gizeh_fill_with_zero.tif and b/tests/data/ref_output/msk_end2end_gizeh_fill_with_zero.tif differ diff --git a/tests/data/ref_output/msk_end2end_paca.tif b/tests/data/ref_output/msk_end2end_paca.tif index c2b6c826..2fcacd6a 100644 Binary files a/tests/data/ref_output/msk_end2end_paca.tif and b/tests/data/ref_output/msk_end2end_paca.tif differ diff --git a/tests/data/ref_output/performance_map_end2end_gizeh_crop.tif b/tests/data/ref_output/performance_map_end2end_gizeh_crop.tif index b473c10d..431ec0cc 100644 Binary files a/tests/data/ref_output/performance_map_end2end_gizeh_crop.tif and b/tests/data/ref_output/performance_map_end2end_gizeh_crop.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 1941d45e..07791353 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/rasterization_res_ref_1_intervals.nc b/tests/data/ref_output/rasterization_res_ref_1_intervals.nc index 25baf994..dd19b828 100644 Binary files a/tests/data/ref_output/rasterization_res_ref_1_intervals.nc and b/tests/data/ref_output/rasterization_res_ref_1_intervals.nc differ diff --git a/tests/data/ref_output/right_grid.nc b/tests/data/ref_output/right_grid.nc index 1ce9551c..1b030d1f 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 4fa4ffc6..480cf44c 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 8791d67c..573adc50 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 09dc1b49..43f67481 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 53d32825..ee17b79d 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_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 e150ab64..007f3e9d 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 22da3aa7..41117e96 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/test_end2end.py b/tests/test_end2end.py index d0cfd1ab..57566480 100644 --- a/tests/test_end2end.py +++ b/tests/test_end2end.py @@ -1765,11 +1765,11 @@ def test_end2end_use_epipolar_a_priori(): == 612 ) assert ( - -28 + -27 < out_json["applications"]["left_right"][ "disparity_range_computation_run" ]["minimum_disparity"] - < -26 + < -25 ) assert ( 23 @@ -2124,8 +2124,8 @@ def test_prepare_ventoux_bias(): out_disp_compute = out_data["applications"]["left_right"][ "disparity_range_computation_run" ] - assert out_disp_compute["minimum_disparity"] > -29 - assert out_disp_compute["minimum_disparity"] < -27 + assert out_disp_compute["minimum_disparity"] > -28 + assert out_disp_compute["minimum_disparity"] < -26 assert out_disp_compute["maximum_disparity"] > 24 assert out_disp_compute["maximum_disparity"] < 29 diff --git a/tutorials/sensor_to_dense_dsm_step_by_step.ipynb b/tutorials/sensor_to_dense_dsm_step_by_step.ipynb index 9c65952e..5a153b70 100644 --- a/tutorials/sensor_to_dense_dsm_step_by_step.ipynb +++ b/tutorials/sensor_to_dense_dsm_step_by_step.ipynb @@ -561,6 +561,17 @@ "show_data(data_image_left, mode=\"image\")" ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "44287ce1", + "metadata": {}, + "outputs": [], + "source": [ + "data_image_right = get_full_data(epipolar_image_right, \"im\")\n", + "show_data(data_image_right, mode=\"image\")" + ] + }, { "cell_type": "markdown", "id": "48c814dd-91b9-4274-af24-4b54de1fd52a", @@ -746,6 +757,27 @@ " new_grid_right,\n", " )\n", " )\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "365ee163", + "metadata": {}, + "outputs": [], + "source": [ + "print(corrected_matches_array)\n", + "print(new_grid_matches_array)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d0053c14", + "metadata": {}, + "outputs": [], + "source": [ " # Estimate grid_correction\n", " (\n", " grid_correction_coef,\n", @@ -758,7 +790,18 @@ " new_grid_right,\n", " )\n", "\n", + "print(grid_correction_coef)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "175aaaa5", + "metadata": {}, + "outputs": [], + "source": [ " # Correct grid right\n", + " print(new_grid_right)\n", " corrected_grid_right = grid_correction.correct_grid(\n", " new_grid_right,\n", " grid_correction_coef,\n", @@ -767,6 +810,17 @@ " )\n", " corrected_grid_left = new_grid_left\n", "\n", + "\n", + " print(corrected_grid_right)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "fbf6d361", + "metadata": {}, + "outputs": [], + "source": [ " # Triangulate new matches\n", " triangulated_matches = dem_generation_tools.triangulate_sparse_matches(\n", " sensor_image_left,\n", @@ -775,8 +829,7 @@ " corrected_grid_right,\n", " corrected_matches_array,\n", " geometry_plugin=geom_plugin,\n", - " )\n", - "\n" + " )" ] }, { @@ -913,6 +966,28 @@ ")" ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "2b2c9865", + "metadata": {}, + "outputs": [], + "source": [ + "data_image_left = get_full_data(new_epipolar_image_left, \"im\")\n", + "show_data(data_image_left, mode=\"image\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7892ab37", + "metadata": {}, + "outputs": [], + "source": [ + "data_image_right = get_full_data(new_epipolar_image_right, \"im\")\n", + "show_data(data_image_right, mode=\"image\")" + ] + }, { "cell_type": "markdown", "id": "89073ed3-231f-4386-928d-92c40ede20e1", @@ -937,6 +1012,14 @@ ")" ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "2bd51459", + "metadata": {}, + "outputs": [], + "source": [] + }, { "cell_type": "markdown", "id": "03a61233-bdb9-48b5-ba28-1ddf8a63c9f5", @@ -1194,9 +1277,9 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "CARS venv", "language": "python", - "name": "python3" + "name": "cars_venv" }, "language_info": { "codemirror_mode": { @@ -1208,7 +1291,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.0" + "version": "3.10.12" }, "vscode": { "interpreter": {