Loading autocnet/matcher/cpu_matcher.py +8 −14 Original line number Diff line number Diff line Loading @@ -78,24 +78,18 @@ def match(edge, k=2, **kwargs): fl = FlannMatcher() # Get the correct descriptors # TODO: Extract into a helper function if 'aidx' in kwargs.keys(): aidx = kwargs['aidx'] kwargs.pop('aidx') else: aidx = None # Reset the edge.masks attrib; New matches would mean masks have to be # re-calculated edge.masks = pd.DataFrame() if 'bidx' in kwargs.keys(): bidx = kwargs['bidx'] kwargs.pop('bidx') else: bidx = None # Get the correct descriptors aidx = kwargs.pop('aidx', None) bidx = kwargs.pop('bidx', None) mono_matches(edge.source, edge.destination, aidx=aidx, bidx=bidx, **kwargs) mono_matches(edge.source, edge.destination, aidx=aidx, bidx=bidx) # Swap the indices since mono_matches is generic and source/destin are # swapped mono_matches(edge.destination, edge.source, aidx=bidx, bidx=aidx, **kwargs) mono_matches(edge.destination, edge.source, aidx=bidx, bidx=aidx) edge.matches.sort_values(by=['distance']) Loading autocnet/matcher/cuda_matcher.py +1 −0 Original line number Diff line number Diff line Loading @@ -38,4 +38,5 @@ def match(edge, ratio=0.8, **kwargs): # Set the matches and set the 'ratio' (ambiguity) mask edge.matches = df edge.masks = pd.DataFrame() edge.masks['ratio'] = df['ambiguity'] <= ratio Loading
autocnet/matcher/cpu_matcher.py +8 −14 Original line number Diff line number Diff line Loading @@ -78,24 +78,18 @@ def match(edge, k=2, **kwargs): fl = FlannMatcher() # Get the correct descriptors # TODO: Extract into a helper function if 'aidx' in kwargs.keys(): aidx = kwargs['aidx'] kwargs.pop('aidx') else: aidx = None # Reset the edge.masks attrib; New matches would mean masks have to be # re-calculated edge.masks = pd.DataFrame() if 'bidx' in kwargs.keys(): bidx = kwargs['bidx'] kwargs.pop('bidx') else: bidx = None # Get the correct descriptors aidx = kwargs.pop('aidx', None) bidx = kwargs.pop('bidx', None) mono_matches(edge.source, edge.destination, aidx=aidx, bidx=bidx, **kwargs) mono_matches(edge.source, edge.destination, aidx=aidx, bidx=bidx) # Swap the indices since mono_matches is generic and source/destin are # swapped mono_matches(edge.destination, edge.source, aidx=bidx, bidx=aidx, **kwargs) mono_matches(edge.destination, edge.source, aidx=bidx, bidx=aidx) edge.matches.sort_values(by=['distance']) Loading
autocnet/matcher/cuda_matcher.py +1 −0 Original line number Diff line number Diff line Loading @@ -38,4 +38,5 @@ def match(edge, ratio=0.8, **kwargs): # Set the matches and set the 'ratio' (ambiguity) mask edge.matches = df edge.masks = pd.DataFrame() edge.masks['ratio'] = df['ambiguity'] <= ratio