Skip to contents

Overloaded exp to handle Image objects.

Usage

exp(x, target = "new")

Arguments

x

A 32- or 64-bit (32F or 64F) Image object.

target

The location where the results should be stored when passing a sum of images to the function. It can take 3 values:

"new":

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

"self":

the results are stored back into x (faster but destructive).

An Image object:

the results are stored in another existing Image object. This is fast but will replace the content of target. Note that target should have the same dimensions, bitdepth, and number of channels as x, otherwise an error will be thrown.

Value

If target="new", the function returns an Image object. If target="self", the function returns nothing and modifies x in place. 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"))
changeBitDepth(balloon, "32F", 1 / 255, "self")
#> NULL
exp(balloon)
#> Class: image. 
#> Dimensions: 640x360.
#> Type: BGR, 3-channel, 32F.
#> GPU: FALSE.