as.function.im: Convert Pixel Image to Function of Coordinates

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/images.R

Description

Converts a pixel image to a function of the x and y coordinates.

Usage

1
2
 ## S3 method for class 'im'
as.function(x, ...)

Arguments

x

Pixel image (object of class "im").

...

Ignored.

Details

This command converts a pixel image (object of class "im") to a function(x,y) where the arguments x and y are (vectors of) spatial coordinates. This function returns the pixel values at the specified locations.

Value

A function in the R language, also belonging to the class "funxy".

Author(s)

\adrian \rolf

and \ege

See Also

[.im

Examples

1
2
3
  d <- setcov(square(1))
  f <- as.function(d)
  f(0.1, 0.3)

spatstat.geom documentation built on April 15, 2021, 9:06 a.m.