Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

warp

Warp image


Description

Warp image

Usage

warp(im, warpfield, mode = 0L, interpolation = 1L, boundary_conditions = 0L)

Arguments

im

an image

warpfield

Warping field. The (x,y,z) fields should be stacked along the colour coordinate.

mode

Can be 0=backward-absolute | 1=backward-relative | 2=forward-absolute | 3=forward-relative

interpolation

Can be <tt> 0=nearest | 1=linear | 2=cubic </tt>.

boundary_conditions

Boundary conditions. Can be <tt> 0=dirichlet | 1=neumann | 2=periodic </tt>.

See Also

imwarp for a user-friendly interface

Examples

#Shift image via warp
warp.x <- imfill(width(boats),height(boats),val=5)
warp.y <- imfill(width(boats),height(boats),val=20)
warpfield <- list(warp.x,warp.y) %>% imappend("c")
warp(boats,warpfield,mode=1) %>% plot

imager

Image Processing Library Based on 'CImg'

v0.42.10
LGPL-3
Authors
Simon Barthelme [aut], David Tschumperle [ctb], Jan Wijffels [ctb], Haz Edine Assemlal [ctb], Shota Ochi [cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.