Apply Function Pixelwise to List of Images
Returns a pixel image obtained by applying a function to the values of corresponding pixels in several pixel images.
im.apply(X, FUN, ...)
- A list of pixel images (objects of class
- A function that can be applied to vectors, or a character string giving the name of such a function.
- Additional arguments to
X should be a list of pixel images
(objects of class
"im"). If the images do not have
identical pixel grids, they will be converted to a common
At each pixel location, the values of the images in
at that pixel will be extracted as a vector. The function
FUN will be applied to this vector. The result (which should be
a single value) becomes the pixel value of the resulting image.
- A pixel image (object of class
eval.im for algebraic operations with images.
DA <- density(split(amacrine)) DA im.apply(DA, max)