| 115 | } // namespace |
| 116 | |
| 117 | void ExportOpErase(py::module &m) |
| 118 | { |
| 119 | using namespace pybind11::literals; |
| 120 | py::options options; |
| 121 | options.disable_function_signatures(); |
| 122 | |
| 123 | m.def("erase", &Erase, "src"_a, "anchor"_a, "erasing"_a, "values"_a, "imgIdx"_a, py::kw_only(), "random"_a = false, |
| 124 | "seed"_a = 0, "stream"_a = nullptr, R"pbdoc( |
| 125 | |
| 126 | cvcuda.erase(src: cvcuda.Tensor, anchor: cvcuda.Tensor, erasing: cvcuda.Tensor, values: cvcuda.Tensor, imgIdx: cvcuda.Tensor, random: int, seed: int, stream: Optional[cvcuda.Stream] = None) -> cvcuda.Tensor |
| 127 | |
| 128 | Executes the Erase operation on the given cuda stream. |
| 129 | |
| 130 | See also: |
| 131 | Refer to the CV-CUDA C API reference for the Erase operator |
| 132 | for more details and usage examples. |
| 133 | |
| 134 | Args: |
| 135 | src (cvcuda.Tensor): Input tensor containing one or more images. |
| 136 | anchor (cvcuda.Tensor): anchor an array of size num_erasing_area that gives the |
| 137 | x coordinate and y coordinate of the top left point in the eraseing areas. |
| 138 | erasing (cvcuda.Tensor): Eraisng an array of size num_erasing_area that gives the widths of the eraseing areas, |
| 139 | the heights of the eraseing areas and integers in range 0-15, each of whose bits |
| 140 | indicates whether or not the corresponding channel need to be erased. |
| 141 | values (cvcuda.Tensor): An array of size num_erasing_area*4 that gives the filling value for each erase area. |
| 142 | imgIdx (cvcuda.Tensor): An array of size num_erasing_area that maps a erase area idx to img idx in the batch. |
| 143 | random (int, optional): 8-bit integer value for random op. |
| 144 | seed (int, optional): seed random seed for random filling erase area. |
| 145 | stream (cvcuda.Stream, optional): CUDA Stream on which to perform the operation. |
| 146 | |
| 147 | Returns: |
| 148 | cvcuda.Tensor: The output tensor. |
| 149 | |
| 150 | Caution: |
| 151 | Restrictions to several arguments may apply. Check the C |
| 152 | API references of the CV-CUDA operator. |
| 153 | )pbdoc"); |
| 154 | |
| 155 | m.def("erase_into", &EraseInto, "dst"_a, "src"_a, "anchor"_a, "erasing"_a, "values"_a, "imgIdx"_a, py::kw_only(), |
| 156 | "random"_a = false, "seed"_a = 0, "stream"_a = nullptr, R"pbdoc( |
| 157 | |
| 158 | cvcuda.erase_into(dst: cvcuda.Tensor, src: cvcuda.Tensor, anchor: cvcuda.Tensor, erasing: cvcuda.Tensor, values: cvcuda.Tensor, imgIdx: cvcuda.Tensor, random: int, seed: int, stream: Optional[cvcuda.Stream] = None) |
| 159 | |
| 160 | Executes the Erase operation on the given cuda stream. |
| 161 | |
| 162 | See also: |
| 163 | Refer to the CV-CUDA C API reference for the Erase operator |
| 164 | for more details and usage examples. |
| 165 | |
| 166 | Args: |
| 167 | dst (cvcuda.Tensor): Output tensor to store the result of the operation. |
| 168 | src (cvcuda.Tensor): Input tensor containing one or more images. |
| 169 | anchor (cvcuda.Tensor): anchor an array of size num_erasing_area that gives the |
| 170 | x coordinate and y coordinate of the top left point in the eraseing areas. |
| 171 | erasing (cvcuda.Tensor): Eraisng an array of size num_erasing_area that gives the widths of the eraseing areas, |
| 172 | the heights of the eraseing areas and integers in range 0-15, each of whose bits |
| 173 | indicates whether or not the corresponding channel need to be erased. |
| 174 | values (cvcuda.Tensor): An array of size num_erasing_area*4 that gives the filling value for each erase area. |