Return a croped image of desired size by removing pixels from borders of the image

crop(image, width, height)

Arguments

image

input image as a array

width

integer desired width for new image

height

integer desired height for new image

Value

array for croped image

Examples

old_img <- array(1:24, dim = c(10, 10, 3)) croped_img <- crop(old_img, 5, 5)