Loading autocnet/graph/edge.py +7 −7 Changes for autocnet/graph/edge.py: 7 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -144,7 +144,7 @@ class Edge(dict, MutableMapping): def ratio_check(self, clean_keys=[], **kwargs): if hasattr(self, 'matches'): matches, mask = self._clean(clean_keys) matches, mask = self.clean(clean_keys) self.distance_ratio = od.DistanceRatio(matches) self.distance_ratio.compute(mask=mask, **kwargs) Loading Loading @@ -179,7 +179,7 @@ class Edge(dict, MutableMapping): if not hasattr(self, 'matches'): raise AttributeError('Matches have not been computed for this edge') return matches, mask = self._clean(clean_keys) matches, mask = self.clean(clean_keys) # TODO: Homogeneous is horribly inefficient here, use Numpy array notation s_keypoints = self.source.get_keypoint_coordinates(index=matches['source_idx'], Loading Loading @@ -230,7 +230,7 @@ class Edge(dict, MutableMapping): else: raise AttributeError('Matches have not been computed for this edge') matches, mask = self._clean(clean_keys) matches, mask = self.clean(clean_keys) s_keypoints = self.source.get_keypoint_coordinates(index=matches['source_idx']) d_keypoints = self.destination.get_keypoint_coordinates(index=matches['destination_idx']) Loading Loading @@ -288,7 +288,7 @@ class Edge(dict, MutableMapping): self.matches[column] = default # Build up a composite mask from all of the user specified masks matches, mask = self._clean(clean_keys) matches, mask = self.clean(clean_keys) # Grab the full images, or handles if tiled is True: Loading Loading @@ -358,7 +358,7 @@ class Edge(dict, MutableMapping): if not hasattr(self, 'matches'): raise AttributeError('This edge does not yet have any matches computed.') matches, mask = self._clean(clean_keys) matches, mask = self.clean(clean_keys) domain = self.source.geodata.raster_size # Massage the dataframe into the correct structure Loading @@ -382,7 +382,7 @@ class Edge(dict, MutableMapping): def plot(self, ax=None, clean_keys=[], **kwargs): return plot_edge(self, ax=ax, clean_keys=clean_keys, **kwargs) def _clean(self, clean_keys, pid=None): def clean(self, clean_keys, pid=None): """ Given a list of clean keys and a provenance id compute the mask of valid matches Loading Loading @@ -442,7 +442,7 @@ class Edge(dict, MutableMapping): if self.matches is None: raise AttributeError('Edge needs to have features extracted and matched') return matches, mask = self._clean(clean_keys) matches, mask = self.clean(clean_keys) source_array = self.source.get_keypoint_coordinates(index=matches['source_idx']).values source_coords = self.source.geodata.latlon_corners Loading autocnet/graph/node.py +1 −1 Changes for autocnet/graph/node.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -324,7 +324,7 @@ class Node(dict, MutableMapping): edge_matches = [] for e in incident_edges: edge = cg[e[0]][e[1]] matches, mask = edge._clean(clean_keys=clean_keys) matches, mask = edge.clean(clean_keys=clean_keys) # Add a depth mask that initially mirrors the fundamental mask edge_matches.append(matches) d = pd.concat(edge_matches) Loading autocnet/vis/graph_view.py +2 −2 Changes for autocnet/vis/graph_view.py: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -90,7 +90,7 @@ def plot_node(node, ax=None, clean_keys=[], **kwargs): keypoints = node.get_keypoints() if clean_keys: matches, mask = node._clean(clean_keys) matches, mask = node.clean(clean_keys) keypoints = node.get_keypoints()[mask] marker = '.' Loading Loading @@ -171,7 +171,7 @@ def plot_edge(edge, ax=None, clean_keys=[], image_space=100, ax.imshow(composite, cmap=cmap) matches, mask = edge._clean(clean_keys) matches, mask = edge.clean(clean_keys) source_keypoints = edge.source.get_keypoints(index=matches['source_idx']) destination_keypoints = edge.destination.get_keypoints(index=matches['destination_idx']) Loading notebooks/Ciratefi.ipynb +8 −75 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
autocnet/graph/edge.py +7 −7 Changes for autocnet/graph/edge.py: 7 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -144,7 +144,7 @@ class Edge(dict, MutableMapping): def ratio_check(self, clean_keys=[], **kwargs): if hasattr(self, 'matches'): matches, mask = self._clean(clean_keys) matches, mask = self.clean(clean_keys) self.distance_ratio = od.DistanceRatio(matches) self.distance_ratio.compute(mask=mask, **kwargs) Loading Loading @@ -179,7 +179,7 @@ class Edge(dict, MutableMapping): if not hasattr(self, 'matches'): raise AttributeError('Matches have not been computed for this edge') return matches, mask = self._clean(clean_keys) matches, mask = self.clean(clean_keys) # TODO: Homogeneous is horribly inefficient here, use Numpy array notation s_keypoints = self.source.get_keypoint_coordinates(index=matches['source_idx'], Loading Loading @@ -230,7 +230,7 @@ class Edge(dict, MutableMapping): else: raise AttributeError('Matches have not been computed for this edge') matches, mask = self._clean(clean_keys) matches, mask = self.clean(clean_keys) s_keypoints = self.source.get_keypoint_coordinates(index=matches['source_idx']) d_keypoints = self.destination.get_keypoint_coordinates(index=matches['destination_idx']) Loading Loading @@ -288,7 +288,7 @@ class Edge(dict, MutableMapping): self.matches[column] = default # Build up a composite mask from all of the user specified masks matches, mask = self._clean(clean_keys) matches, mask = self.clean(clean_keys) # Grab the full images, or handles if tiled is True: Loading Loading @@ -358,7 +358,7 @@ class Edge(dict, MutableMapping): if not hasattr(self, 'matches'): raise AttributeError('This edge does not yet have any matches computed.') matches, mask = self._clean(clean_keys) matches, mask = self.clean(clean_keys) domain = self.source.geodata.raster_size # Massage the dataframe into the correct structure Loading @@ -382,7 +382,7 @@ class Edge(dict, MutableMapping): def plot(self, ax=None, clean_keys=[], **kwargs): return plot_edge(self, ax=ax, clean_keys=clean_keys, **kwargs) def _clean(self, clean_keys, pid=None): def clean(self, clean_keys, pid=None): """ Given a list of clean keys and a provenance id compute the mask of valid matches Loading Loading @@ -442,7 +442,7 @@ class Edge(dict, MutableMapping): if self.matches is None: raise AttributeError('Edge needs to have features extracted and matched') return matches, mask = self._clean(clean_keys) matches, mask = self.clean(clean_keys) source_array = self.source.get_keypoint_coordinates(index=matches['source_idx']).values source_coords = self.source.geodata.latlon_corners Loading
autocnet/graph/node.py +1 −1 Changes for autocnet/graph/node.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -324,7 +324,7 @@ class Node(dict, MutableMapping): edge_matches = [] for e in incident_edges: edge = cg[e[0]][e[1]] matches, mask = edge._clean(clean_keys=clean_keys) matches, mask = edge.clean(clean_keys=clean_keys) # Add a depth mask that initially mirrors the fundamental mask edge_matches.append(matches) d = pd.concat(edge_matches) Loading
autocnet/vis/graph_view.py +2 −2 Changes for autocnet/vis/graph_view.py: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -90,7 +90,7 @@ def plot_node(node, ax=None, clean_keys=[], **kwargs): keypoints = node.get_keypoints() if clean_keys: matches, mask = node._clean(clean_keys) matches, mask = node.clean(clean_keys) keypoints = node.get_keypoints()[mask] marker = '.' Loading Loading @@ -171,7 +171,7 @@ def plot_edge(edge, ax=None, clean_keys=[], image_space=100, ax.imshow(composite, cmap=cmap) matches, mask = edge._clean(clean_keys) matches, mask = edge.clean(clean_keys) source_keypoints = edge.source.get_keypoints(index=matches['source_idx']) destination_keypoints = edge.destination.get_keypoints(index=matches['destination_idx']) Loading
notebooks/Ciratefi.ipynb +8 −75 File changed.Preview size limit exceeded, changes collapsed. Show changes