Description Usage Arguments Examples
Pad an image
1 2 |
img |
image |
padding |
vector of four padding values (top, bottom, left, right). Specifying any one of the individual values will override the vector specification. |
value |
fill value to use for padding the image. If value has the same length as the number of frames in the image, it will be applied frame-wise. |
top |
number of pixels to add to the top |
bottom |
number of pixels to add to the bottom |
left |
number of pixels to add to the left |
right |
number of pixels to add to the right |
1 2 3 4 5 6 7 8 9 10 11 12 | par(mfrow = c(1, 2))
im <- EBImage::readImage(system.file('images', 'nuclei.tif', package='EBImage'))[,,1:3]
EBImage::colorMode(im) <- "Color"
dim(im)
plot(im)
im_pad <- img_pad(im, value = c(0, 1, 0), top = 15, bottom = 10, left = 5, right = 0)
dim(im_pad)
plot(im_pad)
im_pad <- img_pad(im, value = c(0, 1, 0), padding = c(15, 10, 5, 0))
dim(im_pad)
plot(im_pad)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.