diff --git a/opensfm/features.py b/opensfm/features.py index c576fbc23..7ba2e44d5 100644 --- a/opensfm/features.py +++ b/opensfm/features.py @@ -285,6 +285,7 @@ def root_feature(desc: np.ndarray, l2_normalization: bool = False) -> np.ndarray desc = (desc.T / s2).T s = np.sum(desc, 1) desc = np.sqrt(desc.T / s).T + desc[np.isnan(desc)] = 0 return desc @@ -308,6 +309,7 @@ def root_feature_surf( s_sub = np.sum(np.abs(desc), 1) desc_sub = np.sqrt(desc_sub.T / s_sub).T desc[:, ii] = desc_sub * desc_sub_sign + desc[np.isnan(desc)] = 0 return desc