Learn R Programming

imager (version 0.14)

iiply: Split an image, apply function, recombine the results as an image

Description

This is just imsplit followed by llply followed by imappend

Usage

iiply(im, axis, fun, ...)

Arguments

im
image
axis
axis for the split (e.g "c")
fun
function to apply
...
extra arguments to function fun

Examples

Run this code
parrots <- load.image(system.file('extdata/parrots.png',package='imager'))
#Normalise colour channels separately, recombine
iiply(parrots,"c",function(v) (v-mean(v))/sd(v)) %>% plot

Run the code above in your browser using DataLab