code: def test_compute_projection_matrix(self, batch_size, device, dtype):
      height, width = 3, 5  # output shape
      pinhole_src, pinhole_dst = self._create_pinhole_pair(
          batch_size, device, dtype
      )
      pinhole_dst.tx += 1.0  # apply offset to tx
  
      # create warper
      warper = kornia.geometry.depth.DepthWarper(
          pinhole_dst, height, width
      )
      assert warper._dst_proj_src is None
  
      # initialize projection matrices
      warper.compute_projection_matrix(pinhole_src)
      assert warper._dst_proj_src is not None
  
      # retrieve computed projection matrix and compare to expected
      dst_proj_src = warper._dst_proj_src
      dst_proj_src_expected = torch.eye(4, device=device, dtype=dtype)[
          None
      ].repeat(
          batch_size, 1, 1
      )  # Bx4x4
      dst_proj_src_expected[..., 0, -2] += pinhole_src.cx
      dst_proj_src_expected[..., 1, -2] += pinhole_src.cy
      dst_proj_src_expected[..., 0, -1] += 1.0  # offset to x-axis
      assert_close(dst_proj_src, dst_proj_src_expected)
  
file_path: kornia/test/geometry/test_depth_warper.py
imports: import pytest
  import torch
  from torch.autograd import gradcheck
  import kornia
  import kornia.testing
  from kornia.geometry.conversions import normalize_pixel_coordinates
  from kornia.testing import assert_close
label_desc: Use image node_id 2 for calling the TestDepthWarper obj's underlying member method code with example usage: obj.test_compute_projection_matrix(batch_size, device, dtype) without return types