Computes image histogram from the input image. More...
Functions | |
| VPIStatus | vpiCreateHistogramEven (uint64_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, uint64_t backend, VPIPayload payload, VPIImage input, VPIArray output, uint64_t flags) |
| Computes the image histogram. More... | |
Computes image histogram from the input image.
Refer to Image Histogram for more details and usage examples.
| VPIStatus vpiCreateHistogramEven | ( | uint64_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.
|
| [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 the payload variable that receives the created handle. |
| VPI_ERROR_INVALID_ARGUMENT | payload is NULL. |
| VPI_ERROR_INVALID_ARGUMENT | Maximum allowed numBins for given fmt outside valid range. |
| VPI_ERROR_INVALID_ARGUMENT | Invalid start and end values. |
| VPI_ERROR_INVALID_ARGUMENT | backends refers to an invalid backend. |
| VPI_ERROR_NOT_IMPLEMENTED | Histogram Even algorithm is not supported by given backends. |
| VPI_ERROR_INVALID_CONTEXT | Current context was destroyed. |
| VPI_IMAGE_FORMAT_INVALID | fmt is not supported. |
| VPI_ERROR_OUT_OF_MEMORY | Cannot allocate required resources. |
| VPI_ERROR_INVALID_OPERATION | Backend isn't enabled in current context. |
| VPI_SUCCESS | Operation executed successfully. |
| VPIStatus vpiSubmitHistogram | ( | VPIStream | stream, |
| uint64_t | backend, | ||
| VPIPayload | payload, | ||
| VPIImage | input, | ||
| VPIArray | output, | ||
| uint64_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.
|
| [in] | payload | Payload created by vpiCreateHistogramEven. |
| [in] | input | Input image.
|
| [out] | output | Where the resulting image histogram will be written to.
|
| [in] | flags | Control flags.
|
| VPI_ERROR_INVALID_ARGUMENT | stream is NULL. |
| VPI_ERROR_INVALID_ARGUMENT | input or output are NULL. |
| VPI_ERROR_INVALID_ARGUMENT | payload not created by vpiCreateHistogramEven. |
| VPI_ERROR_INVALID_ARGUMENT | output array's capacity outside valid range. |
| VPI_ERROR_INVALID_ARRAY_TYPE | output array type not supported. |
| VPI_ERROR_INVALID_IMAGE_FORMAT | input image format does not match with one associated with payload. |
| VPI_ERROR_INVALID_PAYLOAD_TYPE | payload is invalid. |
| VPI_ERROR_INVALID_OPERATION | The needed backends aren't enabled in stream, input or output. |
| VPI_SUCCESS | Operation executed successfully. |