VPI - Vision Programming Interface

1.2 Release

MinMaxLoc

Find in an image the minimum and maximum value locations. More...

Functions

VPIStatus vpiCreateMinMaxLoc (uint32_t backends, int32_t imageWidth, int32_t imageHeight, VPIImageFormat imageFormat, VPIPayload *payload)
 Creates payload for vpiSubmitMinMaxLoc. More...
 
VPIStatus vpiSubmitMinMaxLoc (VPIStream stream, uint32_t backend, VPIPayload payload, VPIImage input, VPIArray minCoords, VPIArray maxCoords)
 Finds minimum and maximum value locations in an image. More...
 

Detailed Description

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.

Function Documentation

◆ vpiCreateMinMaxLoc()

VPIStatus vpiCreateMinMaxLoc ( uint32_t  backends,
int32_t  imageWidth,
int32_t  imageHeight,
VPIImageFormat  imageFormat,
VPIPayload payload 
)

#include <vpi/algo/MinMaxLoc.h>

Creates payload for vpiSubmitMinMaxLoc.

Parameters
[in]backendsVPI backends that are eligible to execute the algorithm.
[in]imageWidth,imageHeightInput image dimensions.
[in]imageFormatInput image format.
[out]payloadPointer to memory where the created payload handle will be written to.
Returns
an error code on failure else VPI_SUCCESS.

◆ vpiSubmitMinMaxLoc()

VPIStatus vpiSubmitMinMaxLoc ( VPIStream  stream,
uint32_t  backend,
VPIPayload  payload,
VPIImage  input,
VPIArray  minCoords,
VPIArray  maxCoords 
)

#include <vpi/algo/MinMaxLoc.h>

Finds minimum and maximum value locations in an image.

Note
The MinMaxLoc algorithm does not guarantee deterministic output. Each array capacity (minCoords and maxCoords in vpiSubmitMinMaxLoc) limit the number of locations found by the algorithm, that is the total number may be greater than this limitation and the set of locations returned might differ from one backend to another and in different runs on the same backend. Additionally, there is no strict ordering imposed to each array of locations and might also differ on different backends and runs.
Parameters
[in]streamThe stream handle where the operation will be queued in.
[in]backendBackend that will execute the algorithm.
[in]payloadPayload as created by vpiCreateMinMaxLoc.
[in]inputInput image where minimum and/or maximum are to be found.
[out]minCoordsOutput array that stores pixel coordinates with minimum value. If not needed, pass NULL. Number of coordinates returned is limited by array capacity.
[out]maxCoordsOutput array that stores pixel coordinates with maximum value. If not needed, pass NULL. Number of coordinates returned is limited by array capacity.
Returns
an error code on failure else VPI_SUCCESS.