From 69d3b2f09c364caf49f89d7668d8c651fea5f431 Mon Sep 17 00:00:00 2001 From: Roelof van Dijk Date: Tue, 21 May 2024 13:28:42 +0200 Subject: [PATCH 1/2] feat: use sift height range if no dem provided --- s2p/rpc_utils.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/s2p/rpc_utils.py b/s2p/rpc_utils.py index d69ba9c5..f477a7f6 100644 --- a/s2p/rpc_utils.py +++ b/s2p/rpc_utils.py @@ -445,9 +445,6 @@ def exogenous_disp_range_estimation(rpc1, rpc2, x, y, w, h, H1, H2, cfg, A=None, disparity is made horizontal thanks to the two rectifying homographies H1 and H2. """ - if cfg['exogenous_dem'] is None: - return - m, M = altitude_range(rpc1, x, y, w, h, cfg, margin_top, margin_bottom) return altitude_range_to_disp_range(m, M, rpc1, rpc2, x, y, w, h, H1, H2, From 204d48b540e186d66c087e8fa60bc1d988f8e859 Mon Sep 17 00:00:00 2001 From: Roelof van Dijk Date: Tue, 21 May 2024 15:53:57 +0200 Subject: [PATCH 2/2] feat: use srtm for disparity if use_srtm is true --- s2p/rpc_utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/s2p/rpc_utils.py b/s2p/rpc_utils.py index f477a7f6..350c01a9 100644 --- a/s2p/rpc_utils.py +++ b/s2p/rpc_utils.py @@ -445,6 +445,9 @@ def exogenous_disp_range_estimation(rpc1, rpc2, x, y, w, h, H1, H2, cfg, A=None, disparity is made horizontal thanks to the two rectifying homographies H1 and H2. """ + if cfg['exogenous_dem'] is None and cfg.get('exogenous_dem', None) in [None, False]: + return + m, M = altitude_range(rpc1, x, y, w, h, cfg, margin_top, margin_bottom) return altitude_range_to_disp_range(m, M, rpc1, rpc2, x, y, w, h, H1, H2,