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

Function ExportOpHistogram

python/mod_cvcuda/operators/OpHistogram.cpp:91–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89} // namespace
90
91void ExportOpHistogram(py::module &m)
92{
93 using namespace pybind11::literals;
94
95 m.def("histogram", &Histogram, "src"_a, "mask"_a = nullptr, py::kw_only(), "stream"_a = nullptr, R"pbdoc(
96
97 Executes an histogram operation on the given cuda stream.
98
99 See also:
100 Refer to the CV-CUDA C API reference for the Histogram operator
101 for more details and usage examples.
102
103 Args:
104 src (cvcuda.Tensor): Input tensor containing one or more images, input tensor must be (N)HWC, currently only grayscale uint8 is supported.
105 mask (cvcuda.Tensor, optional): Input tensor containing the mask of the pixels to be considered for the histogram, must be the same shape as src.
106 stream (cvcuda.Stream, optional): CUDA Stream on which to perform the operation.
107
108 Returns:
109 cvcuda.Tensor: The output tensor containing the histogram. The tensor is formatted as HWC with W = 256 and H = number of input tensors, and C = 1.
110
111 Caution:
112 Restrictions to several arguments may apply. Check the C
113 API references of the CV-CUDA operator.
114 )pbdoc");
115
116 m.def("histogram_into", &HistogramInto, "histogram"_a, "src"_a, "mask"_a = nullptr, py::kw_only(),
117 "stream"_a = nullptr, R"pbdoc(
118
119 Executes an histogram operation on the given cuda stream.
120
121 See also:
122 Refer to the CV-CUDA C API reference for the Histogram operator
123 for more details and usage examples.
124
125 Args:
126 histogram (cvcuda.Tensor): Output tensor containing the histogram. The tensor is formatted as HWC with W = 256 and H = number of input tensors, and C = 1.
127 src (cvcuda.Tensor): Input tensor containing one or more images, input tensor must be (N)HWC, currently only grayscale uint8 is supported.
128 mask (cvcuda.Tensor, optional): Input tensor containing the bit mask of the pixels to be considered for the histogram, must be the same shape as src.
129 stream (cvcuda.Stream, optional): CUDA Stream on which to perform the operation.
130
131 Returns:
132 None.
133
134 Caution:
135 Restrictions to several arguments may apply. Check the C
136 API references of the CV-CUDA operator.
137 )pbdoc");
138}
139
140} // namespace cvcudapy

Callers 1

PYBIND11_MODULEFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected