code: def _opencv_from_cameras_projection(
      cameras: PerspectiveCameras,
      image_size: torch.Tensor,
  ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
      R_pytorch3d = cameras.R.clone()
      T_pytorch3d = cameras.T.clone()
      focal_pytorch3d = cameras.focal_length
      p0_pytorch3d = cameras.principal_point
      T_pytorch3d[:, :2] *= -1
      R_pytorch3d[:, :, :2] *= -1
      tvec = T_pytorch3d
      R = R_pytorch3d.permute(0, 2, 1)
  
      # Retype the image_size correctly and flip to width, height.
      image_size_wh = image_size.to(R).flip(dims=(1,))
  
      # NDC to screen conversion.
      scale = image_size_wh.to(R).min(dim=1, keepdim=True)[0] / 2.0
      scale = scale.expand(-1, 2)
      c0 = image_size_wh / 2.0
  
      principal_point = -p0_pytorch3d * scale + c0
      focal_length = focal_pytorch3d * scale
  
      camera_matrix = torch.zeros_like(R)
      camera_matrix[:, :2, 2] = principal_point
      camera_matrix[:, 2, 2] = 1.0
      camera_matrix[:, 0, 0] = focal_length[:, 0]
      camera_matrix[:, 1, 1] = focal_length[:, 1]
      return R, tvec, camera_matrix
  
file_path: pytorch3d/pytorch3d/renderer/camera_conversions.py
imports: import logging
  from typing import Tuple
  import torch
  from ..transforms import matrix_to_rotation_6d
  from .cameras import PerspectiveCameras
label_desc: Use image node_id 2 for calling a global function with example usage: _opencv_from_cameras_projection(cameras, image_size) and returns: R,  tvec,  camera_matrix