VPI - Vision Programming Interface

0.3.7 Release

Data Structures

struct  VPIWarpGrid
 Holds VPI's warp grid definition. More...
 

Macros

#define VPI_WARPGRID_MAX_HORIZ_REGIONS_COUNT   4
 Maximum number of regions horizontally in a warp grid.
 
#define VPI_WARPGRID_MAX_VERT_REGIONS_COUNT   4
 Maximum number of regions vertically in a warp grid.
 
#define VPI_WARPGRID_MIN_REGION_WIDTH   64
 Minimum warp grid region width.
 
#define VPI_WARPGRID_MIN_REGION_HEIGHT   16
 Minimum warp grid region height.
 

Detailed Description


Data Structure Documentation

◆ VPIWarpGrid

struct VPIWarpGrid

Holds VPI's warp grid definition.

This structure defines the layout of the control points in the destination image of a image remap operation.

The control points are used as the basis for geometric transformation from source image to destination image. The remaining points are transformed based on the interpolation. Thus the density of the control points controls the quality of the geometric transformation.

This is an example of defining regions in the image:

warp grid width
/ \
/ \
/ \
regionWidth[0] regionWidth[numHorizRegions-1]
/ \ / \
|------| |------|
-------------------------------- \
|******* ******* *******|-- \
|* . . * * * * *| \ \
|* . . * * * ... * *| regionHeight[0] \
|* . . * * * * *| / \
|******* ******* *******|-- \
| | \
| . . . |
| . . . | warp grid height
| . . . |
| | /
|******* ******* *******|-- /
|* * * * * *| \ /
|* * * * ... * *| regionHeight[numVertRegions-1] /
|* * * * * *| / /
|******* ******* *******|-- /
-------------------------------- /

This is an example of defining control points in one region:

*********
* + + *-- \
* + + *-- /
* *
*********
|--|

Here's an example of a WxH dense grid definition:

grid.numHorizRegions = 1;
grid.numVertRegions = 1;
grid.horizInterval[0] = 1;
grid.vertInterval[0] = 1;
grid.regionWidth[0] = W;
grid.regionHeight[0] = H;

Restrictions

Definition at line 155 of file WarpGrid.h.

+ Collaboration diagram for VPIWarpGrid:
Data Fields
uint16_t horizInterval[VPI_WARPGRID_MAX_HORIZ_REGIONS_COUNT] Horizontal spacing between control points within a given region.

Must be power-of-two.

uint8_t numHorizRegions Number of regions horizontally.
uint8_t numVertRegions Number of regions vertically.
uint16_t regionHeight[VPI_WARPGRID_MAX_VERT_REGIONS_COUNT] Height of each region.
uint16_t regionWidth[VPI_WARPGRID_MAX_HORIZ_REGIONS_COUNT] Width of each region.
uint16_t vertInterval[VPI_WARPGRID_MAX_VERT_REGIONS_COUNT] Vertical spacing between control points within a given region.

Must be power-of-two.

VPIWarpGrid::horizInterval
uint16_t horizInterval[VPI_WARPGRID_MAX_HORIZ_REGIONS_COUNT]
Horizontal spacing between control points within a given region.
Definition: WarpGrid.h:162
VPIWarpGrid::numVertRegions
uint8_t numVertRegions
Number of regions vertically.
Definition: WarpGrid.h:158
VPIWarpGrid::regionWidth
uint16_t regionWidth[VPI_WARPGRID_MAX_HORIZ_REGIONS_COUNT]
Width of each region.
Definition: WarpGrid.h:160
VPIWarpGrid::regionHeight
uint16_t regionHeight[VPI_WARPGRID_MAX_VERT_REGIONS_COUNT]
Height of each region.
Definition: WarpGrid.h:161
VPIWarpGrid::numHorizRegions
uint8_t numHorizRegions
Number of regions horizontally.
Definition: WarpGrid.h:157
VPIWarpGrid::vertInterval
uint16_t vertInterval[VPI_WARPGRID_MAX_VERT_REGIONS_COUNT]
Vertical spacing between control points within a given region.
Definition: WarpGrid.h:164
VPIWarpGrid
Holds VPI's warp grid definition.
Definition: WarpGrid.h:156