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

interp

Interpolate image values


Description

This function provides 2D and 3D (linear or cubic) interpolation for pixel values. Locations need to be provided as a data.frame with variables x,y,z, and c (the last two are optional).

Usage

interp(im, locations, cubic = FALSE, extrapolate = TRUE)

Arguments

im

the image (class cimg)

locations

a data.frame

cubic

if TRUE, use cubic interpolation. If FALSE, use linear (default FALSE)

extrapolate

allow extrapolation (to values outside the image)

Examples

loc <- data.frame(x=runif(10,1,width(boats)),y=runif(10,1,height(boats))) #Ten random locations
interp(boats,loc)

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.