From 13b291f0ed2e2dcbc4ff88f709400afe045f9da3 Mon Sep 17 00:00:00 2001 From: steuxyo Date: Fri, 11 Oct 2024 14:22:20 +0200 Subject: [PATCH] fix: resample classification for dense matches filling --- .../sensor_to_dense_dsm/sensor_to_dense_dsm_pipeline.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 3177574a..18bdc286 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 @@ -673,6 +673,7 @@ def run(self): # noqa C901 # with any order. the .1 will be performed before the .2 pairs[pair_key]["holes_classif"] = [] pairs[pair_key]["holes_poly_margin"] = 0 + add_classif = False if self.dense_matches_filling_1.used_method == "plane": pairs[pair_key][ "holes_classif" @@ -681,6 +682,7 @@ def run(self): # noqa C901 pairs[pair_key]["holes_poly_margin"], self.dense_matches_filling_1.get_poly_margin(), ) + add_classif = True if self.dense_matches_filling_2.used_method == "plane": pairs[pair_key][ "holes_classif" @@ -689,6 +691,7 @@ def run(self): # noqa C901 pairs[pair_key]["holes_poly_margin"], self.dense_matches_filling_2.get_poly_margin(), ) + add_classif = True pairs[pair_key]["holes_bbox_left"] = [] pairs[pair_key]["holes_bbox_right"] = [] @@ -717,7 +720,7 @@ def run(self): # noqa C901 tile_width=None, tile_height=None, add_color=False, - add_classif=False, + add_classif=add_classif, ) # Generate the holes polygons in epipolar images