class_docstr: Class that represents a Pinhole Camera model.
  
  Args:
      intrinsics: tensor with shape :math:`(B, 4, 4)`
        containing the full 4x4 camera calibration matrix.
      extrinsics: tensor with shape :math:`(B, 4, 4)`
        containing the full 4x4 rotation-translation matrix.
      height: tensor with shape :math:`(B)` containing the image height.
      width: tensor with shape :math:`(B)` containing the image width.
  
  .. note::
      We assume that the class attributes are in batch form in order to take
      advantage of PyTorch parallelism to boost computing performance.
class_docstr_tok: ["Class","that","represents","a","Pinhole","Camera","model",".","Args",":","intrinsics",":","tensor","with","shape",":","math",":","`","(","B",",","4",",","4",")","`","containing","the","full","4x4","camera","calibration","matrix",".","extrinsics",":","tensor","with","shape",":","math",":","`","(","B",",","4",",","4",")","`","containing","the","full","4x4","rotation-translation","matrix",".","height",":","tensor","with","shape",":","math",":","`","(","B",")","`","containing","the","image","height",".","width",":","tensor","with","shape",":","math",":","`","(","B",")","`","containing","the","image","width",".","..","note",":",":","We","assume","that","the","class","attributes","are","in","batch","form","in","order","to","take","advantage","of","PyTorch","parallelism","to","boost","computing","performance","."]
docstr: Unproject a 2d point in 3d.
  
  Transform coordinates in the pixel frame to the world frame.
  
  Args:
      point2d: tensor containing the 2d to be projected to
          world coordinates. The shape of the tensor can be :math:`(*, 2)`.
      depth: tensor containing the depth value of each 2d
          points. The tensor shape must be equal to point2d :math:`(*, 1)`.
      normalize: whether to normalize the pointcloud. This
          must be set to `True` when the depth is represented as the Euclidean
          ray length from the camera position.
  
  Returns:
      tensor of (x, y, z) world coordinates with shape :math:`(*, 3)`.
  
  Example:
      >>> _ = torch.manual_seed(0)
      >>> x = torch.rand(1, 2)
      >>> depth = torch.ones(1, 1)
      >>> K = torch.eye(4)[None]
      >>> E = torch.eye(4)[None]
      >>> h = torch.ones(1)
      >>> w = torch.ones(1)
      >>> pinhole = kornia.geometry.camera.PinholeCamera(K, E, h, w)
      >>> pinhole.unproject(x, depth)
      tensor([[0.4963, 0.7682, 1.0000]])
docstr_tok: ["Unproject","a","2d","point","in","3d",".","Transform","coordinates","in","the","pixel","frame","to","the","world","frame",".","Args",":","point2d",":","tensor","containing","the","2d","to","be","projected","to","world","coordinates",".","The","shape","of","the","tensor","can","be",":","math",":","`","(","*",",","2",")","`",".","depth",":","tensor","containing","the","depth","value","of","each","2d","points",".","The","tensor","shape","must","be","equal","to","point2d",":","math",":","`","(","*",",","1",")","`",".","normalize",":","whether","to","normalize","the","pointcloud",".","This","must","be","set","to","`","True","`","when","the","depth","is","represented","as","the","Euclidean","ray","length","from","the","camera","position",".","Returns",":","tensor","of","(","x",",","y",",","z",")","world","coordinates","with","shape",":","math",":","`","(","*",",","3",")","`",".","Example",":",">",">",">","_","=","torch.manual_seed","(","0",")",">",">",">","x","=","torch.rand","(","1",",","2",")",">",">",">","depth","=","torch.ones","(","1",",","1",")",">",">",">","K","=","torch.eye","(","4",")","[","None","]",">",">",">","E","=","torch.eye","(","4",")","[","None","]",">",">",">","h","=","torch.ones","(","1",")",">",">",">","w","=","torch.ones","(","1",")",">",">",">","pinhole","=","kornia.geometry.camera.PinholeCamera","(","K",",","E",",","h",",","w",")",">",">",">","pinhole.unproject","(","x",",","depth",")","tensor","(","[","[","0.4963",",","0.7682",",","1.0000","]","]",")"]
code: def unproject(self, point_2d: Tensor, depth: Tensor) -> Tensor:
      r"""Unproject a 2d point in 3d.
  
      Transform coordinates in the pixel frame to the world frame.
  
      Args:
          point2d: tensor containing the 2d to be projected to
              world coordinates. The shape of the tensor can be :math:`(*, 2)`.
          depth: tensor containing the depth value of each 2d
              points. The tensor shape must be equal to point2d :math:`(*, 1)`.
          normalize: whether to normalize the pointcloud. This
              must be set to `True` when the depth is represented as the Euclidean
              ray length from the camera position.
  
      Returns:
          tensor of (x, y, z) world coordinates with shape :math:`(*, 3)`.
  
      Example:
          >>> _ = torch.manual_seed(0)
          >>> x = torch.rand(1, 2)
          >>> depth = torch.ones(1, 1)
          >>> K = torch.eye(4)[None]
          >>> E = torch.eye(4)[None]
          >>> h = torch.ones(1)
          >>> w = torch.ones(1)
          >>> pinhole = kornia.geometry.camera.PinholeCamera(K, E, h, w)
          >>> pinhole.unproject(x, depth)
          tensor([[0.4963, 0.7682, 1.0000]])
      """
      P = self.intrinsics @ self.extrinsics
      P_inv = _torch_inverse_cast(P)
      return transform_points(
          P_inv, convert_points_to_homogeneous(point_2d) * depth
      )
  
imports: from typing import Iterable, List, Union
  import torch
  from kornia.core import Device, Tensor, eye, stack, zeros
  from kornia.core.check import KORNIA_CHECK_SAME_DEVICE
  from kornia.geometry.conversions import convert_points_from_homogeneous, convert_points_to_homogeneous
  from kornia.geometry.linalg import inverse_transformation, transform_points
  from kornia.utils.helpers import _torch_inverse_cast
label_desc: Use image node_id 29 for calling the PinholeCamera obj's underlying member method code with example usage: obj.unproject(point_2d, depth) and returns: transform_points