class_docstr: Warp a patch by depth.
  
  .. math::
      P_{src}^{\{dst\}} = K_{dst} * T_{src}^{\{dst\}}
  
      I_{src} = \\omega(I_{dst}, P_{src}^{\{dst\}}, D_{src})
  
  Args:
      pinholes_dst: the pinhole models for the destination frame.
      height: the height of the image to warp.
      width: the width of the image to warp.
      mode: interpolation mode to calculate output values ``'bilinear'`` | ``'nearest'``.
      padding_mode: padding mode for outside grid values ``'zeros'`` | ``'border'`` | ``'reflection'``.
      align_corners: interpolation flag.
class_docstr_tok: ["Warp","a","patch","by","depth",".","..","math",":",":","P_","{","src","}","^","{","\\","{","dst\\","}","}","=","K_","{","dst","}","*","T_","{","src","}","^","{","\\","{","dst\\","}","}","I_","{","src","}","=","\\\\omega","(","I_","{","dst","}",",","P_","{","src","}","^","{","\\","{","dst\\","}","}",",","D_","{","src","}",")","Args",":","pinholes_dst",":","the","pinhole","models","for","the","destination","frame",".","height",":","the","height","of","the","image","to","warp",".","width",":","the","width","of","the","image","to","warp",".","mode",":","interpolation","mode","to","calculate","output","values","``","'bilinear","'","``","|","``","'nearest","'","``",".","padding_mode",":","padding","mode","for","outside","grid","values","``","'zeros","'","``","|","``","'border","'","``","|","``","'reflection","'","``",".","align_corners",":","interpolation","flag","."]
code: def __init__(
      self,
      pinhole_dst: PinholeCamera,
      height: int,
      width: int,
      mode: str = "bilinear",
      padding_mode: str = "zeros",
      align_corners: bool = True,
  ) -> None:
      super().__init__()
      # constructor members
      self.width: int = width
      self.height: int = height
      self.mode: str = mode
      self.padding_mode: str = padding_mode
      self.eps = 1e-6
      self.align_corners: bool = align_corners
  
      # state members
      self._pinhole_dst: PinholeCamera = pinhole_dst
      self._pinhole_src: None | PinholeCamera = None
      self._dst_proj_src: None | Tensor = None
  
      self.grid: Tensor = self._create_meshgrid(height, width)
  
imports: from __future__ import annotations
  from typing import Optional
  import torch
  import kornia.core
  from kornia.core import Module, Tensor, tensor
  from kornia.core.check import KORNIA_CHECK, KORNIA_CHECK_IS_TENSOR, KORNIA_CHECK_SHAPE
  from kornia.filters.sobel import spatial_gradient
  from kornia.utils import create_meshgrid
  from kornia.utils.helpers import deprecated
  from .camera import PinholeCamera, cam2pixel, pixel2cam, project_points, unproject_points
  from .conversions import normalize_pixel_coordinates, normalize_points_with_intrinsics
  from .linalg import compose_transformations, convert_points_to_homogeneous, inverse_transformation, transform_points
label_desc: Use image node_id 1 to create a new DepthWarper object from inherited base classes: Module with example: obj = DepthWarper(pinhole_dst, height, width, mode, padding_mode, align_corners)