class_docstr: Volumetric TSDF Fusion of RGB-D Images.
      
class_docstr_tok: ["Volumetric","TSDF","Fusion","of","RGB-D","Images","."]
docstr: Convert camera coordinates to pixel coordinates.
          
docstr_tok: ["Convert","camera","coordinates","to","pixel","coordinates","."]
code: def cam2pix(cam_pts, intr):
      """Convert camera coordinates to pixel coordinates."""
      intr = intr.astype(np.float32)
      fx, fy = intr[0, 0], intr[1, 1]
      cx, cy = intr[0, 2], intr[1, 2]
      pix = np.empty((cam_pts.shape[0], 2), dtype=np.int64)
      for i in prange(cam_pts.shape[0]):
          pix[i, 0] = int(
              np.round((cam_pts[i, 0] * fx / cam_pts[i, 2]) + cx)
          )
          pix[i, 1] = int(
              np.round((cam_pts[i, 1] * fy / cam_pts[i, 2]) + cy)
          )
      return pix
  
file_path: torch-points3d/torch_points3d/datasets/registration/fusion.py
imports: import numpy
  from numba import njit, prange
  from skimage import measure
label_desc: Use image node_id 3 for calling the TSDFVolume obj's underlying member method code with example usage: obj.cam2pix(cam_pts, intr) and returns: pix