| 72 | } // namespace |
| 73 | |
| 74 | void ExportOpChannelReorder(py::module &m) |
| 75 | { |
| 76 | using namespace pybind11::literals; |
| 77 | |
| 78 | m.def("channelreorder", &ChannelReorderVarShape, "src"_a, "order"_a, py::kw_only(), "format"_a = nullptr, |
| 79 | "stream"_a = nullptr, R"pbdoc( |
| 80 | |
| 81 | Executes the Channel Reorder operation on the given cuda stream. |
| 82 | |
| 83 | See also: |
| 84 | Refer to the CV-CUDA C API reference for the Channel Reorder operator |
| 85 | for more details and usage examples. |
| 86 | |
| 87 | Args: |
| 88 | src (cvcuda.ImageBatchVarShape): Input tensor containing one or more images. |
| 89 | order (cvcuda.Tensor): 2D tensor with layout "NC" which specifies, for each output image sample in the batch, |
| 90 | the index of the input channel to copy to the output channel. |
| 91 | format (cvcuda.Format): Format of the destination image. |
| 92 | |
| 93 | stream (cvcuda.Stream, optional): CUDA Stream on which to perform the operation. |
| 94 | |
| 95 | Returns: |
| 96 | cvcuda.ImageBatchVarShape: The output image batch. |
| 97 | |
| 98 | Caution: |
| 99 | Restrictions to several arguments may apply. Check the C |
| 100 | API references of the CV-CUDA operator. |
| 101 | )pbdoc"); |
| 102 | |
| 103 | m.def("channelreorder_into", &ChannelReorderVarShapeInto, "dst"_a, "src"_a, "orders"_a, py::kw_only(), |
| 104 | "stream"_a = nullptr, R"pbdoc( |
| 105 | |
| 106 | Executes the Channel Reorder operation on the given cuda stream. |
| 107 | |
| 108 | See also: |
| 109 | Refer to the CV-CUDA C API reference for the Channel Reorder operator |
| 110 | for more details and usage examples. |
| 111 | |
| 112 | Args: |
| 113 | dst (cvcuda.ImageBatchVarShape): Output tensor to store the result of the operation. |
| 114 | src (cvcuda.ImageBatchVarShape): Input tensor containing one or more images. |
| 115 | order (cvcuda.Tensor): 2D tensor with layout "NC" which specifies, for each output image sample in the batch, |
| 116 | the index of the input channel to copy to the output channel. |
| 117 | format (cvcuda.Format): Format of the destination image. |
| 118 | |
| 119 | stream (cvcuda.Stream, optional): CUDA Stream on which to perform the operation. |
| 120 | |
| 121 | Returns: |
| 122 | None |
| 123 | |
| 124 | Caution: |
| 125 | Restrictions to several arguments may apply. Check the C |
| 126 | API references of the CV-CUDA operator. |
| 127 | )pbdoc"); |
| 128 | } |
| 129 | |
| 130 | } // namespace cvcudapy |