class_docstr: Class for Pinhole Camera models.
docstr: Computes the intrinsic matrix for the camera based on field of views.
  
  Parameters:
      fovx: float - Field of view in X direction.
      fovy: float - Field of view in Y direction.
  
  Returns:
      np.ndarray: The intrinsic matrix.
docstr_tok: ["Computes","the","intrinsic","matrix","for","the","camera","based","on","field","of","views",".","Parameters",":","fovx",":","float","-","Field","of","view","in","X","direction",".","fovy",":","float","-","Field","of","view","in","Y","direction",".","Returns",":","np.ndarray",":","The","intrinsic","matrix","."]
code: def compute_intrinsics(self, fovx: float, fovy: float) -> np.ndarray:
      """
      Computes the intrinsic matrix for the camera based on field of views.
  
      Parameters:
          fovx: float - Field of view in X direction.
          fovy: float - Field of view in Y direction.
  
      Returns:
          np.ndarray: The intrinsic matrix.
      """
      focal_x = self.width / (2 * np.tan(np.deg2rad(fovx) / 2))
      focal_y = self.height / (2 * np.tan(np.deg2rad(fovy) / 2))
      cx, cy = self.width / 2, self.height / 2
      return np.array([focal_x, focal_y, cx, cy])
  
imports: from abc import ABC, abstractmethod
  from typing import List
  import numpy
  import torch
label_desc: Use image node_id 2 for calling the PinholeCamera obj's underlying member method code with example usage: obj.compute_intrinsics(fovx, fovy) and returns: np