VPI - Vision Programming Interface

3.1 Release

Color Names Features Extractor

Extracts the Color Names features of the input image. More...

Functions

VPIStatus vpiCreateExtractColorNameFeatures (uint64_t backends, VPIImageFormat outFormat, VPIPayload *payload)
 Creates the payload for the Color Names algorithm. More...
 
VPIStatus vpiSubmitExtractColorNameFeatures (VPIStream stream, uint64_t backend, VPIPayload payload, VPIImage input, VPIImage *output, int32_t numOutputs)
 Submits the Color Names algorithm to the stream. More...
 

Detailed Description

Extracts the Color Names features of the input image.

Function Documentation

◆ vpiCreateExtractColorNameFeatures()

VPIStatus vpiCreateExtractColorNameFeatures ( uint64_t  backends,
VPIImageFormat  outFormat,
VPIPayload payload 
)

#include <vpi/experimental/ColorNames.h>

Creates the payload for the Color Names algorithm.

Parameters
[in]backendsVPI backends that are eligible to execute the algorithm.
[in]outFormatFormat of the output images. 16-bit types will return more precise values, in exchange of some minor performance hit. 8-bit types will be less precise, but typically lead to faster execution time. *
[out]payloadPointer to a handle that will receive the created payload.
Return values
VPI_IMAGE_FORMAT_INVALIDoutType is not supported.
VPI_ERROR_INVALID_ARGUMENTpayload is NULL.
VPI_ERROR_INVALID_ARGUMENTbackends refers to an invalid backend.
VPI_ERROR_NOT_IMPLEMENTEDColorNames is not supported by given backend.
VPI_ERROR_INVALID_CONTEXTCurrent context is destroyed.
VPI_ERROR_OUT_OF_MEMORYCannot allocate required resources.
VPI_SUCCESSOperation executed successfully.

◆ vpiSubmitExtractColorNameFeatures()

VPIStatus vpiSubmitExtractColorNameFeatures ( VPIStream  stream,
uint64_t  backend,
VPIPayload  payload,
VPIImage  input,
VPIImage output,
int32_t  numOutputs 
)

#include <vpi/experimental/ColorNames.h>

Submits the Color Names algorithm to the stream.

Parameters
[in]streamThe stream where the operation will be queued in.
  • Must not be NULL.
  • Stream must have enabled the backends that will execute the algorithm.
[in]backendBackend that will execute the algorithm. Must be the backend specified during payload creation or 0 as a shorthand to use this backend.
[in]payloadPayload to be submitted along the other parameters.
[in]inputInput image.
[out]outputPointer to an array of VPIImage where the features will be written to. Returned features have numOutputs dimensions, each dimension will be written to each image in sequence.
  • Must not be NULL.
  • The images must have the same format as specified during payload creation.
  • All images must have same format.
  • CPU and CUDA: All images must have same dimensions as input image.
  • PVA: Dimensions of all images must be input's width/4 and height/4.
  • All Image must have enabled the backends that will execute the algorithm.
[in]numOutputsNumber of images in output array. It specifies the number of dimensions each feature has.
  • It must be equal to 10.
Return values
VPI_ERROR_INVALID_ARGUMENTstream is NULL.
VPI_ERROR_INVALID_ARGUMENTinput or output are NULL.
VPI_ERROR_INVALID_ARGUMENTnumOutputs outside valid range.
VPI_ERROR_INVALID_ARGUMENTpayload is not generated using vpiCreateExtractColorNameFeatures.
VPI_ERROR_INVALID_ARGUMENTNumber of output images outside valid range.
VPI_ERROR_INVALID_ARGUMENTAll output images must have same format.
VPI_ERROR_INVALID_ARGUMENTAll output images must have same dimensions as input.
VPI_ERROR_INVALID_PAYLOAD_TYPEpayload is invalid.
VPI_ERROR_INVALID_OPERATIONThe needed backends aren't enabled in stream, input or output.
VPI_SUCCESSOperation executed successfully.