imgNearestNeighborScale {biOps} | R Documentation |
This function scales an image using nearest neighbor interpolation and returns a new image.
imgNearestNeighborScale(imgdata, x_scale, y_scale)
imgdata |
The image |
x_scale |
The horizontal scale factor |
y_scale |
The vertical scale factor |
return an imagedata object
The scale factors are expected to be greater than 1. To reduce an image use the minification functions instead.
imgScale
imgBilinearScale
imgCubicScale
imgSplineScale
imgMedianShrink
imgAverageShrink
## Not run: x <- readJpeg(system.file("samples", "violet.jpg", package="biOps")) y <- imgNearestNeighborScale(x, 1.5, 1.5) ## End(Not run)