Sie sind auf Seite 1von 3

0.

Image Noise

Any real world sensor is aected by a certain degree of noise, whether it is thermal, electrical or otherwise. This noise will corrupt the true measurement of the signal, such that any resulting data is a combination of signal and noise. Additive noise, probably the most common type, can be expressed as: I(t) = S(t) + N (t) (1)

where I(t) is the resulting data measured at time t, S(t) is the original signal measured, and N (t) is the noise introduced by the sampling process, environment and other sources of interference.
Signal
1.0 1.0

Noise
1.0

Output

0.5

0.5

signal + noise 0 20 40 60 Time 80 100 120

noise

evel

0.0

0.0

0.5

0.5

1.0

20

40

60 Time

80

100

120

1.0

1.0 0

0.5

0.0

0.5

20

40

60 Time

80

100

120

Figure 1: Noise and Signal A simple example of a pure 1-Dimensional input signal is shown in Figure 1(a). This signal is aected by environmental noise (shown in Figure 1(b)) and the resulting data output from the sensor is the corrupted signal in Figure 1(c). Two of the most common types of noise in image processing are Gaussian noise and Impulse noise (also known as salt and pepper noise).

0.1.1

Additive Gaussian Noise

In Gaussian noise models, the noise density follows a Gaussian normal distribution G(, ) dened by the mean x and standard deviation . x The itk::AdditiveGaussianNoiseFilter can be used to add noise to a volume. This can be useful to evaluate ltering or segmentation algorithms for

= 10

= 20

= 50

Figure 2: Gaussian Noise: the eect of standard deviation ()

p=0.01

p=0.05

p=0.1

Figure 3: Impulse Noise: the eect of probability p example. At each input voxel vin , a sample is taken from the normal variate distribution G(d), and added to the image to produce: vout = vin + x + G(d) (2)

for some mean noise x and standard deviation . The seed d is an arbitrary number to start the pseudo-random sequence. For applications that require high entropy, a common technique is to seed with the current system time (in milliseconds). For repeatable results (ie. to generate the same pseudo-random sequence) use the same seed. An example of using the noise lter is given below: typedef itk::AdditiveGaussianNoiseImageFilter<ImageType > NoisyFilterType; // ... noisy->SetInput( clean->GetOutput() ); noisy->SetMean( 0 ); noisy->SetStandardDeviation( 20 ); Figure 2 shows an image with the Gaussian noise lter applied, showing a range of values.

0.1.2

Impulse Noise

Impulse noise, often found in digital transmission and storage, can be described by the following model: I(t) = (1 e)S(t) + eN (t) (3)

where e = {0, 1} with a probability P. Impulse noise is also known as speckle or salt and pepper noise. For this lter, the distribution between salt and pepper is 50%. An image progressively degraded with impulse noise is shown in Figure 3. typedef itk::ImpulseNoiseImageFilter<ImageType > NoisyFilterType; // ... noisy->SetInput( clean->GetOutput() ); noisy->SetProbability( 0.07 );

0.1.3

Filtering Out Noise

A wide variety of ltering algorithms have been developed to detect and remove noise, leaving as much of possible of the pure signal. These include both temporal lters, and spatial lters (such as the Recursive Gaussian lter). For example, the itk::MeanImageFilter is very eective in ltering Gaussian noise, while the itk::MedianImageFilter works very well against Impulse noise.

0.1.4

Testing with Noise

It is often very useful when developing new imaging algorithms, to evaluate the performance of the system in the presence of noise. By adding the Gaussian noise lter to a clean image source, it is possible to precisely control the parameters of the added noise. And by initialising the lter with the same seed, repeatable results can be obtained. A simple example is shown in Figure 4. A mean lter is applied to the noisy image, and the ltered result is compared to the original image.
noise image noisy_image mean filtered_image difference error

Figure 4: Sample ITK pipeline to evaluate lter performance An example of this pipeline in action is shown in Figure 5. The original image shows a 640 by 480 8-bit grayscale image of a lamp1 . The noisy image (b) was produced with the itk::AdditiveGaussianNoiseFilter using = 20. A mean lter was applied, which smooths the image and removes the noise, the output of which is shown in 5(c). The itk::DifferenceImageFilter is applied to compare the ltered image and the original image. The mean dierence was calculated to be 5.98129. Note that the dierence image in (d) has been contrastenhanced to more clearly show the dierences, which mainly occur around the strong edges around the holes in the lamp. This is due to the low-pass nature of the mean lter, which attenuates high frequencies that make up sharp contrast changes. This eect can be minimised by using an edge-preserving lter, such as itk::GradientAnisotropicDiffusion.

(a)

(b)

(c)

(d)

Figure 5: Filtering noise from an image. (a) Original image, (b) Noisy image, (c) Mean ltered image, (d) Dierence (normalised)
1 Image

courtesy Caltech Computational Vision Group

Das könnte Ihnen auch gefallen