Loading autocnet/graph/edge.py +3 −0 Original line number Diff line number Diff line Loading @@ -190,6 +190,9 @@ class Edge(dict, MutableMapping): d_keypoints[ransac_mask][['x', 'y']], index=mask[mask == True].index) # Finalize the array to get custom attrs to propagate self.homography.__array_finalize__(self.homography) def subpixel_register(self, clean_keys=[], threshold=0.8, upsampling=16, template_size=19, search_size=53, max_x_shift=1.0, max_y_shift=1.0): Loading autocnet/graph/network.py +2 −2 Original line number Diff line number Diff line import os import pickle import dill as pickle import networkx as nx import numpy as np Loading Loading @@ -491,7 +491,7 @@ class CandidateGraph(nx.Graph): node._handle = None with open(filename, 'wb') as f: pickle.dump(self, f) pickle.dump(self, f, protocol=pickle.HIGHEST_PROTOCOL) # TODO: The Edge object requires a get method in order to be plottable, probably Node as well. # This is a function of being a dict in NetworkX Loading autocnet/matcher/homography.py +8 −1 Original line number Diff line number Diff line Loading @@ -34,6 +34,13 @@ class Homography(np.ndarray): return obj def __array_finalize__(self, obj): if obj is None: return self.x1 = getattr(obj, 'x1', None) self.x2 = getattr(obj, 'x2', None) self.pd_index = getattr(obj, 'pd_index', None) @property def determinant(self): if not hasattr(self, '_determinant'): Loading Loading
autocnet/graph/edge.py +3 −0 Original line number Diff line number Diff line Loading @@ -190,6 +190,9 @@ class Edge(dict, MutableMapping): d_keypoints[ransac_mask][['x', 'y']], index=mask[mask == True].index) # Finalize the array to get custom attrs to propagate self.homography.__array_finalize__(self.homography) def subpixel_register(self, clean_keys=[], threshold=0.8, upsampling=16, template_size=19, search_size=53, max_x_shift=1.0, max_y_shift=1.0): Loading
autocnet/graph/network.py +2 −2 Original line number Diff line number Diff line import os import pickle import dill as pickle import networkx as nx import numpy as np Loading Loading @@ -491,7 +491,7 @@ class CandidateGraph(nx.Graph): node._handle = None with open(filename, 'wb') as f: pickle.dump(self, f) pickle.dump(self, f, protocol=pickle.HIGHEST_PROTOCOL) # TODO: The Edge object requires a get method in order to be plottable, probably Node as well. # This is a function of being a dict in NetworkX Loading
autocnet/matcher/homography.py +8 −1 Original line number Diff line number Diff line Loading @@ -34,6 +34,13 @@ class Homography(np.ndarray): return obj def __array_finalize__(self, obj): if obj is None: return self.x1 = getattr(obj, 'x1', None) self.x2 = getattr(obj, 'x2', None) self.pd_index = getattr(obj, 'pd_index', None) @property def determinant(self): if not hasattr(self, '_determinant'): Loading