| 72 | } // namespace |
| 73 | |
| 74 | void ExportOpConv2D(py::module &m) |
| 75 | { |
| 76 | using namespace pybind11::literals; |
| 77 | |
| 78 | m.def("conv2d", &Conv2DVarShape, "src"_a, "kernel"_a, "kernel_anchor"_a, |
| 79 | "border"_a = NVCVBorderType::NVCV_BORDER_CONSTANT, py::kw_only(), "stream"_a = nullptr, R"pbdoc( |
| 80 | |
| 81 | Executes the Convolve 2D operation on the given cuda stream. |
| 82 | |
| 83 | See also: |
| 84 | Refer to the CV-CUDA C API reference for the Convolve 2D operator |
| 85 | for more details and usage examples. |
| 86 | |
| 87 | Args: |
| 88 | src (cvcuda.ImageBatchVarShape): Input image batch containing one or more images. |
| 89 | kernel (cvcuda.Tensor): Convolution kernels (one for each batch image) to be used. Each image width and height |
| 90 | correspond to the kernel width and height. (must be float) |
| 91 | kernel_anchor (cvcuda.Tensor): 1D Tensor with the anchor of each kernel (one for each batch image). The anchor (x, y) |
| 92 | indicates the relative position of a filtered point within the kernel. |
| 93 | (-1, -1) means that the anchor is at the kernel center. |
| 94 | stream (cvcuda.Stream, optional): CUDA Stream on which to perform the operation. |
| 95 | |
| 96 | Returns: |
| 97 | cvcuda.ImageBatchVarShape: The output image batch. |
| 98 | |
| 99 | Caution: |
| 100 | Restrictions to several arguments may apply. Check the C |
| 101 | API references of the CV-CUDA operator. |
| 102 | )pbdoc"); |
| 103 | |
| 104 | m.def("conv2d_into", &Conv2DVarShapeInto, "dst"_a, "src"_a, "kernel"_a, "kernel_anchor"_a, |
| 105 | "border"_a = NVCVBorderType::NVCV_BORDER_CONSTANT, py::kw_only(), "stream"_a = nullptr, R"pbdoc( |
| 106 | |
| 107 | Executes the Convolve 2D operation on the given cuda stream. |
| 108 | |
| 109 | See also: |
| 110 | Refer to the CV-CUDA C API reference for the Convolve 2D operator |
| 111 | for more details and usage examples. |
| 112 | |
| 113 | Args: |
| 114 | dst (cvcuda.ImageBatchVarShape): Output image batch to store the result of the operation. |
| 115 | src (cvcuda.ImageBatchVarShape): Input image batch containing one or more images. |
| 116 | kernel (cvcuda.Tensor): Convolution kernels (one for each batch image) to be used. Each image width and height |
| 117 | correspond to the kernel width and height. (must be float) |
| 118 | kernel_anchor (cvcuda.Tensor): 1D Tensor with the anchor of each kernel (one for each batch image). The anchor (x, y) |
| 119 | indicates the relative position of a filtered point within the kernel. |
| 120 | (-1, -1) means that the anchor is at the kernel center. |
| 121 | stream (cvcuda.Stream, optional): CUDA Stream on which to perform the operation. |
| 122 | |
| 123 | Returns: |
| 124 | None |
| 125 | |
| 126 | Caution: |
| 127 | Restrictions to several arguments may apply. Check the C |
| 128 | API references of the CV-CUDA operator. |
| 129 | )pbdoc"); |
| 130 | } |
| 131 | |