class_docstr: A duplicate of our JAX-basded camera class.
  
  This is necessary to use tf.data.Dataset.
class_docstr_tok: ["A","duplicate","of","our","JAX-basded","camera","class",".","This","is","necessary","to","use","tf.data.Dataset","."]
docstr: Constructor for camera class.
docstr_tok: ["Constructor","for","camera","class","."]
code: def __init__(
      self,
      orientation: tnp.ndarray,
      position: tnp.ndarray,
      focal_length: float,
      principal_point: tnp.ndarray,
      image_size: tnp.ndarray,
      skew: float = 0.0,
      pixel_aspect_ratio: float = 1.0,
      radial_distortion: Optional[tnp.ndarray] = None,
      tangential_distortion: Optional[tnp.ndarray] = None,
      dtype=tnp.float32,
  ):
      """Constructor for camera class."""
      if radial_distortion is None:
          radial_distortion = tnp.array([0.0, 0.0, 0.0], dtype)
      if tangential_distortion is None:
          tangential_distortion = tnp.array([0.0, 0.0], dtype)
  
      self.orientation = tnp.array(orientation, dtype)
      self.position = tnp.array(position, dtype)
      self.focal_length = tnp.array(focal_length, dtype)
      self.principal_point = tnp.array(principal_point, dtype)
      self.skew = tnp.array(skew, dtype)
      self.pixel_aspect_ratio = tnp.array(pixel_aspect_ratio, dtype)
      self.radial_distortion = tnp.array(radial_distortion, dtype)
      self.tangential_distortion = tnp.array(
          tangential_distortion, dtype
      )
      self.image_size = tnp.array(image_size, dtype)
      self.dtype = dtype
  
imports: from typing import Tuple, Optional
  import tensorflow
  from tensorflow.experimental import numpy
label_desc: Use image node_id 1 to create a new TFCamera object  with example: obj = TFCamera(orientation, position, focal_length, principal_point, image_size, skew, pixel_aspect_ratio, radial_distortion, tangential_distortion, dtype)