code: def cv2_project_points(pts, rvec, tvec, camera_matrix):
      """
      Reproduces the `cv2.projectPoints` function from OpenCV using PyTorch.
      """
      R = so3_exp_map(rvec)
      pts_proj_3d = (
          camera_matrix.bmm(
              R.bmm(pts.permute(0, 2, 1)) + tvec[:, :, None]
          )
      ).permute(0, 2, 1)
      depth = pts_proj_3d[..., 2:]
      pts_proj_2d = pts_proj_3d[..., :2] / depth
      return pts_proj_2d
  
file_path: pytorch3d/tests/test_camera_conversions.py
imports: import json
  import unittest
  import numpy
  import torch
  from pytorch3d.ops import eyes
  from pytorch3d.renderer.points.pulsar import Renderer
  from pytorch3d.transforms import so3_exp_map, so3_log_map
  from pytorch3d.utils import cameras_from_opencv_projection, opencv_from_cameras_projection, pulsar_from_opencv_projection
  from .common_testing import get_tests_dir, TestCaseMixin
label_desc: Use image node_id 1 for calling a global function with example usage: cv2_project_points(pts, rvec, tvec, camera_matrix) and returns: pts_proj_2d