Commit b6082f23 authored by Adam Paquette's avatar Adam Paquette
Browse files

updated node to display percentage, removed args and kwargs from network overlap method

parent 4ed9f3a4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -474,7 +474,7 @@ class CandidateGraph(nx.Graph):
        '''
        self.apply_func_to_edges('suppress', *args, **kwargs)

    def overlap(self, *args, **kwargs):
    def overlap(self):
        '''
        Compute the percentage and area coverage of two images

+3 −2
Original line number Diff line number Diff line
@@ -119,7 +119,8 @@ class Node(dict, MutableMapping):
        """
        Determines the area of keypoint coverage
        using the unprojected image, resulting
        in a rough estimation of the area being covered.
        in a rough estimation of the percentage area
        being covered.

        Returns
        -------
@@ -137,7 +138,7 @@ class Node(dict, MutableMapping):

        total_area = max_x * max_y

        self.coverage_area = hull_area/total_area
        self.coverage_area = (hull_area/total_area)*100

        return self.coverage_area

+1 −1
Original line number Diff line number Diff line
@@ -82,4 +82,4 @@ class TestNode(unittest.TestCase):

        coverage_percn = self.node.coverage()

        self.assertAlmostEqual(coverage_percn, 0.380613955)
        self.assertAlmostEqual(coverage_percn, 38.06139557)