Learn R Programming

imager (version 0.14)

imager.combine: Combining images

Description

These functions take a list of images and combine them by adding, multiplying, taking the parallel min or max, etc.

Usage

add(x)

average(x)

mult(x)

parmax(x)

parmin(x)

Arguments

x
a list of images

Functions

  • add:
  • average:
  • mult:
  • parmax:
  • parmin:

See Also

imsplit,Reduce

Examples

Run this code
im1 <- as.cimg(function(x,y) x,100,100)
im2 <- as.cimg(function(x,y) y,100,100)
im3 <- as.cimg(function(x,y) cos(x/10),100,100)
l <- list(im1,im2,im3)
add(l) %>% plot #Add the images
average(l) %>% plot #Average the images
mult(l) %>% plot #Multiply
parmax(l) %>% plot #Parallel max
parmin(l) %>% plot #Parallel min
#Pseudo-artistic effects
llply(seq(1,35,5),function(v) boxblur(boats,v)) %>% parmin %>% plot
llply(seq(1,35,5),function(v) boxblur(boats,v)) %>% average %>% plot

Run the code above in your browser using DataLab