| 205 | } // namespace |
| 206 | |
| 207 | void ExportOpSIFT(py::module &m) |
| 208 | { |
| 209 | using namespace pybind11::literals; |
| 210 | |
| 211 | m.def("sift", &SIFT, "src"_a, "max_features"_a = 0, "num_octave_layers"_a = 3, "contrast_threshold"_a = 0.03f, |
| 212 | "edge_threshold"_a = 10.f, "init_sigma"_a = 1.6f, "flags"_a = NVCV_SIFT_USE_EXPANDED_INPUT, py::kw_only(), |
| 213 | "stream"_a = nullptr, R"pbdoc( |
| 214 | |
| 215 | Executes the SIFT operation on the given cuda stream. |
| 216 | |
| 217 | See also: |
| 218 | Refer to the CV-CUDA C API reference for the SIFT operator |
| 219 | for more details and usage examples. |
| 220 | |
| 221 | Args: |
| 222 | src (cvcuda.Tensor): Input tensor to extract features and compute descriptors from. |
| 223 | max_features (Number, optional): Maximum number of features to be extracted, default is 5% of total |
| 224 | pixels at a minimum of 1. |
| 225 | num_octave_layers (Number, optional): Number of octave layers, default is 3. |
| 226 | contrast_threshold (Number, optional): Contrast threshold, default is 0.03. |
| 227 | edge_threshold (Number, optional): Edge threshold, default is 10.0. |
| 228 | init_sigma (Number, optional): Initial sigma, default is 1.6. |
| 229 | flags (cvcuda.SIFT, optional): Flag to whether to expand the input or not, default is |
| 230 | cvcuda.SIFT.USE_EXPANDED_INPUT. |
| 231 | stream (cvcuda.Stream, optional): CUDA Stream on which to perform the operation. |
| 232 | |
| 233 | Returns: |
| 234 | Tuple[cvcuda.Tensor, cvcuda.Tensor, cvcuda.Tensor, cvcuda.Tensor]: A tuple with feature coordinates, metadata, descriptors and |
| 235 | number of features. |
| 236 | |
| 237 | Caution: |
| 238 | Restrictions to several arguments may apply. Check the C |
| 239 | API references of the CV-CUDA operator. |
| 240 | )pbdoc"); |
| 241 | |
| 242 | m.def("sift_into", &SIFTInto, "feat_coords"_a, "feat_metadata"_a, "feat_descriptors"_a, "num_features"_a, "src"_a, |
| 243 | "num_octave_layers"_a = 3, "contrast_threshold"_a = 0.03f, "edge_threshold"_a = 10.f, "init_sigma"_a = 1.6f, |
| 244 | "flags"_a = NVCV_SIFT_USE_EXPANDED_INPUT, py::kw_only(), "stream"_a = nullptr, R"pbdoc( |
| 245 | |
| 246 | Executes the SIFT operation on the given cuda stream. |
| 247 | |
| 248 | See also: |
| 249 | Refer to the CV-CUDA C API reference for the SIFT operator |
| 250 | for more details and usage examples. |
| 251 | |
| 252 | Args: |
| 253 | feat_coords (cvcuda.Tensor): Output tensor with feature coordinates. |
| 254 | feat_metadata (cvcuda.Tensor): Output tensor with feature metadata. |
| 255 | feat_descriptors (cvcuda.Tensor): Output tensor with feature descriptors. |
| 256 | num_features (cvcuda.Tensor): Output tensor with number of features. |
| 257 | src (cvcuda.Tensor): Input tensor to extract features and compute descriptors from. |
| 258 | num_octave_layers (Number, optional): Number of octave layers, default is 3. |
| 259 | contrast_threshold (Number, optional): Contrast threshold, default is 0.03. |
| 260 | edge_threshold (Number, optional): Edge threshold, default is 10.0. |
| 261 | init_sigma (Number, optional): Initial sigma, default is 1.6. |
| 262 | flags (cvcuda.SIFT, optional): Flag to whether to expand the input or not, default is |
| 263 | cvcuda.SIFT.USE_EXPANDED_INPUT. |
| 264 | stream (cvcuda.Stream, optional): CUDA Stream on which to perform the operation. |