VPI - Vision Programming Interface

1.0 Release

Perspective Warp

Perspective Warp. More...

Typedefs

typedef float VPIPerspectiveTransform[3][3]
 Represents a 2D perspective transform. More...
 

Functions

VPIStatus vpiCreatePerspectiveWarp (uint32_t backends, VPIPayload *payload)
 Creates a payload for Perspective Warp algorithm. More...
 
VPIStatus vpiSubmitPerspectiveWarp (VPIStream stream, uint32_t backend, VPIPayload payload, VPIImage input, const VPIPerspectiveTransform xform, VPIImage output, VPIInterpolationType interp, VPIBorderExtension border, uint32_t flags)
 Submits the Perspective Warp operation to the stream associated with the payload. More...
 

Detailed Description

Perspective Warp.

Typedef Documentation

◆ VPIPerspectiveTransform

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,

  • ux, uy are the inhomogeneous coordinates in the source image.
  • u'x, u'y are the inhomogeneous coordinates in the destination image.
  • vx,vy,vw are the homogeneous coordinates in the destination image.
  • a11,a12,a21,a22 are the2x2 non-singular matrix with the linear component of the transform.
  • tx,ty is the translation component of the transform.
  • p0,p1,p are the projective components of the transform. p is usually 1.

Definition at line 420 of file Types.h.

Function Documentation

◆ vpiCreatePerspectiveWarp()

VPIStatus vpiCreatePerspectiveWarp ( uint32_t  backends,
VPIPayload payload 
)

#include <vpi/algo/PerspectiveWarp.h>

Creates a payload for Perspective Warp algorithm.

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

Parameters
[in]backendsVPI backends that are eligible to execute the algorithm. Currently only one backend is accepted.
[out]payloadPointer to a payload handle with the created payload.
Returns
VPI_SUCCESS if payload was created successfully, or some other VPIStatus value in case of error.

◆ vpiSubmitPerspectiveWarp()

VPIStatus vpiSubmitPerspectiveWarp ( VPIStream  stream,
uint32_t  backend,
VPIPayload  payload,
VPIImage  input,
const VPIPerspectiveTransform  xform,
VPIImage  output,
VPIInterpolationType  interp,
VPIBorderExtension  border,
uint32_t  flags 
)

#include <vpi/algo/PerspectiveWarp.h>

Submits the Perspective Warp operation to the stream associated with the payload.

Parameters
[in]streamThe stream where the operation will be queued in.
[in]backendBackend that will execute the algorithm. Must be one of the backends specified during payload creation. If 0, VPI will select one of the eligible backends from the payload that accepts the given parameters, usually the fastest one.
[in]payloadPayload created by vpiCreatePerspectiveWarp.
[in]inputInput image to be warped.
[in]xformTransform to be applied.
[out]outputOutput image where warped image is written to.
[in]interpInterpolation mode to be used. Valid values:
[in]borderBorder extension to use for samples that fall outsize input's bounds. Value values:
[in]flagsFlags to modify algorithm behavior. Valid values:
  • 0: default, transform isn't inverted, algorithm shall invert it.
  • VPI_WARP_INVERSE : transform is already inverted, algorithm can use it directly.
  • VPI_PRECISE : precise, but potentially slower implementation.
Returns
VPI_SUCCESS if algorithm was submitted successfully, or some other VPIStatus value in case of error. Some errors will only be reported asynchronously by synchronization functions or subsequent algorithm submissions.