Loading autocnet/graph/network.py +6 −1 Original line number Diff line number Diff line from collections import OrderedDict import itertools import math import os Loading Loading @@ -83,6 +84,7 @@ class CandidateGraph(nx.Graph): self.graph['creationdate'] = strftime("%Y-%m-%d %H:%M:%S", gmtime()) self.graph['modifieddate'] = strftime("%Y-%m-%d %H:%M:%S", gmtime()) def __eq__(self, other): eq = True # Check the nodes Loading @@ -94,6 +96,9 @@ class CandidateGraph(nx.Graph): eq = False return eq def _order_adjacency(self): # pragma: no cover self.adj = OrderedDict(sorted(self.adj.items())) @property def maxsize(self): if not hasattr(self, '_maxsize'): Loading Loading @@ -222,8 +227,8 @@ class CandidateGraph(nx.Graph): ---------- """ raise NotImplementedError self._order_adjacency() def extract_features(self, band=1, *args, **kwargs): # pragma: no cover """ Loading autocnet/io/network.py +2 −0 Original line number Diff line number Diff line Loading @@ -126,4 +126,6 @@ def load(projectname): pass # Add a mock edge cg.edge[e['source']][e['target']] = edge cg._order_adjacency() return cg functional_tests/test_three_image.py +0 −11 Original line number Diff line number Diff line Loading @@ -53,18 +53,7 @@ class TestThreeImageMatching(unittest.TestCase): cg.apply_func_to_edges("compute_homography", clean_keys=['symmetry', 'ratio']) cg.compute_fundamental_matrices(clean_keys=['symmetry', 'ratio'], reproj_threshold=3.0, method='ransac') # Step: And create a C object cg.generate_cnet(clean_keys=['symmetry', 'ratio', 'fundamental']) # Step: Create a fromlist to go with the cnet and write it to a file filelist = cg.to_filelist() write_filelist(filelist, 'TestThreeImageMatching_fromlist.lis') # Step: Create a correspondence network cg.generate_cnet(clean_keys=['fundamental'], deepen=True) to_isis('TestThreeImageMatching.net', cg.cn, mode='wb', networkid='TestThreeImageMatching', targetname='Moon') def tearDown(self): try: Loading functional_tests/test_two_image.py +0 −4 Original line number Diff line number Diff line Loading @@ -87,10 +87,6 @@ class TestTwoImageMatching(unittest.TestCase): filelist = cg.to_filelist() write_filelist(filelist, path="fromlis.lis") # Step: Output a control network to_isis('TestTwoImageMatching.net', cg.cn, mode='wb', networkid='TestTwoImageMatching', targetname='Moon') def tearDown(self): try: os.remove('TestTwoImageMatching.net') Loading setup.py +0 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ def setup_package(): 'pandas', 'pyyaml', 'plio', 'cyvlfeat', 'pillow', 'pysal', 'scipy', Loading Loading
autocnet/graph/network.py +6 −1 Original line number Diff line number Diff line from collections import OrderedDict import itertools import math import os Loading Loading @@ -83,6 +84,7 @@ class CandidateGraph(nx.Graph): self.graph['creationdate'] = strftime("%Y-%m-%d %H:%M:%S", gmtime()) self.graph['modifieddate'] = strftime("%Y-%m-%d %H:%M:%S", gmtime()) def __eq__(self, other): eq = True # Check the nodes Loading @@ -94,6 +96,9 @@ class CandidateGraph(nx.Graph): eq = False return eq def _order_adjacency(self): # pragma: no cover self.adj = OrderedDict(sorted(self.adj.items())) @property def maxsize(self): if not hasattr(self, '_maxsize'): Loading Loading @@ -222,8 +227,8 @@ class CandidateGraph(nx.Graph): ---------- """ raise NotImplementedError self._order_adjacency() def extract_features(self, band=1, *args, **kwargs): # pragma: no cover """ Loading
autocnet/io/network.py +2 −0 Original line number Diff line number Diff line Loading @@ -126,4 +126,6 @@ def load(projectname): pass # Add a mock edge cg.edge[e['source']][e['target']] = edge cg._order_adjacency() return cg
functional_tests/test_three_image.py +0 −11 Original line number Diff line number Diff line Loading @@ -53,18 +53,7 @@ class TestThreeImageMatching(unittest.TestCase): cg.apply_func_to_edges("compute_homography", clean_keys=['symmetry', 'ratio']) cg.compute_fundamental_matrices(clean_keys=['symmetry', 'ratio'], reproj_threshold=3.0, method='ransac') # Step: And create a C object cg.generate_cnet(clean_keys=['symmetry', 'ratio', 'fundamental']) # Step: Create a fromlist to go with the cnet and write it to a file filelist = cg.to_filelist() write_filelist(filelist, 'TestThreeImageMatching_fromlist.lis') # Step: Create a correspondence network cg.generate_cnet(clean_keys=['fundamental'], deepen=True) to_isis('TestThreeImageMatching.net', cg.cn, mode='wb', networkid='TestThreeImageMatching', targetname='Moon') def tearDown(self): try: Loading
functional_tests/test_two_image.py +0 −4 Original line number Diff line number Diff line Loading @@ -87,10 +87,6 @@ class TestTwoImageMatching(unittest.TestCase): filelist = cg.to_filelist() write_filelist(filelist, path="fromlis.lis") # Step: Output a control network to_isis('TestTwoImageMatching.net', cg.cn, mode='wb', networkid='TestTwoImageMatching', targetname='Moon') def tearDown(self): try: os.remove('TestTwoImageMatching.net') Loading
setup.py +0 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ def setup_package(): 'pandas', 'pyyaml', 'plio', 'cyvlfeat', 'pillow', 'pysal', 'scipy', Loading