0% found this document useful (0 votes)
1 views

Spatial_Domain_Methods_in_Digital_Image_Processing_Group_8[1]

The document provides an overview of spatial domain methods in digital image processing, detailing techniques such as point processing, neighborhood processing, histogram processing, and morphological operations. It discusses image enhancement techniques, advantages and limitations of spatial domain methods, and their real-world applications in fields like medical imaging and autonomous vehicles. The document emphasizes the intuitive nature and computational efficiency of these methods while also noting their limitations in handling noise and lack of frequency insight.

Uploaded by

Alfred Baraka
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Spatial_Domain_Methods_in_Digital_Image_Processing_Group_8[1]

The document provides an overview of spatial domain methods in digital image processing, detailing techniques such as point processing, neighborhood processing, histogram processing, and morphological operations. It discusses image enhancement techniques, advantages and limitations of spatial domain methods, and their real-world applications in fields like medical imaging and autonomous vehicles. The document emphasizes the intuitive nature and computational efficiency of these methods while also noting their limitations in handling noise and lack of frequency insight.

Uploaded by

Alfred Baraka
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Table of Contents

SPATIAL DOMAIN METHODS IN DIGITAL IMAGE PROCESSING ............................................ 2


1. INTRODUCTION TO SPATIAL DOMAIN.................................................................................... 2
2. TYPES OF SPATIAL DOMAIN METHODS ................................................................................. 2
(A) Point Processing (Intensity Transformations) ................................................................................ 2
(B) Neighborhood Processing (Spatial Filtering) ................................................................................. 3
(C) Histogram Processing ..................................................................................................................... 4
(D) Morphological Operations .............................................................................................................. 4
3. IMAGE ENHANCEMENT IN SPATIAL DOMAIN ...................................................................... 5
Common techniques/algorithms for image enhancement in spatial domain ...................................... 5
I. Image negativity. ............................................................................................................................... 5
II. Bit plane slicing ................................................................................................................................. 7
III. Thresholding..................................................................................................................................... 9
4. ADVANTAGES & LIMITATIONS ................................................................................................ 10
Advantages.......................................................................................................................................... 10
Limitations .......................................................................................................................................... 11
5. REAL-WORLD APPLICATIONS ................................................................................................. 11
SPATIAL DOMAIN METHODS IN DIGITAL IMAGE PROCESSING

1. INTRODUCTION TO SPATIAL DOMAIN

The spatial domain refers to the image plane itself, where operations are performed directly on
pixel values at coordinates (x, y). Unlike frequency domain methods (which use Fourier
transforms), spatial domain techniques manipulate raw pixel intensities for tasks like:

• Enhancement (brightness, contrast)


• Noise reduction (smoothing filters)
• Edge detection (sharpening filters)
• Feature extraction (thresholding, morphology)

Thus,
By Working directly on pixels makes spatial domain methods intuitive and fast for real-time
applications such as camera filters.

2. TYPES OF SPATIAL DOMAIN METHODS

(A) Point Processing (Intensity Transformations)

Point Processing is a technique in image processing where each pixel is modified independently
based on its own intensity value, without considering neighboring pixels.

Operations applied independently to each pixel (no neighborhood used).

Common Techniques:

Method Formula Effect Real-World Use

Medical imaging
Image Negative S = (L−1) −r Inverts intensities
(X-ray reversal)

Enhancing low-
Log Transformation S = clog(1+r) Expands dark pixels
light images
Method Formula Effect Real-World Use

Display calibration
γ
Power-Law (Gamma) S = c⋅r Adjusts contrast (sRGB gamma
correction)

S =0 if r <T, Creates binary OCR (text


Thresholding else 255 images segmentation)

r−rmin Improves dynamic


Contrast Stretching S= rmax −rmin ×255 Satellite imagery
range

Where:

• r = Input pixel intensity


• s = Output (processed) pixel intensity
• T = Transformation function applied to pixel values
• L is the maximum intensity level (e.g., 255 for 8-bit images)
• c is a scaling constant
• γ controls the curvature in gamma correction

(B) Neighborhood Processing (Spatial Filtering)

Uses a kernel/mask (small matrix) to modify a pixel based on its neighbors.

(i) Smoothing Filters (Low-Pass)

Filter Kernel Example Effect Use Case

1 1 1 1 Pre-processing for
Average [1 1 1 ] Blurs noise
9 object detection
1 1 1

1 1 2 1
Smooths + Face detection (reducing
Gaussian [2 4 2]
16 preserves edges skin texture noise)
1 2 1
Non-linear (picks median Removes salt-
Median Old photo restoration
value) and-pepper noise
(ii) Sharpening Filters (High-Pass)

Filter Kernel Example Effect


0 −1 0
Laplacian [−1 4 −1] Enhances edges
0 −1 0
−1 0 1
Gx=[−2 0 2] Edge detection in self-
Sobel
−1 0 1 driving cars
(for horizontal edges)

(C) Histogram Processing

Histogram Processing refers to techniques that analyze and modify the distribution of pixel
intensity values in an image to improve contrast or match certain characteristics.
Main Techniques includes;

i. Histogram Equalization: Spreads out intensities for better contrast.

Useful when an image is too dark or too bright — it "spreads out" the pixel values.

✓ Used in medical imaging (X-rays, MRI).


ii. Histogram Matching: Forces an image’s histogram to match a reference.
✓ Example: Matching satellite images for consistent analysis.

(D) Morphological Operations

Morphological operations are image-processing techniques used to analyze and process


geometric structures in binary and grayscale images.
These operations focus on the shape and structure of objects within an image. They are
particularly useful in image segmentation, object detection, and noise removal tasks.
Morphological operations aim to probe and transform an image based on its shape, enhancing
features or removing imperfections.

It Analyzes shapes and structures using set theory.


Operation Effect Application

Erosion Shrinks bright regions Removing noise in fingerprint scans

Dilation Expands bright regions Filling gaps in OCR text

Opening Erosion → Dilation Smoothing object contours

Closing Dilation → Erosion Fixing holes in medical masks

3. IMAGE ENHANCEMENT IN SPATIAL DOMAIN

Image enhancement refers to the process of highlighting certain information of an image, as well
as weakening or removing any unnecessary information according to specific needs. For
example, eliminating noise, revealing blurred details, and adjusting levels to highlight features of
an image.

Common techniques/algorithms for image enhancement in spatial domain

I. Image negativity.

This method inverts the pixel values of an image to enhance details, especially in bright regions.
The transformation can be represented as:

S= (L−1) −r
Where:

• S = output (new) pixel value


• r = original pixel value (pixel intensity of the original image)
• L= maximum gray level (e.g., 256 for 8-bit images)

This is particularly useful in medical imaging (e.g., X-ray reversal) to highlight details in bright
regions.

Example 1

Consider we have an 8-bit grayscale image of original intensity, r = 30, Required to find image
negativity.

Solution

Maximum grayscale level, L = 2bit value


L = 28 = 256
Therefore, Output image pixel value, S = (L-1) - r
S = (256-1) - 30

S = 225

So, the corresponding pixel in the negative image would have an intensity of 225.

Example 2
Consider a 3-bit grayscale image represented by the following pixel intensity values. Calculate
the image negativity for this image

f(x,y)
4 3 2 1

3 1 2 4

5 1 6 2

2 3 5 6

Since it is a 3-bit image, Then Max. intensity levels will be


L = 23 = 8 levels
L-1 = 7
And S = (L-1) - r
s = g (x, y) Output image intensity.
r = f (x, y) Original image intensity.
g (x, y) = (L-1) - f (x, y)
g (x, y) = 7- f (x, y)
g (x, y)
3 4 5 6
4 6 5 3
2 6 1 5

5 4 2 1
II. Bit plane slicing

Bit Plane Slicing is a technique in image processing where each bit of the pixel intensity values
is separated into individual "bit planes." This helps analyze or manipulate the image based on the
contribution of each bit level.

MSB

LSB

For an 8-bit image, 0 is encoded as 00000000 and 255 is encoded as 11111111. Any number
between 0 t0 255 is encoded as one byte.
The bit in the far-left side is referred as the Most Significant Bit (MSB) because a change in that
bit would significantly change the value encoded by the byte.
The bit in the far right is referred as the Least Significant Bit (LSB), because a change in this bit
does not change the encoded gray value much.

Example.
Consider a 3-bit grayscale image represented by the following pixel intensity values for f(x,y),
Perform bit plane slicing on this image and extract the Most Significant Bit (MSB), Center Bit,
and Least Significant Bit (LSB) planes.

4 3 2 1

3 1 2 4

5 1 6 2

2 3 5 6
Solution
In Bit Plane image is broken and converted into MSB, Central Bits, and LSB. So, we convert
every pixel value for f (x, y) into 3-bit binary value

100 011 010 001


011 001 010 100
101 001 110 010

010 011 101 110

Now breaking it into planes


MSB – We take the Far-left binary value (Most Significant Bit)
Center Bit plane – Centered binary values
LSB – Right most binary values (Least Significant Bit)
For MSB,

1 0 0 0

0 0 0 1

1 0 1 0

0 0 1 1

For Center Bit Plane

0 1 1 0

1 0 1 0

0 0 1 1

1 1 0 1
For LSB

0 1 0 1

1 1 0 0

1 1 0 0

0 1 1 0

III. Thresholding
Thresholding is a spatial domain technique that converts a grayscale image into a binary image (black
and white) by classifying pixels based on their intensity values relative to a chosen threshold value (T).
Purpose of Thresholding
❖ Segmentation: Isolate objects from the background (e.g., text in scanned documents).
❖ Noise Reduction: Remove low-intensity noise (e.g., salt-and-pepper noise).
❖ Feature Extraction: Highlight regions of interest (e.g., tumors in X-rays

Output g (x, y) = 255 if f (x, y) > T, else 0 (0

255 𝑖𝑓 𝑓 (𝑥,𝑦)>𝑇
g (x, y) =├0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

Where:

• f (x, y): Original grayscale pixel value


• g (x, y): Output binary image pixel
• T: Threshold value
Example:

Consider the following 3×3 grayscale image:

120 80 200

60 150 100

30 170 90
Assume/set Thresholding value to be, Threshold (T) = 100

After Applying Thresholding g (x, y):


255 𝑖𝑓𝑓(𝑥,𝑦)>100
Using the rule: ├0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

Therefore, Output image will be black and white with intensity pixels

255 0 255

0 255 0

0 255 0

❖ 0 represents black (minimum intensity),


❖ 255 represents white (maximum intensity).

4. ADVANTAGES & LIMITATIONS


Advantages.

i. Computationally Efficient. Spatial domain methods do not involve complex transforms


like Fourier or Wavelet, making them light on processing.
ii. Intuitive and Simple to Implement. Since they operate directly on pixels, these methods
are easy to understand and visualize, especially for beginners.
iii. Real-Time Processing. Ideal for applications like smartphone camera filters, security
monitoring systems, and live streaming apps where speed is crucial.
iv. Localized Enhancement. Allows image improvement at specific regions or pixels,
which is useful in medical imaging (e.g., enhancing tumors in MRI scans) or photo
retouching.
v. Works Well on Low-End Devices. Because of low computational demands, these
techniques can be applied effectively even on embedded systems, low-spec smartphones,
or small robotics platforms.
vi. Foundation for Advanced Methods. Many higher-level processes in computer vision
(like segmentation and feature detection) begin with spatial domain enhancement steps.

Limitations
❖ Struggles with periodic noise (frequency domain is better).
❖ Large kernels slow down processing.
❖ Noise Amplification Risk
Improper kernel selection can unintentionally increase noise instead of reducing it.
❖ Lacks Frequency Insight
These methods don’t provide spectral information, which limits their use in applications
like texture classification or compression.

5. REAL-WORLD APPLICATIONS
i. Instagram Filters: Gamma correction + contrast stretching.
ii. Autonomous Vehicles: Sobel/Prewitt filters for lane detection.
iii. Medical Imaging: Enhancing X-rays or MRI scans (e.g., image negatives, histogram
equalization).
iv. Satellite Imagery: Improving contrast for better geographical analysis.
v. Photography: Adjusting brightness and contrast using intensity transformations.
vi. Useful in Security Practices: Noise reduction for clearer surveillance footage.

You might also like