class_docstr: Class to handle camera geometry.
class_docstr_tok: ["Class","to","handle","camera","geometry","."]
docstr: Returns the local ray directions for the provided pixels.
docstr_tok: ["Returns","the","local","ray","directions","for","the","provided","pixels","."]
code: def pixel_to_local_rays(self, pixels: np.ndarray):
      """Returns the local ray directions for the provided pixels."""
      y = (
          pixels[..., 1] - self.principal_point_y
      ) / self.scale_factor_y
      x = (
          pixels[..., 0] - self.principal_point_x - y * self.skew
      ) / self.scale_factor_x
  
      if self.has_radial_distortion or self.has_tangential_distortion:
          x, y = _radial_and_tangential_undistort(
              x,
              y,
              k1=self.radial_distortion[0],
              k2=self.radial_distortion[1],
              k3=self.radial_distortion[2],
              p1=self.tangential_distortion[0],
              p2=self.tangential_distortion[1],
          )
  
      dirs = np.stack([x, y, np.ones_like(x)], axis=-1)
      return dirs / np.linalg.norm(dirs, axis=-1, keepdims=True)
  
imports: import copy
  import json
  from typing import Tuple, Union, Optional
  import numpy
  from nerfies import gpath
  from nerfies import types
label_desc: Use image node_id 16 for calling the Camera obj's underlying member method code with example usage: obj.pixel_to_local_rays(pixels) and returns: unknown