Find in an image the minimum and maximum value locations. More...
Functions | |
VPIStatus | vpiCreateMinMaxLoc (uint64_t backends, int32_t imageWidth, int32_t imageHeight, VPIImageFormat imageFormat, VPIPayload *payload) |
Creates payload for vpiSubmitMinMaxLoc. More... | |
VPIStatus | vpiSubmitMinMaxLoc (VPIStream stream, uint64_t backend, VPIPayload payload, VPIImage input, VPIArray minCoords, VPIArray maxCoords) |
Finds minimum and maximum value locations in an image. More... | |
Find in an image the minimum and maximum value locations.
The function vpiCreateMinMaxLoc is used to create the payload for the algorithm. The function vpiSubmitMinMaxLoc is used to find minimum and maximum locations in an image.
VPIStatus vpiCreateMinMaxLoc | ( | uint64_t | backends, |
int32_t | imageWidth, | ||
int32_t | imageHeight, | ||
VPIImageFormat | imageFormat, | ||
VPIPayload * | payload | ||
) |
#include </opt/nvidia/vpi2/include/vpi/algo/MinMaxLoc.h>
Creates payload for vpiSubmitMinMaxLoc.
[in] | backends | VPI backend that will execute the algorithm.
|
[in] | imageWidth,imageHeight | Input image dimensions.
|
[in] | imageFormat | Input image format. |
[out] | payload | Pointer to the payload variable that receives the created handle. |
VPI_ERROR_INVALID_ARGUMENT | payload is NULL. |
VPI_ERROR_INVALID_ARGUMENT | imageWidth or imageHeight outside valid range. |
VPI_ERROR_INVALID_ARGUMENT | backend refers to an invalid backend. |
VPI_ERROR_NOT_IMPLEMENTED | MinMaxLoc algorithm is not supported by given backend. |
VPI_ERROR_INVALID_CONTEXT | Current context is destroyed. |
VPI_IMAGE_FORMAT_INVALID | imageFormat 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 vpiSubmitMinMaxLoc | ( | VPIStream | stream, |
uint64_t | backend, | ||
VPIPayload | payload, | ||
VPIImage | input, | ||
VPIArray | minCoords, | ||
VPIArray | maxCoords | ||
) |
#include </opt/nvidia/vpi2/include/vpi/algo/MinMaxLoc.h>
Finds minimum and maximum value locations in an image.
[in] | stream | The stream handle where the operation will be queued in.
|
[in] | backend | Backend that will execute the algorithm.
|
[in] | payload | Payload as created by vpiCreateMinMaxLoc. |
[in] | input | Input image where minimum and/or maximum are to be found.
|
[out] | minCoords | Output array that stores pixel coordinates with minimum value. If not needed, pass NULL. Number of coordinates returned is limited by array capacity.
|
[out] | maxCoords | Output array that stores pixel coordinates with maximum value. If not needed, pass NULL. Number of coordinates returned is limited by array capacity.
|
VPI_ERROR_INVALID_ARGUMENT | stream is NULL. |
VPI_ERROR_INVALID_ARGUMENT | input is NULL. |
VPI_ERROR_INVALID_ARGUMENT | payload is not created using vpiCreateMinMaxLoc. |
VPI_ERROR_INVALID_ARGUMENT | input image dimension and format does not match the ones associated with payload . |
VPI_ERROR_INVALID_ARRAY_TYPE | minCoords or maxCoords array type not accepted. |
VPI_ERROR_INVALID_PAYLOAD_TYPE | payload is invalid. |
VPI_ERROR_INVALID_OPERATION | The given backend isn't enabled in stream . |
VPI_ERROR_INVALID_OPERATION | The needed backends aren't enabled in stream , input , minCoords or maxCoords . |
VPI_SUCCESS | Operation executed successfully. |