warp

Pixel-wise warping of the image.

Displace each pixel of an image by given [x, y] values.

pure
warp
(
alias interp = linear
ImageTensor
MapTensor
)
(
ImageTensor image
,
MapTensor map
,
ImageTensor prealloc = ImageTensor.init
)

Parameters

interp

(template parameter) Interpolation function, default linear.

image
Type: ImageTensor

Input image, which is warped. Single and multiple channel images are allowed.

map
Type: MapTensor

Displacement map, which holds [x, y] displacement for each pixel of an image.

prealloc
Type: ImageTensor

Pre-allocated memory where resulting warped image is stored, if defined. Should be of same shape as input image, or an emptySlice, which implies newly allocated image is used.

Return Value

Type: auto

Warped input image by given map.

Meta