awsraw {adimpro}R Documentation

Smoothing and demosaicing of RAW images

Description

The function integrates smoothing and demosaicing of RAW image data.

Usage

awsraw(object, hmax = 4, aws = TRUE, wb = c(1, 1, 1), cspace = "Adobe", 
       ladjust = 1, maxrange=TRUE, lkern = "Triangle", graph = FALSE, 
       max.pixel = 400, compress = TRUE)

Arguments

object

an object of class adimpro containing the RAW image data. See read.raw for creating such objects.

hmax

maximal bandwidth to use in the smoothing algorithm.

aws

use adaptive weights if aws==TRUE.

wb

Vector containing factors for the three color chanels, allows to change the white balance.

cspace

Color space of the result,

ladjust

Factor for the critical value lambda. Defaults to 1, smaller values increase sensitivity but may result in isolated noisy pixel. Values larger than 1 give smoother up to cartoon like results.

maxrange

If TRUE increase range of values to maximum.

lkern

Specifies the location kernel. Defaults to "Triangle", other choices are "Quadratic", "Cubic" and "Uniform". The use of "Triangle" corresponds to the Epanechnicov kernel nonparametric kernel regression.

graph

(logical). If graph=TRUE intermediate results are illustrated after each iteration step. Defaults to FALSE.

max.pixel

Maximum dimension of images for display if graph=TRUE. If the true dimension is larger, the images are downscaled for display. See also show.image.

compress

logical, determines if image data are stored in raw-format.

Details

Adaptive smoothing is performed on the original RAW data, restricting positive weights to pixel corresponding to the same color channel. Noise is assumed to have a variance depending linearly on the mean. Weights are determined by weigthed distances between color vectors. These color vectors are obtained by demosaicing that is applied to the smoothed RAW data after each iteration of the smoothing algorithm. The demosaicing algorithm is a 3D generalized median, see method="Median4" in function develop.raw.

Value

Object of class "adimpro"

img

Contains the reconstructed image.

ni

Contains the sum of weights, i.e. trace(W_i), in all grid points i.

ni0

Contains the maximum sum of weights for an nonadaptive kernel estimate with the same bandwidth.

hmax

Bandwidth used in the last iteration.

call

The arguments of the function call.

varcoef

Estimated coefficients in the linear variance model for the color channels.

Author(s)

Karsten Tabelow tabelow@wias-berlin.de and Joerg Polzehl polzehl@wias-berlin.de

References

Polzehl, J. and Tabelow, K. (2007). Adaptive smoothing of digital images, Journal of Statistical Software 19 (1).

See Also

read.raw,awsimage, make.image, show.image, clip.image

Examples

## Not run: demo(raw)

[Package adimpro version 0.9.3 Index]