resize

Resize array using custom interpolation function.

Primarilly implemented as image resize. 1D, 2D and 3D arrays are supported, where 3D array is treated as channeled image - each channel is interpolated as isolated 2D array (matrix).

Interpolation function is given as a template parameter. Default interpolation function is linear. Custom interpolation function can be implemented in the 3rd party code, by following interpolation function rules in dcv.imgproc.interpolation.

Slice!(SliceKind.contiguous, packs, V*)
resize
(
alias interp = linear
SliceKind kind
size_t[] packs
V
size_t SN
)
(
Slice!(kind, packs, V*) slice
,
size_t[SN] newsize
,
TaskPool pool = taskPool
)
if (
packs.length == 1
)

Parameters

slice
Type: Slice!(kind, packs, V*)

Slice to an input array.

newsize
Type: size_t[SN]

tuple that defines new shape. New dimension has to be the same as input slice in the 1D and 2D resize, where in the 3D resize newsize has to be 2D.

pool
Type: TaskPool

Optional TaskPool instance used to parallelize computation.

TODO: consider size input as array, and add prealloc

Meta