diff --git a/opensfm/types.py b/opensfm/types.py index 98551939a..e314d5a55 100644 --- a/opensfm/types.py +++ b/opensfm/types.py @@ -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.""" @@ -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.""" @@ -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."""