| 93 | } // namespace |
| 94 | |
| 95 | void ExportOpColorTwist(py::module &m) |
| 96 | { |
| 97 | using namespace pybind11::literals; |
| 98 | |
| 99 | m.def("color_twist", &ColorTwistMatrix, "src"_a, "twist"_a, py::kw_only(), "stream"_a = nullptr, |
| 100 | R"pbdoc( |
| 101 | |
| 102 | cvcuda.color_twist(src: cvcuda.Tensor, twist: cvcuda.Tensor, stream: Optional[cvcuda.Stream] = None) -> cvcuda.Tensor |
| 103 | |
| 104 | Transforms an image by applying affine transformation to the channels extent. |
| 105 | |
| 106 | See Also: |
| 107 | Refer to the CV-CUDA C API reference for the ColorTwist operator for more details and |
| 108 | usage examples. |
| 109 | |
| 110 | Args: |
| 111 | src (cvcuda.Tensor): Tensor corresponding to the input image. It must have |
| 112 | either 3 or 4 channels. In the case of 4 channels, the alpha channel is |
| 113 | unmodified. |
| 114 | twist (cvcuda.Tensor): A 2D tensor describing a 3x4 affine transformation matrix. |
| 115 | stream (cvcuda.Stream, optional): CUDA Stream on which to perform the operation. |
| 116 | |
| 117 | Returns: |
| 118 | cvcuda.Tensor: The output tensor. |
| 119 | )pbdoc"); |
| 120 | m.def("color_twist_into", &ColorTwistMatrixInto, "dst"_a, "src"_a, "twist"_a, py::kw_only(), "stream"_a = nullptr, |
| 121 | R"pbdoc( |
| 122 | |
| 123 | cvcuda.color_twist_into(dst: cvcuda.Tensor, src: cvcuda.Tensor, twist: cvcuda.Tensor, stream: Optional[cvcuda.Stream] = None) |
| 124 | |
| 125 | Transforms an image by applying affine transformation to the channels extent. |
| 126 | |
| 127 | See Also: |
| 128 | Refer to the CV-CUDA C API reference for the ColorTwist operator for more details and |
| 129 | usage examples. |
| 130 | |
| 131 | Args: |
| 132 | dst (cvcuda.Tensor): Tensor corresponding to the output image. Must match the shape of |
| 133 | the input image. |
| 134 | src (cvcuda.Tensor): Tensor corresponding to the input image. It must have |
| 135 | either 3 or 4 channels. In the case of 4 channels, the alpha channel is |
| 136 | unmodified. |
| 137 | twist (cvcuda.Tensor): A 2D tensor describing a 3x4 affine transformation matrix. |
| 138 | stream (cvcuda.Stream, optional): CUDA Stream on which to perform the operation. |
| 139 | |
| 140 | Returns: |
| 141 | None |
| 142 | )pbdoc"); |
| 143 | |
| 144 | // VarShape variants |
| 145 | m.def("color_twist", &VarShapeColorTwistMatrix, "src"_a, "twist"_a, py::kw_only(), "stream"_a = nullptr, |
| 146 | R"pbdoc( |
| 147 | |
| 148 | cvcuda.color_twist(src: cvcuda.ImageBatchVarShape, twist: cvcuda.Tensor, stream: Optional[cvcuda.Stream] = None) -> cvcuda.ImageBatchVarShape |
| 149 | |
| 150 | Transforms a batch of images by applying affine transformation to the channels extent. |
| 151 | |
| 152 | See Also: |