Loading autocnet/camera/camera.py +4 −2 Original line number Diff line number Diff line Loading @@ -103,10 +103,12 @@ def triangulate(pt, pt1, p, p1): pt = pt.T if pt1.shape[0] != 3: pt1 = pt1.T if cv2: #if cv2: X = cv2.triangulatePoints(p, p1, pt[:2], pt1[:2]) X /= X[3] # Homogenize return X """ # Stubbed in for a ticket addressing making OpenCV an optional dependency else: npts = len(pt) a = np.zeros((4, 4)) Loading @@ -123,7 +125,7 @@ def triangulate(pt, pt1, p, p1): v = vh.T coords[i] = v[:,3] / (v[:,3][-1]) return coords.T """ def projection_error(p1, p, pt, pt1): """ Based on Hartley and Zisserman p.285 this function triangulates Loading autocnet/graph/edge.py +1 −1 Original line number Diff line number Diff line Loading @@ -206,7 +206,7 @@ class Edge(dict, MutableMapping): # Set the initial state of the fundamental mask in the masks self.masks = ('fundamental', mask) def refine_fundamental_matrix_matches(self, **kwargs): def refine_fundamental_matrix_matches(self, **kwargs): # pragma: no cover """ Given an estimated fundamental matrix, refine the correspondences based on the reprojective error. Loading Loading
autocnet/camera/camera.py +4 −2 Original line number Diff line number Diff line Loading @@ -103,10 +103,12 @@ def triangulate(pt, pt1, p, p1): pt = pt.T if pt1.shape[0] != 3: pt1 = pt1.T if cv2: #if cv2: X = cv2.triangulatePoints(p, p1, pt[:2], pt1[:2]) X /= X[3] # Homogenize return X """ # Stubbed in for a ticket addressing making OpenCV an optional dependency else: npts = len(pt) a = np.zeros((4, 4)) Loading @@ -123,7 +125,7 @@ def triangulate(pt, pt1, p, p1): v = vh.T coords[i] = v[:,3] / (v[:,3][-1]) return coords.T """ def projection_error(p1, p, pt, pt1): """ Based on Hartley and Zisserman p.285 this function triangulates Loading
autocnet/graph/edge.py +1 −1 Original line number Diff line number Diff line Loading @@ -206,7 +206,7 @@ class Edge(dict, MutableMapping): # Set the initial state of the fundamental mask in the masks self.masks = ('fundamental', mask) def refine_fundamental_matrix_matches(self, **kwargs): def refine_fundamental_matrix_matches(self, **kwargs): # pragma: no cover """ Given an estimated fundamental matrix, refine the correspondences based on the reprojective error. Loading