Commit 21bcdc67 authored by Jay's avatar Jay Committed by jay
Browse files

Fixed bug in homography computation, vis good to go.

parent 3faca1aa
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@ from autocnet.matcher import subpixel as sp
from autocnet.cg.cg import convex_hull_ratio, overlapping_polygon_area
from autocnet.vis.graph_view import plot_node, plot_edge


class Edge(object):
    """
    Attributes
@@ -106,7 +107,7 @@ class Edge(object):
            full_mask = np.where(mask == True)

        s_keypoints = self.source.keypoints.iloc[matches['source_idx'].values]
        d_keypoints = self.source.keypoints.iloc[matches['destination_idx'].values]
        d_keypoints = self.destination.keypoints.iloc[matches['destination_idx'].values]

        transformation_matrix, ransac_mask = od.compute_homography(s_keypoints[['x', 'y']].values,
                                                                   d_keypoints[['x', 'y']].values)
+5 −1
Original line number Diff line number Diff line
@@ -58,7 +58,11 @@ def plot_node(node, ax=None, clean_keys=[], **kwargs):
    if 'marker' in kwargs.keys():
        marker = kwargs['marker']
        kwargs.pop('marker', None)
    ax.scatter(keypoints['x'], keypoints['y'], marker=marker, **kwargs)
    color = 'r'
    if 'color' in kwargs.keys():
        color = kwargs['color']
        kwargs.pop('color', None)
    ax.scatter(keypoints['x'], keypoints['y'], marker=marker, color=color, **kwargs)

    return ax