Computes image histogram from the input image. More...
Functions | |
VPIStatus | vpiCreateHistogramEven (uint32_t backends, VPIImageFormat fmt, float start, float end, int32_t numBins, VPIPayload *payload) |
Creates payload for Image Histogram Even algorithm. More... | |
VPIStatus | vpiSubmitHistogram (VPIStream stream, uint32_t backend, VPIPayload payload, VPIImage input, VPIArray output, uint32_t flags) |
Computes the image histogram. More... | |
Computes image histogram from the input image.
VPIStatus vpiCreateHistogramEven | ( | uint32_t | backends, |
VPIImageFormat | fmt, | ||
float | start, | ||
float | end, | ||
int32_t | numBins, | ||
VPIPayload * | payload | ||
) |
#include <vpi/algo/Histogram.h>
Creates payload for Image Histogram Even algorithm.
It calculates the image histogram assuming uniform (even) bins.
[in] | backends | VPI backends that are eligible to execute the algorithm. Currently only one backend is accepted. |
[in] | fmt | Format of input image |
[in] | start | Specifies the low end of the histogram range (inclusive). |
[in] | end | Specifies the high end of the histogram range (exclusive). |
[in] | numBins | Specifies the number of bins in the output array. |
[out] | payload | Pointer to memory where the created payload handle will be written to. |
VPIStatus vpiSubmitHistogram | ( | VPIStream | stream, |
uint32_t | backend, | ||
VPIPayload | payload, | ||
VPIImage | input, | ||
VPIArray | output, | ||
uint32_t | flags | ||
) |
#include <vpi/algo/Histogram.h>
Computes the image histogram.
[in] | stream | The stream where the operation will be queued in. |
[in] | backend | Backend that will execute the algorithm. Must be one of the backends specified during payload creation. If 0, VPI will select one of the eligible backends from the payload that accepts the given parameters, usually the fastest one. |
[in] | payload | payload created with vpiCreateHistogramEven |
[in] | input | Input image. Supported formats are: VPI_IMAGE_FORMAT_U8, VPI_IMAGE_FORMAT_U16. |
[out] | output | Where the resulting image histogram will be written to. It must have been created with the desired number of bins. |
[in] | flags | If this flags is set to VPI_ACCUMULATE_OUTPUT, the output will be not be cleared first. Otherwise set this flag to 0 by default to clear out the value in the output array. |