Commit cc749019 authored by jlaura's avatar jlaura Committed by GitHub
Browse files

Merge pull request #224 from jlaura/master

Updates for plio change
parents 1b940d5c e8ba24e6
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
from collections import OrderedDict
import itertools
import math
import os
@@ -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
@@ -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'):
@@ -222,8 +227,8 @@ class CandidateGraph(nx.Graph):
        ----------

        """

        raise NotImplementedError
        self._order_adjacency()

    def extract_features(self, band=1, *args, **kwargs):  # pragma: no cover
        """
+2 −0
Original line number Diff line number Diff line
@@ -126,4 +126,6 @@ def load(projectname):
                pass
            # Add a mock edge
            cg.edge[e['source']][e['target']] = edge

            cg._order_adjacency()
    return cg
+0 −11
Original line number Diff line number Diff line
@@ -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:
+0 −4
Original line number Diff line number Diff line
@@ -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')
+0 −1
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@ def setup_package():
            'pandas',
            'pyyaml',
            'plio',
            'cyvlfeat',
            'pillow',
            'pysal',
            'scipy',