PairwiseMatcher

cvcuda.match(set1: nvcv.Tensor, set2: nvcv.Tensor, num_set1: Optional[nvcv.Tensor] = None, num_set2: Optional[nvcv.Tensor] = None, num_matches: Optional[bool] = None, distances: bool = False, cross_check: bool = False, matches_per_point: int = 1, norm_type: Optional[cvcuda.Norm] = None, algo_choice: cvcuda.Matcher = <Matcher.BRUTE_FORCE: 0>, *, stream: Optional[nvcv.cuda.Stream] = None) tuple[nvcv.Tensor, Optional[nvcv.Tensor], Optional[nvcv.Tensor]]

Executes the Pairwise matcher operation on the given CUDA stream.

See also

Refer to the CV-CUDA C API reference for this operator for more details and usage examples.

Parameters
  • set1 (nvcv.Tensor) – Input tensor with 1st set of points.

  • set2 (nvcv.Tensor) – Input tensor with 2nd set of points.

  • num_set1 (nvcv.Tensor, optional) – Input tensor with number of valid points in the 1st set. If not provided, consider the entire set1 containing valid points.

  • num_set2 (nvcv.Tensor, optional) – Input tensor with number of valid points in the 2nd set. If not provided, consider the entire set2 containing valid points.

  • num_matches (bool, optional) – Use True to return the number of matches. If not provided, it is set to True if crossCheck=True and False otherwise.

  • distances (bool, optional) – Use True to return the match distances.

  • cross_check (bool, optional) – Use True to cross check best matches, a best match is only returned if it is the best match (minimum distance) from 1st set to 2nd set and vice versa.

  • matches_per_point (Number, optional) – Number of best matches to return per point.

  • norm_type (cvcuda.Norm, optional) – Choice on how distances are normalized. Defaults to cvcuda.Norm.L2.

  • algo_choice (cvcuda.Matcher, optional) – Choice of the algorithm to perform the match.

  • stream (nvcv.cuda.Stream, optional) – CUDA Stream on which to perform the operation.

Returns

A tuple with output matches, number of matches and their distances.

The number of matches tensor may be None if its argument is False. The distances tensor may be None if its argument is False.

Return type

Tuple[nvcv.Tensor, nvcv.Tensor, nvcv.Tensor]

Caution

Restrictions to several arguments may apply. Check the C API references of the CV-CUDA operator.

cvcuda.match_into(matches: nvcv.Tensor, num_matches: Optional[nvcv.Tensor] = None, distances: Optional[nvcv.Tensor] = None, set1: nvcv.Tensor, set2: nvcv.Tensor, num_set1: Optional[nvcv.Tensor] = None, num_set2: Optional[nvcv.Tensor] = None, cross_check: bool = False, matches_per_point: int = 1, norm_type: Optional[cvcuda.Norm] = None, algo_choice: cvcuda.Matcher = <Matcher.BRUTE_FORCE: 0>, *, stream: Optional[nvcv.cuda.Stream] = None) tuple[nvcv.Tensor, Optional[nvcv.Tensor], Optional[nvcv.Tensor]]

Executes the Pairwise matcher operation on the given CUDA stream.

See also

Refer to the CV-CUDA C API reference for this operator for more details and usage examples.

Parameters
  • matches (nvcv.Tensor) – Output tensor with matches.

  • num_matches (nvcv.Tensor, optional) – Output tensor with number of matches.

  • distances (nvcv.Tensor, optional) – Output tensor with match distances.

  • set1 (nvcv.Tensor) – Input tensor with 1st set of points.

  • set2 (nvcv.Tensor) – Input tensor with 2nd set of points.

  • num_set1 (nvcv.Tensor, optional) – Input tensor with number of valid points in the 1st set. If not provided, consider the entire set1 containing valid points.

  • num_set2 (nvcv.Tensor, optional) – Input tensor with number of valid points in the 2nd set. If not provided, consider the entire set2 containing valid points.

  • cross_check (bool, optional) – Use True to cross check best matches, a best match is only returned if it is the best match (minimum distance) from 1st set to 2nd set and vice versa.

  • matches_per_point (Number, optional) – Number of best matches to return per point.

  • norm_type (cvcuda.Norm, optional) – Choice on how distances are normalized. Defaults to cvcuda.Norm.L2.

  • algo_choice (cvcuda.Matcher, optional) – Choice of the algorithm to perform the match.

  • stream (nvcv.cuda.Stream, optional) – CUDA Stream on which to perform the operation.

Returns

A tuple with output matches, number of matches and their distances.

The number of matches tensor may be None if its argument is None. The distances tensor may be None if its argument is None.

Return type

Tuple[nvcv.Tensor, nvcv.Tensor, nvcv.Tensor]

Caution

Restrictions to several arguments may apply. Check the C API references of the CV-CUDA operator.