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

Function ExportOpThreshold

python/mod_cvcuda/operators/OpThreshold.cpp:102–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100} // namespace
101
102void ExportOpThreshold(py::module &m)
103{
104 using namespace pybind11::literals;
105
106 py::options options;
107 options.disable_function_signatures();
108
109 m.def("threshold", &Threshold, "src"_a, "thresh"_a, "maxval"_a, "type"_a, py::kw_only(), "stream"_a = nullptr,
110 R"pbdoc(
111
112 cvcuda.threshold(src: cvcuda.Tensor, thresh: cvcuda.Tensor, maxval: cvcuda.Tensor, type:ThresholdType, stream: Optional[cvcuda.Stream] = None) -> cvcuda.Tensor
113
114 Executes the Threshold operation on the given cuda stream.
115
116 See also:
117 Refer to the CV-CUDA C API reference for the Threshold operator
118 for more details and usage examples.
119
120 Args:
121 src (cvcuda.Tensor): Input tensor containing one or more images.
122 thresh (cvcuda.Tensor): An array of size batch that gives the threshold value of each image.
123 maxval (cvcuda.Tensor): An array of size batch that gives the maxval value of each image,
124 using with the cvcuda.ThresholdType.BINARY or cvcuda.ThresholdType.BINARY_INV
125 threshold types.
126 type (cvcuda.ThresholdType): Thresholding type.
127 stream (cvcuda.Stream, optional): CUDA Stream on which to perform the operation.
128
129 Returns:
130 cvcuda.Tensor: The output tensor.
131
132 Caution:
133 Restrictions to several arguments may apply. Check the C
134 API references of the CV-CUDA operator.
135 )pbdoc");
136
137 m.def("threshold_into", &ThresholdInto, "dst"_a, "src"_a, "thresh"_a, "maxval"_a, "type"_a, py::kw_only(),
138 "stream"_a = nullptr, R"pbdoc(
139
140 cvcuda.threshold_into(dst: cvcuda.Tensor, src: cvcuda.Tensor, thresh: cvcuda.Tensor, maxval: cvcuda.Tensor, type:ThresholdType, stream: Optional[cvcuda.Stream] = None)
141
142 Executes the Threshold operation on the given cuda stream.
143
144 See also:
145 Refer to the CV-CUDA C API reference for the Threshold operator
146 for more details and usage examples.
147
148 Args:
149 dst (cvcuda.Tensor): Output tensor to store the result of the operation.
150 src (cvcuda.Tensor): Input tensor containing one or more images.
151 thresh (cvcuda.Tensor): An array of size batch that gives the threshold value of each image.
152 maxval (cvcuda.Tensor): An array of size batch that gives the maxval value of each image,
153 using with the cvcuda.ThresholdType.BINARY or cvcuda.ThresholdType.BINARY_INV
154 threshold types.
155 type (cvcuda.ThresholdType): Thresholding type.
156 stream (cvcuda.Stream, optional): CUDA Stream on which to perform the operation.
157
158 Returns:
159 None

Callers 1

PYBIND11_MODULEFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected