MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / ExportOpPairwiseMatcher

Function ExportOpPairwiseMatcher

python/mod_cvcuda/operators/OpPairwiseMatcher.cpp:126–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124} // namespace
125
126void ExportOpPairwiseMatcher(py::module &m)
127{
128 using namespace pybind11::literals;
129
130 m.def("match", &PairwiseMatcher, "set1"_a, "set2"_a, "num_set1"_a = nullptr, "num_set2"_a = nullptr,
131 "num_matches"_a = nullptr, "distances"_a = false, "cross_check"_a = false, "matches_per_point"_a = 1,
132 "norm_type"_a = nullptr, "algo_choice"_a = NVCV_BRUTE_FORCE, py::kw_only(), "stream"_a = nullptr, R"pbdoc(
133
134 Executes the Pairwise matcher operation on the given CUDA stream.
135
136 See also:
137 Refer to the CV-CUDA C API reference for this operator for more details and usage examples.
138
139 Args:
140 set1 (cvcuda.Tensor): Input tensor with 1st set of points.
141 set2 (cvcuda.Tensor): Input tensor with 2nd set of points.
142 num_set1 (cvcuda.Tensor, optional): Input tensor with number of valid points in the 1st set. If not provided,
143 consider the entire set1 containing valid points.
144 num_set2 (cvcuda.Tensor, optional): Input tensor with number of valid points in the 2nd set. If not provided,
145 consider the entire set2 containing valid points.
146 num_matches (bool, optional): Use True to return the number of matches. If not provided, it is set
147 to True if crossCheck=True and False otherwise.
148 distances (bool, optional): Use True to return the match distances.
149 cross_check (bool, optional): Use True to cross check best matches, a best match is only returned if it is
150 the best match (minimum distance) from 1st set to 2nd set and vice versa.
151 matches_per_point (Number, optional): Number of best matches to return per point.
152 norm_type (cvcuda.Norm, optional): Choice on how distances are normalized. Defaults to cvcuda.Norm.L2.
153 algo_choice (cvcuda.Matcher, optional): Choice of the algorithm to perform the match.
154 stream (cvcuda.Stream, optional): CUDA Stream on which to perform the operation.
155
156 Returns:
157 Tuple[cvcuda.Tensor, cvcuda.Tensor, cvcuda.Tensor]: A tuple with output matches, number of matches and their distances.
158 The number of matches tensor may be None if its argument is False.
159 The distances tensor may be None if its argument is False.
160
161 Caution:
162 Restrictions to several arguments may apply. Check the C API references of the CV-CUDA operator.
163 )pbdoc");
164
165 m.def("match_into", &PairwiseMatcherInto, "matches"_a, "num_matches"_a = nullptr, "distances"_a = nullptr, "set1"_a,
166 "set2"_a, "num_set1"_a = nullptr, "num_set2"_a = nullptr, "cross_check"_a = false, "matches_per_point"_a = 1,
167 "norm_type"_a = nullptr, "algo_choice"_a = NVCV_BRUTE_FORCE, py::kw_only(), "stream"_a = nullptr,
168 R"pbdoc(
169
170 Executes the Pairwise matcher operation on the given CUDA stream.
171
172 See also:
173 Refer to the CV-CUDA C API reference for this operator for more details and usage examples.
174
175 Args:
176 matches (cvcuda.Tensor): Output tensor with matches.
177 num_matches (cvcuda.Tensor, optional): Output tensor with number of matches.
178 distances (cvcuda.Tensor, optional): Output tensor with match distances.
179 set1 (cvcuda.Tensor): Input tensor with 1st set of points.
180 set2 (cvcuda.Tensor): Input tensor with 2nd set of points.
181 num_set1 (cvcuda.Tensor, optional): Input tensor with number of valid points in the 1st set. If not provided,
182 consider the entire set1 containing valid points.
183 num_set2 (cvcuda.Tensor, optional): Input tensor with number of valid points in the 2nd set. If not provided,

Callers 1

PYBIND11_MODULEFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected