VPI - Vision Programming Interface

3.0 Release

Equalize Image Histogram

Equalize image histogram for the input image. More...

Functions

VPIStatus vpiCreateEqualizeHist (uint64_t backend, VPIImageFormat fmt, VPIPayload *payload)
 Creates payload for vpiSubmitEqualizeHist. More...
 
VPIStatus vpiSubmitEqualizeHist (VPIStream stream, uint64_t backend, VPIPayload payload, VPIImage input, VPIImage output)
 Equalize the histogram of the image. More...
 

Detailed Description

Equalize image histogram for the input image.

Refer to Equalize Histogram for more details and usage examples.

Function Documentation

◆ vpiCreateEqualizeHist()

VPIStatus vpiCreateEqualizeHist ( uint64_t  backend,
VPIImageFormat  fmt,
VPIPayload payload 
)

#include </opt/nvidia/vpi3/include/vpi/algo/EqualizeHist.h>

Creates payload for vpiSubmitEqualizeHist.

Parameters
[in]backendVPI backend that will execute the algorithm.
  • Backend must be enabled in current context.
Parameters
[in]fmtFormat of input image.
[out]payloadPointer to the payload variable that receives the created handle.
Return values
VPI_ERROR_INVALID_ARGUMENTpayload is NULL.
VPI_ERROR_INVALID_ARGUMENTbackends refers to an invalid backend.
VPI_IMAGE_FORMAT_INVALIDfmt is not supported.
VPI_ERROR_INVALID_CONTEXTCurrent context is destroyed.
VPI_ERROR_NOT_IMPLEMENTEDEqualize Histogram algorithm is not supported by given backend.
VPI_ERROR_OUT_OF_MEMORYCannot allocate required resources.
VPI_ERROR_INVALID_OPERATIONBackend isn't enabled in current context.
VPI_SUCCESSOperation executed successfully.

◆ vpiSubmitEqualizeHist()

VPIStatus vpiSubmitEqualizeHist ( VPIStream  stream,
uint64_t  backend,
VPIPayload  payload,
VPIImage  input,
VPIImage  output 
)

#include </opt/nvidia/vpi3/include/vpi/algo/EqualizeHist.h>

Equalize the histogram of the image.

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]backendVPI backend that will execute the algorithm.
[in]payloadPayload created with vpiCreateEqualizeHist
[in]inputInput image.
  • Must not be NULL.
  • Its format must match the one associated with payload.
  • Image must have enabled the backends that will execute the algorithm.
[out]outputWhere the resulting image will be written to.
  • Must not be NULL.
  • Must have same format and dimensions as input image.
  • Image must have enabled the backends that will execute the algorithm.
Return values
VPI_ERROR_INVALID_ARGUMENTstream is NULL.
VPI_ERROR_INVALID_ARGUMENTinput or output are NULL.
VPI_ERROR_INVALID_ARGUMENTpayload must be created by vpiCreateEqualizeHist.
VPI_ERROR_INVALID_ARGUMENTinput and output must have same dimensions.
VPI_ERROR_INVALID_IMAGE_FORMATinput image format does not match with one associated with payload.
VPI_ERROR_INVALID_IMAGE_FORMAToutput format doesn't match input's.
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.