powered by
Pad image with n pixels along specified axis
pad(im, nPix, axes, pos = 0, val)
a padded image
the input image
how many pixels to pad with
which axes to pad along
-1: prepend 0: center 1: append
colour of the padded pixels (default 0 in all channels). Can be a string for colour images, e.g. "red", or "black".
Simon Barthelme
pad(boats,20,"xy") %>% plot pad(boats,20,pos=-1,"xy") %>% plot pad(boats,20,pos=1,"xy") %>% plot pad(boats,20,pos=1,"xy",val="red") %>% plot
Run the code above in your browser using DataLab