pose encoder model
This commit is contained in:
+2
-2
@@ -113,10 +113,10 @@ def proj(camLoc):
|
||||
return intrinsic().dot(extrinsic(camLoc))
|
||||
|
||||
|
||||
def get_camera(cam, img_size, device):
|
||||
def get_camera(cam, img_size, device, res_x=640, res_y=480):
|
||||
size = np.array(img_size, dtype=np.float32)
|
||||
ext = torch.tensor(extrinsic(cam).astype(np.float32), device=device)
|
||||
K = torch.tensor(intrinsic()[None, :, :], device=device)
|
||||
K = torch.tensor(intrinsic(res_x, res_y)[None, :, :], device=device)
|
||||
cameras = cameras_from_opencv_projection(R=ext[None, :, :3], tvec=ext[None, :, 3], camera_matrix=K, image_size=torch.tensor(size[None, :], device=device))
|
||||
return cameras, K
|
||||
|
||||
|
||||
Reference in New Issue
Block a user