Professional Documents
Culture Documents
DIP - Unit-III
DIP - Unit-III
Unit- III
1
10-10-2020
Noise Models
The principal sources of noise in digital
Images are corrupted during
images arise during image acquisition and/or
transmission principally due to
transmission.
interference in the channel used for
transmission.
The performance of imaging sensors is
affected by a variety of factors, such as Frequency properties refer to the
environmental conditions during image frequency content of noise in the Fourier
acquisition, and by the quality of the sensing sense
elements themselves.
Noise is independent of spatial coordinates, and that it is uncorrelated with respect to the
image itself .
(there is no correlation between pixel values and the values of noise components).
Dr. R. Rajkamal
Z represents intensity,
The standard deviation squared, is called the variance of z
Dr. R. Rajkamal
2
10-10-2020
Gamma Noise
Dr. R. Rajkamal
Dr. R. Rajkamal
3
10-10-2020
Mean Filters
Noise-reduction capabilities - Smoothing filters in spatial and frequency domain.
Mean filter Harmonic mean filter
Geometric mean filter Contraharmonic mean filter
Mean filter This operation can be implemented using a spatial filter of size m x n
in which all coefficients have value 1/mn.
A mean filter smooths local variations in an image, and noise is
reduced as a result of blurring.
Geometric mean filter Each restored pixel is given by the product of the pixels in the
subimage window, raised to the power.
A geometric mean filter achieves smoothing comparable to the
arithmetic mean filter, but it tends to lose less image detail in
the process.
Dr. R. Rajkamal
Mean Filters
Harmonic mean filter The harmonic mean filter works well for salt noise, but fails for
pepper noise.
It does well also with other types of noise like Gaussian noise.
4
10-10-2020
Order-Statistic Filters
Order-statistic filters are spatial filters whose response is based on ordering (ranking) the
values of the pixels contained in the image area encompassed by the filter. The ranking result
determines the response of the filter.
Median filter Median filters are quite popular because, for certain types of
random noise, they provide excellent noise-reduction capabilities,
with considerably less blurring than linear smoothing filters of
similar size.
Max and min filters This filter is useful for finding the brightest points in an image. Also,
because pepper noise has very low values, it is reduced by this filter
as a result of the max selection process in the sub image area Sxy.
This filter is useful for finding the darkest points in an image. Also, it
reduces salt noise as a result of the min operation.
Dr. R. Rajkamal
Order-Statistic Filters
Midpoint filter
The midpoint filter simply computes the midpoint between the maximum and minimum
values in the area encompassed by the filter.
This filter combines order statistics and averaging. It works best for randomly distributed
noise, like Gaussian or uniform noise.
5
10-10-2020
Adaptive Filters
The mean gives a measure of average intensity in the region over which the
mean is computed, and the variance gives a measure of contrast in that region.
Dr. R. Rajkamal
6
10-10-2020
Bandreject Filters
(a) Image corrupted by sinusoidal noise.
(b) Spectrum of (a).
(c) Butterworth bandreject filter (white represents 1).
(d) Result of filtering.
Inverse Filtering
The material in this section is our first step in studying restoration of images degraded by a
degradation function H, which is obtained by three principal ways to estimate the degradation
function (1) Observation, (2) Experimentation, and (3) Mathematical modeling.
The simplest approach to restoration is direct inverse filtering, where we compute an estimate,
of the transform of the original image simply by dividing the transform of the degraded image,
by the degradation function:
H(0,0) is usually the highest value of H(u,v) in the frequency domain. Thus, by limiting the
analysis to frequencies near the origin, reduce the probability of encountering zero values.
Dr. R. Rajkamal
7
10-10-2020
This approach incorporates both the degradation function and statistical characteristics of
noise into the restoration process.
The method is founded on considering images and noise as random variables, and the
objective is to find an estimate of the uncorrupted image f such that the mean square error
between them is minimized.
It is assumed that the noise and the image are uncorrelated; that one or the other has zero mean; and that the
intensity levels in the estimate are a linear function of the levels in the degraded image.
Dr. R. Rajkamal
Wiener filter does not have the same problem as the inverse filter with zeros in the
degradation function, unless the entire denominator is zero for the same value(s) of u and v.
This image cannot currently be display ed.
Dr. R. Rajkamal
8
10-10-2020
A number of useful measures are based on the power spectra of noise and of the undegraded
image.
One of the most important is the signal-to-noise ratio, approximated using frequency domain
quantities such as
Dr. R. Rajkamal
Edge detectors are local image processing methods designed to detect edge pixels.
A line may be viewed as an edge segment in which the intensity of the background on
either side of the line is either much higher or much lower than the intensity of the line
pixels.
9
10-10-2020
Dr. R. Rajkamal
Dr. R. Rajkamal
10
10-10-2020
Such points are labeled 1 in the output image and all others are
labeled 0, thus producing a binary image.
These features are usually defined as regions in the image where there is significant edge strength in two
or more directions.
Dr. R. Rajkamal
Dr. R. Rajkamal
11
10-10-2020
The only differences in intensity that are considered of interest are those large enough (as determined by ) to be
considered isolated points. Note that, as usual for a derivative mask, the coefficients sum to zero, indicating
that the mask response will be zero in areas of constant intensity.
This type of detection process is rather specialized, because it is based on abrupt intensity changes at single-
pixel locations that are surrounded by a homogeneous background in the area of the detector mask
Dr. R. Rajkamal
Line Detection
For line detection It is expected that second derivatives to result in a stronger response and to produce thinner
lines than first derivatives. Thus, we can use the Laplacian mask for line detection also, keeping in mind that the
double-line effect of the second derivative must be handled properly.
Dr. R. Rajkamal
12
10-10-2020
Line Detection
Suppose that an image with a constant background and containing various lines (oriented
at 0°, +45, - 45 and 90°) is filtered with the first mask. The maximum responses would
occur at image locations in which a horizontal line passed through the middle row of the
mask.
Dr. R. Rajkamal
Edge detection
Edge detection is the approach used most frequently for segmenting images based on abrupt (local) changes in
intensity.
Detecting changes in intensity for the purpose of finding edges can be accomplished using
first- or second-order derivatives.
Dr. R. Rajkamal
13
10-10-2020
Edge detection
Dr. R. Rajkamal
Dr. R. Rajkamal
14
10-10-2020
2. Compute the Laplacian of the image resulting from Step 1 using, for example, the 3 x 3
mask.
A zero crossing at p implies that the signs of at least two of its opposing neighboring pixels must differ.
There are four cases to test: left/right, up/down, and the two diagonals.
If the values of g(x,y) are being compared against a threshold, then not only must the signs of opposing
neighbors be different, but the absolute value of their numerical difference must also exceed the threshold
before we can call p a zero- crossing pixel.
Dr. R. Rajkamal
15
10-10-2020
Summarizing, the Canny edge detection algorithm consists of the following basic steps: This image cannot currently be display ed.
Dr. R. Rajkamal
Strong Edges
Weak Edges
Dr. R. Rajkamal
16
10-10-2020
Dr. R. Rajkamal
Local Processing
Dr. R. Rajkamal
17
10-10-2020
Regional Processing
Dr. R. Rajkamal
Dr. R. Rajkamal
18
10-10-2020
Dr. R. Rajkamal
Watershed Algorithm
An image gradient is a directional change in the
intensity or color in an image. Image gradients may
be used to extract information from images.
19
10-10-2020
Watershed Algorithm
The concept of watersheds is based on visualizing an image in three dimensions: two spatial
coordinates versus intensity
Watershed Algorithm
Suppose that a hole is punched in each regional minimum and that the entire topography
is flooded from below by letting water rise through the holes at a uniform rate.
When the rising water in distinct catchment basins is about to merge, a dam is built to
prevent the merging.
The flooding will eventually reach a stage when only the tops of the dams are visible above
the water line.
20
10-10-2020
Watershed Algorithm
https://docs.opencv.org/master/d7/d1c/tutorial_js_watershed.html
Dr. R. Rajkamal
21