VPI - Vision Programming Interface

3.0 Release

Remaps the input image, effectively warping it using a user-provided mapping. More...

Functions

VPIStatus vpiCreateRemap (uint64_t backends, const VPIWarpMap *warpMap, VPIPayload *payload)
 Create a payload for Remap algorithm. More...
 
VPIStatus vpiSubmitRemap (VPIStream stream, uint64_t backend, VPIPayload payload, VPIImage input, VPIImage output, VPIInterpolationType interp, VPIBorderExtension border, uint64_t flags)
 Submits a Remap operation to the stream. More...
 

Detailed Description

Remaps the input image, effectively warping it using a user-provided mapping.

Refer to Remap for more details and usage examples.

Function Documentation

◆ vpiCreateRemap()

VPIStatus vpiCreateRemap ( uint64_t  backends,
const VPIWarpMap warpMap,
VPIPayload payload 
)

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

Create a payload for Remap algorithm.

This function allocates all resources needed by the Remap algorithm and ties the returned payload to the given stream.

Parameters
[in]backendsVPI backends that are eligible to execute the algorithm.
[in]warpMapMapping of output back into input.
  • It must define a grid with the same size as output image.
[out]payloadPointer to the payload variable that receives the created handle.
Return values
VPI_ERROR_INVALID_ARGUMENTpayload is NULL.
VPI_ERROR_INVALID_ARGUMENTwarpMap is NULL.
VPI_ERROR_INVALID_ARGUMENTbackends refers to an invalid backend.
VPI_ERROR_NOT_IMPLEMENTEDRemap algorithm is not supported by given backends.
VPI_ERROR_NOT_IMPLEMENTEDVIC hardware with Remap support is not available.
VPI_ERROR_INVALID_CONTEXTCurrent context is destroyed.
VPI_ERROR_OUT_OF_MEMORYCannot allocate required resources.
VPI_ERROR_INVALID_OPERATIONBackend isn't enabled in current context.
VPI_SUCCESSOperation executed successfully.

◆ vpiSubmitRemap()

VPIStatus vpiSubmitRemap ( VPIStream  stream,
uint64_t  backend,
VPIPayload  payload,
VPIImage  input,
VPIImage  output,
VPIInterpolationType  interp,
VPIBorderExtension  border,
uint64_t  flags 
)

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

Submits a Remap operation 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 created by vpiCreateRemap.
[in]inputImage to be remapped. In a lens distortion correction context, this would correspond to the distorted image.
[out]outputStores the remapped image. In a lens distortion correction context, this would correspond to the corrected (distortion-free).
  • Must not be NULL.
  • Must have same format as input image.
  • Must have the same type as input
  • Must have same dimensions as the warp map specified during payload creation.
  • Image must have enabled the backends that will execute the algorithm.
  • On VIC, maximum input dimensions is 16384x16384.
[in]interpInterpolation method to be used. Valid values:
[in]borderWhat value to pick if remapped coordinated falls outside input image.
[in]flagsControl flags.
  • Valid values are a combination of one or more of the flags:
    • 0 : default, negation of all other flags.
    • VPI_PRECISE : precise, but potentially slower implementation.
Return values
VPI_ERROR_INVALID_ARGUMENTstream is NULL.
VPI_ERROR_INVALID_ARGUMENTinput or output are NULL.
VPI_ERROR_INVALID_ARGUMENTpayload is not generated using vpiCreateRemap.
VPI_ERROR_INVALID_ARGUMENTInvalid flags.
VPI_ERROR_INVALID_ARGUMENTinput and output must have the same format.
VPI_ERROR_INVALID_ARGUMENToutput must have same size corresponding to the warp map passed during payload creation.
VPI_ERROR_INVALID_ARGUMENTborder not supported.
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.