Function References
Additive White
Noise.add_gauss
— Functionadd_gauss(X; clip=false[, σ=0.1, μ=0.0])
Returns the array X
with gauss noise (standard deviation σ
and mean μ
) added. σ
and μ
are optional arguments representing standard deviation and mean of gauss. If keyword argument clip
is provided the values are clipped to be in [0, 1]. If X
is a RGB{Normed} or Gray{Normed} image, then the values will be automatically clipped and the keyword clip
is meaningless.
If X<:Complex
, μ
and σ
are applied to the imaginary in the same way as for the real part. If you want to have different behaviour for real and imaginary part, simply choose μ
or σ
complex.
Noise.add_gauss_chn
— Functionadd_gauss_chn(X; clip=false[, σ=0.1, μ=0.0])
Returns the RGB image X
with gauss noise (standard deviation σ
and mean μ
) added pixelwise. However, every channel of one pixel receives the same amount of noise. The noise therefore acts roughly as intensity - but not color - changing noise. If keyword argument clip
is provided the values are clipped to be in [0, 1]. σ
and μ
are optional arguments representing standard deviation and mean of gauss.
If X<:Complex
, μ
and σ
are applied to the imaginary in the same way as for the real part. If you want to have different behaviour for real and imaginary part, simply choose μ
or σ
complex.
Salt and Pepper
Noise.salt_pepper
— Functionsalt_pepper(X; salt_prob=0.5, salt=1.0, pepper=0.0[, prob=0.1])
Returns array X
affected by salt and pepper noise. X
can be an array or an RGB or Gray image prob
is a optional argument for the probability that a pixel will be affected by the noise. salt_prob
is a keyword argument representing the probability for salt noise. The probability for pepper noise is therefore 1-salt_prob
. salt
is a keyword argument for specifying the value of salt noise. pepper
is a keyword argument for specifying the value of pepper noise.
Noise.salt_pepper_chn
— Functionsalt_pepper_chn(X; salt_prob=0.5, salt=1.0, pepper=0.0[, prob=0.1])
Returns a RGB Image X
affected by salt and pepper noise. When a salt or pepper occurs, it is applied to all channels of the RGB making a real salt and pepper on the whole image. prob
is a optional argument for the probability that a pixel will be affected by the noise. salt_prob
is a keyword argument representing the probability for salt noise. The probability for pepper noise is therefore 1-salt_prob
. salt
is a keyword argument for specifying the value of salt noise. pepper
is a keyword argument for specifying the value of pepper noise.
Poisson
Noise.poisson
— Functionpoisson(X, scaling=nothing; clip=false)
Returns the array X
affected by Poisson noise. At every position the Poisson noise affects the intensity individually and the values at the positions represent the expected value of the Poisson Distribution. Since Poisson Noise due to discrete events you should provide the optional argument scaling
. This scaling
connects the highest value of the array with the discrete number of events. The highest value will be then scaled and the poisson noise is applied Afterwards we scale the whole array back so that the initial intensity is preserved but with applied Poisson noise. clip
is a keyword argument. If given, it clips the values to [0, 1]
Quantization
Noise.quantization
— Functionquantization(X, levels; minv=0, maxv=1)
Returns array X
discretized to levels
different values. Therefore the array is discretized. levels
describes how many different value steps the resulting image has. minv=0
and maxv
indicate the minimum and maximum possible values of the images. In RGB and Gray images this is usually 0 and 1. There is also quantization!
available.
Multiplicative Gaussian Noise
Noise.mult_gauss
— Functionmult_gauss(X; clip=false[, σ=0.1, μ=1])
Returns the array X
with the array value multiplied with a gauss distribution (standard deviation σ
and mean μ
) . σ
and μ
are optional arguments representing standard deviation and mean of gauss. If keyword argument clip
is provided the values are clipped to be in [0, 1]. If X
is a RGB{Normed} or Gray{Normed} image, then the values will be automatically clipped and the keyword clip
is meaningless.
If X<:Complex
, μ
and σ
are applied to the imaginary in the same way as for the real part. If you want to have different behaviour for real and imaginary part, simply choose μ
or σ
complex.
Noise.mult_gauss_chn
— Functionmult_gauss_chn(X; clip=false[, σ=0.1, μ=0.0])
Returns the RGB image X
with the values of the pixel multiplied with a gauss distribution (standard deviation σ
and mean μ
) pixelwise. However, every channel of one pixel receives the same amount of noise. The noise therefore acts roughly as intensity - but not color - changing noise. If keyword argument clip
is provided the values are clipped to be in [0, 1]. σ
and μ
are optional arguments representing standard deviation and mean of gauss.
If X<:Complex
, μ
and σ
are applied to the imaginary in the same way as for the real part. If you want to have different behaviour for real and imaginary part, simply choose μ
or σ
complex.