Commit 224bca32 authored by Gaetano Raffaele's avatar Gaetano Raffaele
Browse files

ENH: optimizing tiepoint search.

No related merge requests found
Showing with 1 addition and 1 deletion
+1 -1
...@@ -116,7 +116,7 @@ def compute_displacement_with_masks(_src: otb.Application, _tgt: otb.Application ...@@ -116,7 +116,7 @@ def compute_displacement_with_masks(_src: otb.Application, _tgt: otb.Application
mask = np.all((mask, ref_mask), axis=0).astype(int) mask = np.all((mask, ref_mask), axis=0).astype(int)
H, W = mask.shape H, W = mask.shape
ratio = np.sum(mask)/(H*W) #scale number of bins based on coverage ratio ratio = np.sum(mask)/(H*W) #scale number of bins based on coverage ratio
cnt, cov, cov_ext = get_patch_centers(mask, geobin_size, int(ratio*num_geobins), margin=margin) cnt, cov, cov_ext = get_patch_centers(mask, geobin_size, max(1,int(ratio*num_geobins)), margin=margin)
_src_msk.FreeRessources() _src_msk.FreeRessources()
_tgt_msk.FreeRessources() _tgt_msk.FreeRessources()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment