combine | R Documentation |
The function allows to perform pixelwise operations, specified by a supplied function, on a pair of images.
combine(img1, img2, fun = "+", rescale = TRUE, compress = TRUE, gammatype = "None",
whitep = "D65", cspace = "Adobe", xmode = "RGB", ...)
img1 |
image, object of class adimpro |
img2 |
image, object of class adimpro, need to have the same dimension as img1 |
fun |
A function or primitive of two (or more) arguments
specifying the operation. The first argument corresponds to
grey/color-values in img1, the second to img2. Auxiliary parameters can passed throug |
rescale |
logical: if TRUE the resulting image is rescaled to fit into the range of possible grey/color-values, if FALSE values outside the range are truncated. |
compress |
logical, determines if image data are stored in raw-format. |
gammatype |
character, determines the type of gamma correction within the image.
"ITU" stands for ITU-R BT.709-3 as e.g. used by |
whitep |
White point in |
cspace |
defines the output color space, default "sRGB" (sRGB D65), alternatives are "RAW" (Camera specific), "Adobe" (Adobe 1998 D65), "wGamut" (Wide Gamut D65), "kodak" (Kodak ProPhoto D65) and "XYZ", see manpages of dcraw. |
xmode |
|
... |
additional parameters for function |
There are two mayor applications for this function. First it allows to add noise to an image by first creating an image that contains the noise and then adding this image using fun="+"
. Second it offers a way to replace parts of an image, see examples.
object of class "adimpro" containing the image. The object has the following components:
img |
array containing the color values in the color space specified by |
type |
the color space. |
depth |
color depth, here "16bit". |
dim |
vector of length 2 containing the number of pixel in horizontal and vertival direction. |
file |
the argument |
cspace |
the type of rgb space used, as specified by |
interp |
interpolation applied by dcraw, as specified by |
gamma |
has a gamma correction been applied, here FALSE for |
gammatype |
type of gamma correction |
wb |
type of white balance, as specified by |
compressed |
image data are stored as raw-vector (TRUE) or array of integers (FALSE). |
Karsten Tabelow tabelow@wias-berlin.de and Joerg Polzehl polzehl@wias-berlin.de
make.image
## Not run: demo(combine)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.