Skip to contents

prUp upsamples an image and then blurs it.

Usage

pyrUp(image, target = "new")

Arguments

image

An Image object.

target

The location where the results should be stored. It can take 2 values:

"new":

a new Image object is created and the results are stored inside (the default).

An Image object:

the results are stored in another existing Image object. This is fast and will not replace the content of image but will replace that of target. Note that if target does not have the same number of channels, and bit depth as image, an error may be thrown. The dimensions of target must satisfy the following conditions:

  • abs(ncol(target) - ncol(image) * 2) <= ncol(target) %% 2

  • abs(nrow(target) - nrow(image) * 2) <= nrow(target) %% 2

Value

If target="new", the function returns an Image object. If target is an Image object, the function returns nothing and modifies that Image object in place.

See also

Author

Simon Garnier, garnier@njit.edu

Examples

balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
big_balloon <- pyrUp(balloon)