Skip to content

Commit

Permalink
transpose output of project_many
Browse files Browse the repository at this point in the history
  • Loading branch information
mlopezantequera committed Feb 9, 2018
1 parent 6894009 commit 602d5c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions opensfm/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def project_many(self, points):
distortion = np.array([self.k1, self.k2, 0, 0, 0])
K, R, t = self.get_K(), np.zeros(3), np.zeros(3)
pixels, _ = cv2.projectPoints(points, R, t, K, distortion)
return pixels.reshape((2, -1))
return pixels.reshape((-1, 2))

def pixel_bearing(self, pixel):
"""Unit vector pointing to the pixel viewing direction."""
Expand Down Expand Up @@ -346,7 +346,7 @@ def project_many(self, points):
distortion = np.array([self.k1, self.k2, self.p1, self.p2, self.k3])
K, R, t = self.get_K(), np.zeros(3), np.zeros(3)
pixels, _ = cv2.projectPoints(points, R, t, K, distortion)
return pixels.reshape((2, -1))
return pixels.reshape((-1, 2))

def pixel_bearing(self, pixel):
"""Unit vector pointing to the pixel viewing direction."""
Expand Down Expand Up @@ -451,7 +451,7 @@ def project_many(self, points):
distortion = np.array([self.k1, self.k2, 0., 0.])
K, R, t = self.get_K(), np.zeros(3), np.zeros(3)
pixels, _ = cv2.fisheye.projectPoints(points, R, t, K, distortion)
return pixels.reshape((2, -1))
return pixels.reshape((-1, 2))

def pixel_bearing(self, pixel):
"""Unit vector pointing to the pixel viewing direction."""
Expand Down

0 comments on commit 602d5c9

Please sign in to comment.