addWeighted | R Documentation |
This function computes the weighted sum of two
Image
objects.
addWeighted(e1, e2, weight = c(0.5, 0.5), target = "new")
e1 |
An |
e2 |
An |
weight |
A 2-element vector of the respective weight of each image (default: c(0.5, 0.5)). If the two weights do not add up to 1, they will be rescaled accordingly. |
target |
The location where the results should be stored. It can take 3 values:
|
If target="new"
, the function returns an Image
object. If target="self"
, the function returns nothing and modifies
e1
in place. If target
is an Image
object,
the function returns nothing and modifies that Image
object in
place.
Simon Garnier, garnier@njit.edu
Image
balloon1 <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
balloon2 <- image(system.file("sample_img/balloon2.png", package = "Rvision"))
balloon_weighted <- addWeighted(balloon1, balloon2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.