powered by
resize an image using the 'nearest neighbors' or the 'bilinear' method
resizeImage(image, width, height, method = "nearest", normalize_pixels = FALSE)
depending on the input, either a matrix or an array
matrix or 3-dimensional array where the third dimension is equal to 3
a number specifying the new width of the image. Corresponds to the image-rows.
a number specifying the new height of the image. Corresponds to the image-columns.
one of 'nearest', 'bilinear'
a boolean. If TRUE, then the output pixel values will be divided by 255.0
Lampros Mouselimis
This function down- or upsamples an image using the 'nearest neighbors' or the 'bilinear' method
path = system.file("tmp_images", "2.jpg", package = "OpenImageR") image = readImage(path) resiz = resizeImage(image, width = 32, height = 32, method = 'nearest')
Run the code above in your browser using DataLab