Histogram Class Reference#
2 min read time
Applies to Linux
roccv::Histogram Class Referencefinal
Class for managing the Histogram operator. More...
#include <op_histogram.hpp>
Inheritance diagram for roccv::Histogram:

Public Member Functions | |
Histogram () | |
Constructs a Histogram object. More... | |
void | operator() (hipStream_t stream, const Tensor &input, std::optional< std::reference_wrapper< const Tensor >> mask, const Tensor &histogram, const eDeviceType device=eDeviceType::GPU) |
Executes the Histogram operation. Shows how many times each pixel value occurs for a grayscale image. More... | |
~Histogram () | |
Destroy the Histogram object. More... | |
![]() | |
virtual | ~IOperator () |
Detailed Description
Class for managing the Histogram operator.
Constructor & Destructor Documentation
◆ Histogram()
roccv::Histogram::Histogram | ( | ) |
Constructs a Histogram object.
◆ ~Histogram()
roccv::Histogram::~Histogram | ( | ) |
Destroy the Histogram object.
Member Function Documentation
◆ operator()()
void roccv::Histogram::operator() | ( | hipStream_t | stream, |
const Tensor & | input, | ||
std::optional< std::reference_wrapper< const Tensor >> | mask, | ||
const Tensor & | histogram, | ||
const eDeviceType | device = eDeviceType::GPU |
||
) |
Executes the Histogram operation. Shows how many times each pixel value occurs for a grayscale image.
Limitations:
Input: Supported TensorLayout(s): [NHWC, HWC] Channels: [1] Supported DataType(s): [U8]
Output: Supported TensorLayout(s): [HWC] Channels: [1] Supported DataTypes(s) [U32, S32]
Mask: Supported TensorLayout(s): [NHWC, HWC] Channels: [1] Supported DataTypes(s) [U8]
Input/Output dependency:
Property | Input == Output -------------- | ------------- TensorLayout | No DataType | No Channels | No Width | No Height | No Batch | No
- Parameters
-
[in] stream The HIP stream to run this operation on. [in] input Input tensor with image data. [in] mask (Optional) Mask tensor with shape equal to the input tensor shape and any value not equal 0 will be counted in histogram. [out] histogram Histogram output tensor with width of 256 and a height equal to the batch size of input (1 if HWC input). [in] device The device which this operation should run on. (Default: eDeviceType::GPU)
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-roccv/checkouts/latest/include/op_histogram.hpp