parameters: (
      index: Any, f2: np.ndarray, config: Dict[str, Any]
  )
return_statement: return list(zip(results[good, 0], good.nonzero()[0]))
docstring: Match using FLANN and apply Lowe's ratio filter.
  
      Args:
          index: flann index if the first image
          f2: feature descriptors of the second image
          config: config parameters
docstring_summary: Match using FLANN and apply Lowe's ratio filter.
docstring_tokens: Match using FLANN and apply Lowe s ratio filter .
function: def match_flann(
      index: Any, f2: np.ndarray, config: Dict[str, Any]
  ) -> List[Tuple[int, int]]:
      """Match using FLANN and apply Lowe's ratio filter.
  
      Args:
          index: flann index if the first image
          f2: feature descriptors of the second image
          config: config parameters
      """
      search_params = dict(checks=config["flann_checks"])
      results, dists = index.knnSearch(f2, 2, params=search_params)
      squared_ratio = config["lowes_ratio"] ** 2  # Flann returns squared L2 distances
      good = dists[:, 0] < squared_ratio * dists[:, 1]
      return list(zip(results[good, 0], good.nonzero()[0]))
function_tokens: def match_flann ( index : Any , f2 : np . ndarray , config : Dict [ str , Any ] ) -> List [ Tuple [ int , int ] ] : search_params = dict ( checks = config [ "flann_checks" ] ) results , dists = index . knnSearch ( f2 , 2 , params = search_params ) squared_ratio = config [ "lowes_ratio" ] ** 2 # Flann returns squared L2 distances good = dists [ : , 0 ] < squared_ratio * dists [ : , 1 ] return list ( zip ( results [ good , 0 ] , good . nonzero ( ) [ 0 ] ) )