MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / ExportOpCopyMakeBorder

Function ExportOpCopyMakeBorder

python/mod_cvcuda/operators/OpCopyMakeBorder.cpp:196–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194} // namespace
195
196void ExportOpCopyMakeBorder(py::module &m)
197{
198 using namespace pybind11::literals;
199
200 py::options options;
201 options.disable_function_signatures();
202
203 m.def("copymakeborder", &CopyMakeBorder, "src"_a, "border_mode"_a = NVCVBorderType::NVCV_BORDER_CONSTANT,
204 "border_value"_a = std::vector<float>(), py::kw_only(), "top"_a, "bottom"_a, "left"_a, "right"_a,
205 "stream"_a = nullptr, R"pbdoc(
206
207 cvcuda.copymakeborder(src: cvcuda.Tensor, border_mode: cvcuda.Border = cvcuda.Border.CONSTANT, border_value: List[float], top: int, bottom: int, right: int, stream: Optional[cvcuda.Stream] = None) -> cvcuda.Tensor
208
209 Executes the Copy Make Border operation on the given cuda stream.
210
211 See also:
212 Refer to the CV-CUDA C API reference for the Copy Make Border operator
213 for more details and usage examples.
214
215 Args:
216 src (cvcuda.Tensor): Input tensor containing one or more images.
217 border_mode (cvcuda.Border, optional): Border mode to be used when accessing elements outside input image.
218 border_value (List[float], optional): Border value to be used for constant border mode, each element of the array corresponds to the
219 image color channel must be a size <= 4 and dim of 1, where the values specify the border color for each color channel.
220 top (int): The top pixel position.
221 left (int): The left pixel position.
222 bottom (int): The bottom pixel position.
223 right (int): The right pixel position.
224 stream (cvcuda.Stream, optional): CUDA Stream on which to perform the operation.
225
226 Returns:
227 cvcuda.Tensor: The output tensor.
228
229 Caution:
230 Restrictions to several arguments may apply. Check the C
231 API references of the CV-CUDA operator.
232 )pbdoc");
233
234 m.def("copymakeborder_into", &CopyMakeBorderInto, "dst"_a, "src"_a,
235 "border_mode"_a = NVCVBorderType::NVCV_BORDER_CONSTANT, "border_value"_a = std::vector<float>(),
236 py::kw_only(), "top"_a, "left"_a, "stream"_a = nullptr, R"pbdoc(
237
238 cvcuda.copymakeborder_into(dst: cvcuda.Tensor, src: cvcuda.Tensor, border_mode: cvcuda.Border = cvcuda.Border.CONSTANT, border_value: List[float], top: int, bottom: int, right: int, stream: Optional[cvcuda.Stream] = None)
239
240 Executes the Copy Make Border operation on the given cuda stream.
241
242 See also:
243 Refer to the CV-CUDA C API reference for the Copy Make Border operator
244 for more details and usage examples.
245
246 Args:
247 dst (cvcuda.Tensor): Output tensor to store the result of the operation.
248 src (cvcuda.Tensor): Input tensor containing one or more images.
249 border_mode (cvcuda.Border): Border mode to be used when accessing elements outside input image.
250 border_value (List[float], optional): Border value to be used for constant border mode, each element of the array corresponds to the
251 image color channel must be a size <= 4 and dim of 1, where the values specify the border color for each color channel.
252 top (int): The top pixel position.
253 left (int): The left pixel position.

Callers 1

PYBIND11_MODULEFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected