vpi.WarpGrid
- class vpi.WarpGrid(regions: Tuple[List[int], List[int]], intervals: Tuple[List[int], List[int]]) vpi.WarpGrid
- class vpi.WarpGrid(size: Tuple[int, int], interval: Union[int, Tuple[int, int]] = None) vpi.WarpGrid
Create a warp grid.
It defines the layout of the control points in the destination image of a
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.
- Parameters
regions (Tuple[List[int], List[int]]) – The width and height of each region, respectively. See C API for details.
intervals (Tuple[List[int], List[int]])) – The horizontal and vertical intervals, respectively. They are the spacing between control points within a given region. See C API for details.
size (Tuple[int, int]) – The dimensions (width, height) of one region in the grid.
interval (Union[int, Tuple[int, int]], optional) – The horizontal and vertical interval of one region in the grid.
- Returns
The warp grid.
- Return type
See also
Read more in the C API references of the group concepts.
Attributes
height
Height of all regions in the grid.
horiz_intervals
Horizontal intervals.
horiz_regions
Horizontal regions.
intervals
Horizontal and vertical intervals.
regions
Horizontal and vertical regions.
size
Dimensions (width, height) of all regions in the grid.
vert_intervals
Vertical intervals.
vert_regions
Vertical regions.
width
Width of all regions in the grid.