Commit cf726099 authored by Jay's avatar Jay Committed by Jason R Laura
Browse files

Updates for code comments.

parent 9726c9c1
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
import numpy as np
import pandas as pd

import cv2


@@ -96,10 +94,8 @@ def triangulate(pt, pt1, p, p1):
             (4, n) projection matrix

    """
    if isinstance(pt, pd.DataFrame):
        pt = pt.values
    if isinstance(pt1, pd.DataFrame):
        pt1 = pt.values
    pt = np.asarray(pt)
    pt1 = np.asarray(pt1)

    # Transpose for the openCV call if needed
    if pt.shape[0] != 3:
+1 −7
Original line number Diff line number Diff line
@@ -207,12 +207,6 @@ class Edge(dict, MutableMapping):
        # Set the initial state of the fundamental mask in the masks
        self.masks = ('fundamental', mask)

    def add_putative_matches(self):
        if not hasattr(self, 'fundamental_matrix'):
            raise(ValueError, 'Fundamental matric has not been computed')

        F = self.fundamental_matrix

    def compute_homography(self, method='ransac', clean_keys=[], pid=None, **kwargs):
        """
        For each edge in the (sub) graph, compute the homography
@@ -248,7 +242,7 @@ class Edge(dict, MutableMapping):
                                d_keypoints.values)

        # Convert the truncated RANSAC mask back into a full length mask
        mask[mask] = self.homography.mask.ravel()
        mask[mask] = self.homography.mask
        self.masks = ('ransac', mask)

        # Finalize the array to get custom attrs to propagate