Professional Documents
Culture Documents
Engr Dr Muhammad
and Spatial Filtering Jamil Khan
Objectives
❑ Spatial domain processing Vs transform domain processing.
❑ Histogram
❑ Histogram Equalization
❑ Histogram Matching
Spatial Domain
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.
Spatial Domain
Two principal categories of spatial processing are
1. Intensity transformations
2. Spatial filtering
Spatial Domain
Intensity transformations operate on single pixels of an
image for tasks such as contrast manipulation and image
thresholding.
Spatial Domain
Spatial filtering performs operations on the neighborhood of
every pixel in an image.
Coordinate convention
used to represent digital
images. Because
coordinate values are
integers, there is a one-to-
one Correspondence
between x and y and the
rows (r) and columns (c)
of a matrix.
Spatial Domain
g ( x, y ) = T [ f ( x, y )])
f ( x, y ) : input image
g ( x, y ) : output image
T : an operator on f defined over
a neighborhood of point ( x, y )
Spatial Domain
A 3 × 3 neighborhood
about a point (x , y ) 0 0
in an image.
The neighborhood is
moved from pixel to
pixel in the image to
generate an output
image.
Spatial Domain
1 𝑥 1 is the smallest possible neighborhood.
In this case g depends only on value of f at a single 𝑝𝑜𝑖𝑛𝑡 (𝑥, 𝑦) and we call 𝑇 an
𝑠 = 𝑇(𝑟)
𝛾
𝑠 = 𝑐𝑟
− poor illumination,
spans the ideal full intensity range of the recording medium or display device.
Contrast Stretching
Intensity-Level Slicing
There are applications in which it is of interest to highlight a specific range of
intensities in an image. Some of these applications include enhancing features
in satellite imagery, such as masses of water, and enhancing flaws in X-ray
images.
The method, called intensity-level slicing, can be implemented in several
ways, but most are variations of two basic themes. One approach is to display
in one value (say, white) all the values in the range of interest and in another
(say, black) all other intensities.
Intensity-Level Slicing
Intensity-Level Slicing
Bit-Plane Slicing
Pixel values are integers composed of bits. For example, values in a 256-level
grayscale image are composed of 8 bits (one byte). Instead of highlighting
intensity-level ranges, we could highlight the contribution made to total
image appearance by specific bits.
Bit-Plane Slicing
Bit-Plane Slicing
Bit-Plane Slicing
Histogram Processing
Histogram Equalization
Histogram Matching
1
s1 = T (r1 ) = 7 pr (rj ) = 7 (0.19 + 0.25) = 3.08 → 3
j =0
s2 = 4.55 → 5 s3 = 5.67 → 6
s4 = 6.23 → 6 s5 = 6.65 → 7
s6 = 6.86 → 7 s7 = 7.00 → 7
Histogram Equalization Example
Histogram Equalization Example