class_docstr: Module, which performs local-feature-based tracking of the target planar object in the sequence of the
  frames.
  
  Args:
      initial_matcher: image matching module, e.g. :class:`~kornia.feature.LocalFeatureMatcher`
                        or :class:`~kornia.feature.LoFTR`. Default: :class:`~kornia.feature.GFTTAffNetHardNet`.
      fast_matcher: fast image matching module, e.g. :class:`~kornia.feature.LocalFeatureMatcher`
                        or :class:`~kornia.feature.LoFTR`. Default: :class:`~kornia.feature.DescriptorMatcher`.
      ransac: homography estimation module. Default: :class:`~kornia.geometry.RANSAC`.
      minimum_inliers_num: threshold for number inliers for matching to be successful.
class_docstr_tok: ["Module",",","which","performs","local-feature-based","tracking","of","the","target","planar","object","in","the","sequence","of","the","frames",".","Args",":","initial_matcher",":","image","matching","module",",","e.g",".",":","class",":","`","~kornia.feature.LocalFeatureMatcher","`","or",":","class",":","`","~kornia.feature.LoFTR","`",".","Default",":",":","class",":","`","~kornia.feature.GFTTAffNetHardNet","`",".","fast_matcher",":","fast","image","matching","module",",","e.g",".",":","class",":","`","~kornia.feature.LocalFeatureMatcher","`","or",":","class",":","`","~kornia.feature.LoFTR","`",".","Default",":",":","class",":","`","~kornia.feature.DescriptorMatcher","`",".","ransac",":","homography","estimation","module",".","Default",":",":","class",":","`","~kornia.geometry.RANSAC","`",".","minimum_inliers_num",":","threshold","for","number","inliers","for","matching","to","be","successful","."]
docstr: The frame `x` is prewarped according to the previous frame homography, matched with fast_matcher
  verified with ransac.
docstr_tok: ["The","frame","`","x","`","is","prewarped","according","to","the","previous","frame","homography",",","matched","with","fast_matcher","verified","with","ransac","."]
code: def track_next_frame(self, x: Tensor) -> Tuple[Tensor, bool]:
      """The frame `x` is prewarped according to the previous frame homography, matched with fast_matcher
      verified with ransac."""
      if self.previous_homography is not None:  # mypy, shut up
          Hwarp = self.previous_homography.clone()[None]
      # make a bit of border for safety
      Hwarp[:, 0:2, 0:2] = Hwarp[:, 0:2, 0:2] / 0.8
      Hwarp[:, 0:2, 2] -= 10.0
      Hinv = torch.inverse(Hwarp)
      h, w = self.target.shape[2:]
      frame_warped = warp_perspective(x, Hinv, (h, w))
      input_dict: Dict[str, Tensor] = {
          "image0": self.target,
          "image1": frame_warped,
      }
      for k, v in self.target_fast_representation.items():
          input_dict[f"{k}0"] = v
  
      match_dict = self.fast_matcher(input_dict)
      keypoints0 = match_dict["keypoints0"][
          match_dict["batch_indexes"] == 0
      ]
      keypoints1 = match_dict["keypoints1"][
          match_dict["batch_indexes"] == 0
      ]
      keypoints1 = transform_points(Hwarp, keypoints1)
  
      self.keypoints0_num = len(keypoints0)
      self.keypoints1_num = len(keypoints1)
  
      if self.keypoints0_num < self.minimum_inliers_num:
          self.reset_tracking()
          return self.no_match()
  
      H, inliers = self.ransac(keypoints0, keypoints1)
      self.inliers_num = inliers.sum().item()
  
      if self.inliers_num < self.minimum_inliers_num:
          self.reset_tracking()
          return self.no_match()
  
      self.previous_homography = H.clone()
      return H, True
  
file_path: kornia/kornia/tracking/planar_tracker.py
imports: from typing import Dict, Optional, Tuple
  import torch
  from kornia.core import Module, Tensor
  from kornia.feature import DescriptorMatcher, GFTTAffNetHardNet, LocalFeatureMatcher, LoFTR
  from kornia.feature.integrated import LocalFeature
  from kornia.geometry.linalg import transform_points
  from kornia.geometry.ransac import RANSAC
  from kornia.geometry.transform import warp_perspective
label_desc: Use image node_id 8 for calling the HomographyTracker obj's underlying member method code with example usage: obj.track_next_frame(x) and returns: H,  True, self, self