Commit 0a288fa0 authored by Jay's avatar Jay
Browse files

Fixes functional testing issues - tested using pytest

parent df094f2b
Loading
Loading
Loading
Loading
+1 −1
Changes for .travis.yml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ install:
  - conda install -c conda-forge vlfeat
  - conda install -c menpo cyvlfeat
  - pip install pillow pysal
  - conda install scipy networkx numexpr dill cython pyyaml matplotlib runipy
  - conda install scipy networkx numexpr dill cython pyyaml matplotlib runipy pytest

  # Development installation
  - conda install nose coverage sh anaconda-client
+1 −1
Changes for autocnet/graph/network.py: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -487,7 +487,7 @@ class CandidateGraph(nx.Graph):
        """
        filelist = []
        for i, node in self.nodes_iter(data=True):
            filelist.append(node.image_path)
            filelist.append(node['image_path'])
        return filelist

    def generate_cnet(self, *args, deepen=False, **kwargs):
+1 −1
Changes for autocnet/matcher/add_depth.py: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ def deepen_correspondences(ab_kp, bc, source_idx,
    bc_x[:, :2] = bc.destination.get_keypoint_coordinates().values

    # Grab F for reprojection
    f_matrix = bc.fundamental_matrix
    f_matrix = bc['fundamental_matrix']

    # Compute the epipolar line projecting point ab into bc
    epipolar_line = normalize_vector(ab_kp.dot(f_matrix.T))
+5 −5
Changes for autocnet/matcher/cpu_decompose.py: 5 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -79,9 +79,9 @@ def decompose_and_match(self, k=2, maxiteration=3, size=18, buf_dist=3,**kwargs)
            bd = b.descriptors

        # Load, train, and match
        fl.add(ad, a.node_id, index=aidx)
        fl.add(ad, a['node_id'], index=aidx)
        fl.train()
        matches = fl.query(bd, b.node_id, k, index=bidx)
        matches = fl.query(bd, b['node_id'], k, index=bidx)
        if self.matches is None:
            self.matches = matches
        else:
@@ -144,7 +144,7 @@ def decompose_and_match(self, k=2, maxiteration=3, size=18, buf_dist=3,**kwargs)
            bsub = ddata[mindy:maxdy, mindx:maxdx]

            # Utilize the FLANN matcher to find a match to approximate a center
            fl.add(self.destination.descriptors, self.destination.node_id)
            fl.add(self.destination.descriptors, self.destination['node_id'])
            fl.train()

            scounter = 0
@@ -158,7 +158,7 @@ def decompose_and_match(self, k=2, maxiteration=3, size=18, buf_dist=3,**kwargs)
                    size = len(sub_skp)
                candidate_idx = np.random.choice(sub_skp.index, size=size, replace=False)
                candidates = self.source.descriptors[candidate_idx]
                matches = fl.query(candidates, self.source.node_id, k=3, index=candidate_idx)
                matches = fl.query(candidates, self.source['node_id'], k=3, index=candidate_idx)

                # Apply Lowe's ratio test to try to find a 'good' starting point
                mask = matches.groupby('source_idx')['distance'].transform(func).astype('bool')
@@ -182,7 +182,7 @@ def decompose_and_match(self, k=2, maxiteration=3, size=18, buf_dist=3,**kwargs)

                # Grab the corresponding point in the destination
                q = candidate_matches.query('source_idx == {}'.format(closest.name))
                dest_idx = q['destination_idx'].iat[0]
                dest_idx = int(q['destination_idx'].iat[0])
                doriginx = dkp.at[dest_idx, 'x']
                doriginy = dkp.at[dest_idx, 'y']

+1 −1
Changes for functional_tests/test_three_image.py: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ class TestThreeImageMatching(unittest.TestCase):
        for i, node, in cg.nodes_iter(data=True):
            self.assertIn(node.nkeypoints, range(490, 511))

        cg.match_features(k=5)
        cg.match(k=5)
        cg.symmetry_checks()
        cg.ratio_checks()

Loading