Histogram
- cvcuda.histogram(src: nvcv.Tensor, mask: nvcv.Tensor | None = None, *, stream: nvcv.cuda.Stream | None = None) nvcv.Tensor
Executes an histogram operation on the given cuda stream.
See also
Refer to the CV-CUDA C API reference for the Histogram operator for more details and usage examples.
- Parameters:
src (nvcv.Tensor) – Input tensor containing one or more images, input tensor must be (N)HWC, currently only grayscale uint8 is supported.
mask (nvcv.Tensor, optional) – Input tensor containing the mask of the pixels to be considered for the histogram, must be the same shape as src.
stream (nvcv.cuda.Stream, optional) – CUDA Stream on which to perform the operation.
- Returns:
The output tensor containing the histogram. The tensor is formatted as HWC with W = 256 and H = number of input tensors, and C = 1.
- Return type:
nvcv.Tensor
Caution
Restrictions to several arguments may apply. Check the C API references of the CV-CUDA operator.
- cvcuda.histogram_into(histogram: nvcv.Tensor, src: nvcv.Tensor, mask: nvcv.Tensor | None = None, *, stream: nvcv.cuda.Stream | None = None) nvcv.Tensor
Executes an histogram operation on the given cuda stream.
See also
Refer to the CV-CUDA C API reference for the Histogram operator for more details and usage examples.
- Parameters:
histogram (nvcv.Tensor) – Output tensor containing the histogram. The tensor is formatted as HWC with W = 256 and H = number of input tensors, and C = 1.
src (nvcv.Tensor) – Input tensor containing one or more images, input tensor must be (N)HWC, currently only grayscale uint8 is supported.
mask (nvcv.Tensor, optional) – Input tensor containing the bit mask of the pixels to be considered for the histogram, must be the same shape as src.
stream (nvcv.cuda.Stream, optional) – CUDA Stream on which to perform the operation.
- Returns:
None.
Caution
Restrictions to several arguments may apply. Check the C API references of the CV-CUDA operator.