Pad image with n pixels along specified axis

Share:

Description

Pad image with n pixels along specified axis

Usage

1
pad(im, nPix, axes, pos = 0, val = 0)

Arguments

im

the input image

nPix

how many pixels to pad with

axes

which axes to pad along

pos

-1: prepend 0: center 1: append

val

value to fill the padding with (default 0)

Value

a padded image

Author(s)

Simon Barthelme

Examples

1
2
3
pad(boats,20,"xy") %>% plot
pad(boats,20,pos=-1,"xy") %>% plot
pad(boats,20,pos=1,"xy") %>% plot

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.