class_docstr: Warp tensors by homographies.
  
  .. math::
  
      X_{dst} = H_{src}^{\{dst\}} * X_{src}
  
  Args:
      height: The height of the destination tensor.
      width: The width of the destination tensor.
      mode: interpolation mode to calculate output values ``'bilinear'`` | ``'nearest'``.
      padding_mode: padding mode for outside grid values
        ``'zeros'`` | ``'border'`` | ``'reflection'``.
      normalized_coordinates: whether to use a grid with normalized coordinates.
      align_corners: interpolation flag.
class_docstr_tok: ["Warp","tensors","by","homographies",".","..","math",":",":","X_","{","dst","}","=","H_","{","src","}","^","{","\\","{","dst\\","}","}","*","X_","{","src","}","Args",":","height",":","The","height","of","the","destination","tensor",".","width",":","The","width","of","the","destination","tensor",".","mode",":","interpolation","mode","to","calculate","output","values","``","'bilinear","'","``","|","``","'nearest","'","``",".","padding_mode",":","padding","mode","for","outside","grid","values","``","'zeros","'","``","|","``","'border","'","``","|","``","'reflection","'","``",".","normalized_coordinates",":","whether","to","use","a","grid","with","normalized","coordinates",".","align_corners",":","interpolation","flag","."]
code: def __init__(
      self,
      height: int,
      width: int,
      mode: str = "bilinear",
      padding_mode: str = "zeros",
      normalized_coordinates: bool = True,
      align_corners: bool = False,
  ) -> None:
      super().__init__(height, width)
      self.mode = mode
      self.padding_mode = padding_mode
      self.normalized_coordinates = normalized_coordinates
      self.align_corners = align_corners
      # create base grid to compute the flow
      self.grid = create_meshgrid(
          height, width, normalized_coordinates=normalized_coordinates
      )
  
      # initialice the warped destination grid
      self._warped_grid = None
  
file_path: kornia/kornia/geometry/transform/homography_warper.py
imports: from __future__ import annotations
  from abc import abstractmethod
  from typing import Any, Optional
  import torch.nn.functional
  from kornia.core import Module, Tensor
  from kornia.utils import create_meshgrid
  from .imgwarp import homography_warp, warp_grid
label_desc: Use image node_id 1 to create a new HomographyWarper object from inherited base classes: BaseWarper with example: obj = HomographyWarper(height, width, mode, padding_mode, normalized_coordinates, align_corners)