Ch03_Spatial Domain Image Processing (1)
Ch03_Spatial Domain Image Processing (1)
1
3.1. Spatial Processing of Digital
Images
The term spatial domain refers to the image
plane itself, and image processing methods in
this category are based on direct
manipulation of pixels in an image.
Two principal categories of spatial processing
are intensity transformations and spatial
filtering.
Intensity transformations operate on single
pixels of an image for tasks such as contrast
manipulation and image thresholding.
2
…cont’d
3
The Basics of Intensity Transformations
and Spatial Filtering
4
…cont’d
5
…cont’d
7
…cont’d
9
3.2. Basic Intensity Transformation
Functions
There are three basic types of intensity
transformation functions:
Linear (negative and identity transformations),
Logarithmic (log and inverse-log
transformations), and
Power-law (nth power and nth root
transformations).
The identity function is the trivial case in which
the input and output intensities are identical.
10
…cont’d
11
Image Negatives
12
…cont’d
13
Log Transformations
14
…cont’d
16
Power-law (Gamma)
Transformations
Power-law transformations have the form
17
…cont’d
18
Piecewise Linear Transformation
Functions
Complementary approach to Linear,
Logarithmic, and Power-law transformations.
The advantage of these functions is that the
form of piecewise functions can be arbitrarily
complex.
The main disadvantage of these functions is
that their specification requires considerable
user input.
Example: Contrast Stretching, Intensity-Level
Slicing, Bit-Plane Slicing
19
Contrast Stretching
Low-contrast images can result from poor
illumination, lack of dynamic range in the
imaging sensor, or even the wrong setting of a
lens aperture during image acquisition.
Contrast stretching expands the range of
intensity levels in an image so that it spans the
ideal full intensity range of the recording
medium or display device.
20
…cont’d
24
Bit-planes of an 8-bit image.
…cont’d
25
3.3 Histogram Processing
Image Histogram
An image histogram is a type of histogram that
acts as a graphical representation of the tonal
distribution in a digital image.
It plots the number of pixels for each tonal
value
The horizontal axis of the graph represents the
tonal variations, while the vertical axis
represents the total number of pixels in that
particular tone.
26
…cont’d
Image
27
Image Histogram
…cont’d
29
Histogram Equalization
30
…cont’d
33
3.4 Spatial Filtering
37
Spatial Correlation and
Convolution
Correlation consists of moving the center of a
kernel over an image, and computing the sum
of products at each location.
Spatial convolution are the same, except that
the correlation kernel is rotated by 180°.
The correlation of a kernel w of size m x n
with an image f(x,y), is given by
38
…cont’d
39
Types of Spatial Filter
40
Smoothing spatial filters
Image averaging 43
Lowpass Gaussian Filter Kernels
44
…cont’d
45
Order-statistic (Nonlinear) Filters
Min filter
Replaces the value of the center pixel by the
minimum of the of the intensity values in the
neighborhood of that pixel
Useful for finding the darkest points in an
image
48
Sharpening Spatial Filters
49
Foundations
Second Derivatives:
Must be zero in areas of constant intensity.
Must be nonzero at the onset and end of an
intensity step or ramp.
Must be zero along intensity ramps.
We define the second-order derivative of f(x )
as the difference
51
…cont’d
52
Image Sharpening – the Laplacian
Laplacian Kernels
54
…cont’d
56
Image Sharpening – the Gradient
57
…cont’d