Skip to content
Permalink
Browse files

remove transpose (#588)

  • Loading branch information...
dekerr authored and rbiasini committed Apr 6, 2019
1 parent 4662cfc commit bdf65856506414ed57afe8b79a345ae2477632f4
Showing with 2 additions and 2 deletions.
  1. +2 −2 common/transformations/camera.py
@@ -64,7 +64,7 @@ def normalize(img_pts, intrinsics=eon_intrinsics):
input_shape = img_pts.shape
img_pts = np.atleast_2d(img_pts)
img_pts = np.hstack((img_pts, np.ones((img_pts.shape[0],1))))
img_pts_normalized = intrinsics_inv.dot(img_pts.T).T
img_pts_normalized = img_pts.dot(intrinsics_inv.T)
img_pts_normalized[(img_pts < 0).any(axis=1)] = np.nan
return img_pts_normalized[:,:2].reshape(input_shape)

@@ -76,7 +76,7 @@ def denormalize(img_pts, intrinsics=eon_intrinsics):
input_shape = img_pts.shape
img_pts = np.atleast_2d(img_pts)
img_pts = np.hstack((img_pts, np.ones((img_pts.shape[0],1))))
img_pts_denormalized = intrinsics.dot(img_pts.T).T
img_pts_denormalized = img_pts.dot(intrinsics.T)
img_pts_denormalized[img_pts_denormalized[:,0] > W] = np.nan
img_pts_denormalized[img_pts_denormalized[:,0] < 0] = np.nan
img_pts_denormalized[img_pts_denormalized[:,1] > H] = np.nan

0 comments on commit bdf6585

Please sign in to comment.
You can’t perform that action at this time.