Loading autocnet/graph/edge.py +2 −6 Original line number Diff line number Diff line Loading @@ -183,7 +183,6 @@ class Edge(dict, MutableMapping): # Set the initial state of the fundamental mask in the masks self.masks = ('fundamental', mask) def add_putative_matches(self): if not hasattr(self, 'fundamental_matrix'): raise(ValueError, 'Fundamental matric has not been computed') Loading Loading @@ -452,14 +451,11 @@ class Edge(dict, MutableMapping): A boolean series to inflate back to the full match set """ if clean_keys: panel = self.masks mask = panel[clean_keys].all(axis=1) matches = self.matches[mask] mask = self.masks[clean_keys].all(axis=1) else: matches = self.matches mask = pd.Series(True, self.matches.index) return matches, mask return self.matches[mask], mask def overlap(self): """ Loading autocnet/graph/network.py +10 −1 Original line number Diff line number Diff line import itertools import os from time import gmtime, strftime import warnings import dill as pickle import networkx as nx from autocnet.control.control import CorrespondenceNetwork from autocnet.fileio import io_hdf from autocnet.fileio import io_json from autocnet.fileio import io_utils Loading Loading @@ -67,6 +67,9 @@ class CandidateGraph(nx.Graph): e.source = self.node[s] e.destination = self.node[d] self.creationdate = strftime("%Y-%m-%d %H:%M:%S", gmtime()) self.modifieddate = strftime("%Y-%m-%d %H:%M:%S", gmtime()) @classmethod def from_graph(cls, graph): """ Loading Loading @@ -168,6 +171,12 @@ class CandidateGraph(nx.Graph): input_adjacency[os.path.join(basepath, k)] = input_adjacency.pop(k) return cls(input_adjacency) def _update_date(self): """ Update the last modified date attribute. """ self.modifieddate = strftime("%Y-%m-%d %H:%M:%S", gmtime()) def get_name(self, node_index): """ Get the image name for the given node. Loading autocnet/graph/node.py +2 −2 Original line number Diff line number Diff line Loading @@ -68,8 +68,8 @@ class Node(dict, MutableMapping): @property def nkeypoints(self): if hasattr(self, '_nkeypoints'): return self._nkeypoints if hasattr(self, '_keypoints'): return len(self._keypoints) else: return 0 Loading Loading
autocnet/graph/edge.py +2 −6 Original line number Diff line number Diff line Loading @@ -183,7 +183,6 @@ class Edge(dict, MutableMapping): # Set the initial state of the fundamental mask in the masks self.masks = ('fundamental', mask) def add_putative_matches(self): if not hasattr(self, 'fundamental_matrix'): raise(ValueError, 'Fundamental matric has not been computed') Loading Loading @@ -452,14 +451,11 @@ class Edge(dict, MutableMapping): A boolean series to inflate back to the full match set """ if clean_keys: panel = self.masks mask = panel[clean_keys].all(axis=1) matches = self.matches[mask] mask = self.masks[clean_keys].all(axis=1) else: matches = self.matches mask = pd.Series(True, self.matches.index) return matches, mask return self.matches[mask], mask def overlap(self): """ Loading
autocnet/graph/network.py +10 −1 Original line number Diff line number Diff line import itertools import os from time import gmtime, strftime import warnings import dill as pickle import networkx as nx from autocnet.control.control import CorrespondenceNetwork from autocnet.fileio import io_hdf from autocnet.fileio import io_json from autocnet.fileio import io_utils Loading Loading @@ -67,6 +67,9 @@ class CandidateGraph(nx.Graph): e.source = self.node[s] e.destination = self.node[d] self.creationdate = strftime("%Y-%m-%d %H:%M:%S", gmtime()) self.modifieddate = strftime("%Y-%m-%d %H:%M:%S", gmtime()) @classmethod def from_graph(cls, graph): """ Loading Loading @@ -168,6 +171,12 @@ class CandidateGraph(nx.Graph): input_adjacency[os.path.join(basepath, k)] = input_adjacency.pop(k) return cls(input_adjacency) def _update_date(self): """ Update the last modified date attribute. """ self.modifieddate = strftime("%Y-%m-%d %H:%M:%S", gmtime()) def get_name(self, node_index): """ Get the image name for the given node. Loading
autocnet/graph/node.py +2 −2 Original line number Diff line number Diff line Loading @@ -68,8 +68,8 @@ class Node(dict, MutableMapping): @property def nkeypoints(self): if hasattr(self, '_nkeypoints'): return self._nkeypoints if hasattr(self, '_keypoints'): return len(self._keypoints) else: return 0 Loading