Applies a perspective warp on an image. More...
Typedefs | |
typedef float | VPIPerspectiveTransform[3][3] |
Represents a 2D perspective transform. More... | |
Functions | |
VPIStatus | vpiSubmitPerspectiveWarp (VPIStream stream, uint64_t backend, VPIImage input, const VPIPerspectiveTransform xform, VPIImage output, const VPIWarpGrid *grid, VPIInterpolationType interp, VPIBorderExtension border, uint64_t flags) |
Submits a Perspective Warp operation to the stream. More... | |
Applies a perspective warp on an image.
Refer to Perspective Warp for more details and usage examples.
typedef float VPIPerspectiveTransform[3][3] |
#include <vpi/Types.h>
Represents a 2D perspective transform.
[vx] [a11 a12 tx] [ux] [vy] = [a21 a22 ty] [uy] [vw] [ p0 p1 p] [ 1] u'x = vx/vw u'y = vy/vw
In these equations,
VPIStatus vpiSubmitPerspectiveWarp | ( | VPIStream | stream, |
uint64_t | backend, | ||
VPIImage | input, | ||
const VPIPerspectiveTransform | xform, | ||
VPIImage | output, | ||
const VPIWarpGrid * | grid, | ||
VPIInterpolationType | interp, | ||
VPIBorderExtension | border, | ||
uint64_t | flags | ||
) |
#include <vpi/algo/PerspectiveWarp.h>
Submits a Perspective Warp operation to the stream.
[in] | stream | The stream where the operation will be queued in.
|
[in] | backend | VPI backends that are eligible to execute the algorithm.
|
[in] | input | Input image to be warped.
|
[in] | xform | Transform to be applied. |
[out] | output | Output image where warped image is written to. Dimensions may be different from input .
|
[in] | grid | Grid on the output to establish performance/quality trade-offs. A dense grid will result in best quality, albeit slower performance. Grid must be set depending on the perf/quality criteria needed. Pass NULL as a shortcut for using a dense grid.
|
[in] | interp | Interpolation mode to be used when source coordinate doesn't fall exactly on pixel center.
|
[in] | border | Border extension to use for samples that fall outsize input's bounds.
|
[in] | flags | Flags to modify algorithm behavior.
|
VPI_ERROR_INVALID_ARGUMENT | stream is NULL. |
VPI_ERROR_INVALID_ARGUMENT | input or output are NULL. |
VPI_ERROR_INVALID_ARGUMENT | xform is NULL. |
VPI_ERROR_INVALID_ARGUMENT | Invalid flags . |
VPI_ERROR_INVALID_ARGUMENT | input and output must have the same format. |
VPI_ERROR_INVALID_ARGUMENT | border not supported. |
VPI_ERROR_INVALID_ARGUMENT | backend is invalid or unknown. |
VPI_ERROR_INVALID_ARGUMENT | input and/or output dimensions not supported. |
VPI_ERROR_INVALID_ARGUMENT | grid configuration not supported by backend. |
VPI_ERROR_INVALID_ARGUMENT | grid dimensions don't match output image's. |
VPI_ERROR_INVALID_IMAGE_FORMAT | Image format not supported. |
VPI_ERROR_NOT_IMPLEMENTED | Perspective Warp algorithm is not supported by given backend. |
VPI_ERROR_INVALID_OPERATION | Backend hardware not available. |
VPI_ERROR_INVALID_OPERATION | The needed backends aren't enabled in stream , input or output . |
VPI_SUCCESS | Operation executed successfully. |