class_docstr: Base class to represent camera models based on distortion and projection types.
  
  Distortion is of 3 types:
      - Affine
      - Brown Conrady
      - Kannala Brandt K3
  Projection is of 2 types:
      - Z1
      - Orthographic
  
  Example:
      >>> params = torch.Tensor([328., 328., 320., 240.])
      >>> cam = CameraModelBase(BrownConradyTransform(), Z1Projection(), ImageSize(480, 640), params)
      >>> cam.params
      tensor([328., 328., 320., 240.])
class_docstr_tok: ["Base","class","to","represent","camera","models","based","on","distortion","and","projection","types",".","Distortion","is","of","3","types",":","-","Affine","-","Brown","Conrady","-","Kannala","Brandt","K3","Projection","is","of","2","types",":","-","Z1","-","Orthographic","Example",":",">",">",">","params","=","torch.Tensor","(","[","328.",",","328.",",","320.",",","240",".","]",")",">",">",">","cam","=","CameraModelBase","(","BrownConradyTransform","(",")",",","Z1Projection","(",")",",","ImageSize","(","480",",","640",")",",","params",")",">",">",">","cam.params","tensor","(","[","328.",",","328.",",","320.",",","240",".","]",")"]
docstr: Constructor method for CameraModelBase class.
  
  Args:
      distortion: Distortion type
      projection: Projection type
      image_size: Image size
      params: Camera parameters of shape :math:`(B, 4)`
              for PINHOLE Camera, :math:`(B, 12)`
              for Brown Conrady, :math:`(B, 8)`
              for Kannala Brandt K3.
code: def __init__(
      self,
      distortion: CameraDistortionType,
      projection: CameraProjectionType,
      image_size: ImageSize,
      params: Tensor,
  ) -> None:
      """Constructor method for CameraModelBase class.
  
      Args:
          distortion: Distortion type
          projection: Projection type
          image_size: Image size
          params: Camera parameters of shape :math:`(B, 4)`
                  for PINHOLE Camera, :math:`(B, 12)`
                  for Brown Conrady, :math:`(B, 8)`
                  for Kannala Brandt K3.
      """
      self.distortion = distortion
      self.projection = projection
      self._image_size = image_size
      self._height = image_size.height
      self._width = image_size.width
      self._params = params
  
imports: from __future__ import annotations
  from enum import Enum
  from typing import Any, Union
  from kornia.core import Tensor, stack, zeros_like
  from kornia.geometry.vector import Vector2, Vector3
  from kornia.image import ImageSize
  from kornia.sensors.camera.distortion_model import AffineTransform, BrownConradyTransform, KannalaBrandtK3Transform
  from kornia.sensors.camera.projection_model import OrthographicProjection, Z1Projection
label_desc: Use image node_id 1 to create a new CameraModelBase object  with example: obj = CameraModelBase(distortion, projection, image_size, params)