code: def pulsar_from_opencv_projection(
      R: torch.Tensor,
      tvec: torch.Tensor,
      camera_matrix: torch.Tensor,
      image_size: torch.Tensor,
      znear: float = 0.1,
  ) -> torch.Tensor:
      """
      Convert OpenCV style camera parameters to Pulsar style camera parameters.
  
      Note:
          * Pulsar does NOT support different focal lengths for x and y.
            For conversion, we use the average of fx and fy.
          * The Pulsar renderer MUST use a left-handed coordinate system for this
            mapping to work.
          * The resulting image will be vertically flipped - which has to be
            addressed AFTER rendering by the user.
          * The parameters `R, tvec, camera_matrix` correspond to the outputs
            of `cv2.decomposeProjectionMatrix`.
  
      Args:
          R: A batch of rotation matrices of shape `(N, 3, 3)`.
          tvec: A batch of translation vectors of shape `(N, 3)`.
          camera_matrix: A batch of camera calibration matrices of shape `(N, 3, 3)`.
          image_size: A tensor of shape `(N, 2)` containing the sizes of the images
              (height, width) attached to each camera.
          znear (float): The near clipping value to use for Pulsar.
  
      Returns:
          cameras_pulsar: A batch of `N` Pulsar camera vectors in the Pulsar
              convention `(N, 13)` (3 translation, 6 rotation, focal_length, sensor_width,
              c_x, c_y).
      """
      return _pulsar_from_opencv_projection(
          R, tvec, camera_matrix, image_size, znear
      )
  
imports: from typing import Tuple
  import torch
  from ..renderer import PerspectiveCameras
  from ..renderer.camera_conversions import _cameras_from_opencv_projection, _opencv_from_cameras_projection, _pulsar_from_cameras_projection, _pulsar_from_opencv_projection
label_desc: Use image node_id 3 for calling a global function with example usage: pulsar_from_opencv_projection(R, tvec, camera_matrix, image_size, znear) and returns: _pulsar_from_opencv_projection