SlideShare a Scribd company logo
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
College of Informatics
Department of Computer Science
ComputerVision and Image Processing (CoSc4113)
ChapterThree: Spatial Domain Image Processing
University of Gondar
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Domain Image Processing
Objectives
By the end of this lesson, you will be able to:
Explain the concept and significance of spatial domain image processing
1
2
3
4
Apply basic intensity transformation functions to enhance digital images
Implement spatial filtering techniques for image enhancement
Interpret image histograms to assess image properties
perform histogram processing to improve image contrast and detail
Combine multiple spatial enhancement methods for advanced image
processing
5
6
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Processing of Digital Images
Basic Intensity Transformation Functions
Histogram of Images
Histogram Processing
Spatial Filtering
Combining Spatial Enhancement Methods
Contents
1
2
3
4
5
6
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Processing of Digital Images
1
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 Technique operate directly on the pixel of an image
Two Principal categories of Spatial Processing are Intensity
transformation and Spatial Filtering
Spatial domain process on image can be described as
g(x,y)=T[f(x,y)]
Where f(x,y) is the input image, g(x,y) is the output image, T is
an operator
T operates on the neighbors of (x, y) (a square or rectangular sub-image centered at
(x,y) to yield the output g(x, y).
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Processing of Digital Images Cont’d
1
The operator T can apply to a single image or to a set of images
such as performing the pixel-by-pixel sum of a sequence of
images for noise reduction
The point (x,y) shown is an arbitrary location in the image and
the small region shown containing the point is a neighborhood
of (x,y)
Spatial domain
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Processing of Digital Images Cont’d
1
The process shown in figure illustrates moving the origin of the
neighborhood from pixel to pixel and applying the operator T to
the pixels in the neighborhood to yield the output at the location
Thus, for any specific location (x,y), the value of the output image
g at those coordinates is equal to the result of applying T to the
neighborhood with origin at (x,y) in f.
3 x 3 neighborhood of (x,y)
A 3 x 3 neighborhood about a point (x,y)
in an image in the spatial domain. The
neighborhood is moved from pixel to pixel
in the image to generate an output image
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Processing of Digital Images Cont’d
1
The smallest neighborhood (mask) is of size 1 x 1 (pixel)
Here, T is called intensity transformation function or (mapping,
gray level function)
g(x,y) =T[f(x,y)]
S=T(r)
Where s,r, denote the intensity of g and f at any point (x,y)
S r
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
 For example, if T(r) has the form as shown in
figure, the effect of applying the
transformation to every pixel of f to generate
the corresponding pixels in g would be to
produce an image of higher contrast than the
original by darkening the intensity levels
below k and brightening the levels above k
 This technique, sometimes called as contrast
stretching, values of r lower than k are
compressed by the transformation function
into a narrow range of s, toward black.
 The opposite is true for values of r higher
than k
Spatial Processing of Digital Images Cont’d
1
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
 Function shown in figure, T(r)
produces a two-level (binary) image.
 A mapping of this form is called a
thresholding function.
 Approaches whose results depend
only on the intensity at a point
sometimes are called point processing
techniques, as opposed to the
neighborhood processing techniques.
Spatial Processing of Digital Images Cont’d
1
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Basic IntensityTransformation Functions
2
 Intensity transformations the values of pixels, before and after processing,
will be denoted by r and s, respectively.
 Expression of the form s = T(r), is used where T is a transformation that
maps a pixel value r into a pixel value s.
 As dealing is in digital quantities, values of a transformation function
typically are stored in a one-dimensional array and the mappings from r to s
are implemented via table lookups.
 For an 8-bit environment, a lookup table containing the values of T will have
256 entries.
 There are three basic gray level transformation
 Linear (Identity and Negative Transformation)
 Logarithmic (log and log inverse)
 Power – law (nth power and nth root transformations)
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Basic IntensityTransformation Functions
2
 In Identity transformation, each value of the input image is directly mapped
to each other value of output image. That results in the same input image
and output image
Identity Transformation
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Basic IntensityTransformation Functions Cont’d
2
 The negative of an image with intensity
levels in the range [0, L - 1] is obtained by
using the negative transformation shown in
figure
 The expression is
s=L-1-r
 Reversing the intensity levels of an image in
this manner produces the equivalent of a
photographic negative
 each value of the input image is subtracted
from the L-1 and mapped onto the output
image
 Since the input image of Einstein is an 8bpp
image, so the number of levels in this image
are 256. Putting 256 in the equation, we get
s = 255 – r
Image Negatives:
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Basic IntensityTransformation Functions Cont’d
2
 Such processing is suited for enhancing white or gray level details embedded in dark
regions of an image, especially when the black areas are dominant in size
a. Original digital mammogram b. Negative image obtained using the negative
transformation
 The original image is a digital mammogram showing a small lesion.
 In spite of the fact that the visual content is the same in both images, Analysis of
breast tissue in the negative image is much easier.
Image Negatives:
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Basic IntensityTransformation Functions Cont’d
2
 The general form of the log transformation in
figure is
s=c log(1+r)
where ¢ is a constant, and it is assumed
that r > =0
 The shape of the log curve in figure shows
that this transformation maps a narrow range
of low intensity values in the input into a
wider range of output levels
 This transformation is used to expand the
value of dark pixels in an image compressing
the higher level-values
Log Transformations:
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Basic IntensityTransformation Functions Cont’d
2
 The log function compresses the dynamic range of
images with large variations in pixel values.
 In Fourier spectrum pixel values have a large dynamic
range
 Fourier spectrum with values in the range 0 to 1.5 x106 is
shown in first figure
 When these values are scaled linearly for display in an 8-
bit system, the brightest pixels will dominate the display.
 The effect of this dominance is relatively small area of
the image is not perceived as black
 After applying s = ¢ log (1 + r) with ¢ = 1 to the spectrum
values, then the range of values of the result becomes 0
to 6.2, which is more manageable.
 Second figure shows the result of scaling this new range
linearly and displaying the spectrum in the same 8-bit
display.
Log Transformations:
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Basic IntensityTransformation Functions Cont’d
2
 Power-law transformations have the basic form S
=c.r y
where ¢ and y are positive constants.
 Sometimes above equation is written as S = c(r+) y
for an offset
 Plots of s versus r for various values of are shown
in figure
 Here, possible transformation curves obtained
simply by varying y. Curves generated with values of
y > 1 have exactly the opposite effect as those
generated with values of y < 1
 A variety of devices used for image capture,
printing, and display respond according to a power
law.
 The exponent in the power-law equation is referred
to as gamma and the process used to correct these
power-law response phenomena is called gamma
correction
Power-Law (Gamma) Transformations:
Plots of the equation s =
¢.r7 for various values of y
(C = 1 for all cases)
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Histogram of an Image
3
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Histogram of an Image cont’d
3
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Histogram Processing
4
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Histogram Processing cont’d
4
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
4 Histogram Processing cont’d
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
4 Histogram Processing cont’d
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
4 Histogram Processing cont’d
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
4 Histogram Processing cont’d
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
4 Histogram Processing cont’d
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
4 Histogram Processing cont’d
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
4 Histogram Processing cont’d
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
4 Histogram Processing cont’d
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
4 Histogram Processing cont’d
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
4 Histogram Processing cont’d
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
4 Histogram Processing cont’d
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
4 Histogram Processing cont’d
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
4 Histogram Processing cont’d
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
4 Histogram Processing cont’d
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
4 Histogram Processing cont’d
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
4 Histogram Processing cont’d
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
4 Histogram Processing cont’d
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
4 Histogram Processing cont’d
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
4 Histogram Processing cont’d
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
4 Histogram Processing cont’d
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
4 Histogram Processing cont’d
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
4 Histogram Processing cont’d
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
4 Histogram Processing cont’d
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Filtering
5
Remember that types of neighborhood:
 intensity transformation: neighborhood of size 1x1
 spatial filter (or mask ,kernel, template or window): neighborhood of
larger size , like 3*3 mask
 The spatial filter mask is moved from point to point in an
image. At each point (x,y), the response of the filter is
calculated
Origin x
y Image f (x, y)
(x, y)
Neighbourhood
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Filtering cont’d
5
Neighbourhood Operations
 For each pixel in the origin image, the outcome is
written on the same location at the target image.
Origin x
y Image f (x, y)
(x, y)
Neighbourhood
Target
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Filtering cont’d
5
Simple Neighbourhood Operations
Simple neighbourhood operations example:
 Min: Set the pixel value to the minimum in the
neighbourhood
 Max: Set the pixel value to the maximum in the
neighbourhood
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Filtering cont’d
5
The Spatial Filtering Process
j k l
m n o
p q r
Origin x
y Image f (x, y)
eprocessed = n*e + j*a + k*b +
l*c + m*d + o*f + p*g + q*h +
r*i
Filter (w)
Simple 3*3
Neighbourhood
e 3*3 Filter
a b c
d e f
g h i
Original
Image
Pixels
*
The above is repeated for every pixel in the original image to
generate the filtered image
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Filtering cont’d
5
Spatial filters
1.Smoothing Spatial filters [low pass].
for Smoothing / Blurring
2. Sharpening Spatial Filters[high pass].
for Edge Detection / Sharpening
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Filtering cont’d
5
Spatial filters : Smoothing ( low pass)
Use: for blurring and noise reduction.
Type of smoothing filters:
1.Standard average
2. weighted average.
3. Median filter
linear
Order statistics
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Filtering cont’d
5
Smoothing Spatial Filters
One of the simplest spatial filtering operations we can
perform is a smoothing operation
 Simply average all of the pixels in a neighbourhood around
a central value
 Especially useful
in removing noise
from images
 Also useful for
highlighting gross
detail
 All weights are equal
1/9
1/9
1/9
1/9
1/9
1/9
1/9
1/9
1/9
Simple
averaging
filter
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Filtering cont’d
5
Smoothing Spatial Filtering
Origin x
y Image f (x, y)
e = 1/9*106 + 1/9*104 + 1/9*100 +
1/9*108 + 1/9*99 + 1/9*98 + 1/9*95 +
1/9*90 + 1/9*85 = 98.3333
Filter
Simple 3*3
Neighbourhood
106
104
99
95
100108
98
90 85
1/9
1/9
1/9
1/9
1/9
1/9
1/9
1/9
1/9
3*3 Smoothing
Filter
104 100 108
99 106 98
95 90 85
Original
Image
Pixels
*
The above is repeated for every pixel in the original image to
generate the smoothed image
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Filtering cont’d
5
Spatial filters : Smoothing
linear smoothing : averaging kernels
Standard average
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Filtering cont’d
5
Spatial filters : Smoothing
Standard and weighted Average- example
130
90
120
110
200
98
94
91
100
99
91
90
90
85
96
82
Standard averaging filter:
(110 +120+90+91+94+98+90+91+99)/9 =883/9 = 98.1
The mask is moved
from point to point in
an image. At each
point (x,y), the
response of the filter
is calculated
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Filtering cont’d
5
What happens when the Values of the Kernel Fall
Outside the Image??!
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Filtering cont’d
5
First solution :Zero padding,
-ve: black border
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Filtering cont’d
5
border padding
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Filtering cont’d
5
Spatial filters : Smoothing
Averaging effects: blurring + reducing noise
Original image 3 x 3 averaging
5 x 5 averaging 9 x 9 averaging
15 x 15 averaging 35 x 35 averaging
Notice how detail
begins to disappear
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Filtering cont’d
5
Spatial filters : Smoothing
linear smoothing : averaging kernels
weighted average.
Used to reduce blurring more.
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Filtering cont’d
5
Spatial filters : Smoothing
Standard and weighted Average- example
130
90
120
110
200
98
94
91
100
99
91
90
90
85
96
82
:Weighted averaging filter:
(110 +2 x 120+90+2 x 91+4 x 94+2 x 98+90+2 x 91+99)/16 =
The mask is moved
from point to point in
an image. At each
point (x,y), the
response of the filter
is calculated
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Filtering cont’d
5
Spatial filters: Order-Statistic Filters :
130
90
120
110
200
98
94
91
100
99
95
90
90
85
96
82
Steps:
1. Sort the pixels in ascending order:
90,90, 91, 94, 95, 98, 99, 110, 120
2. replace the original pixel value by the
median :95
95
becomes
 These are non-linear spatial filters whose response is based on ordering
(increasing /decreasing) the pixel contained in the area encompassed by the filter
 Then replacing the value of the center with the middle value determined by
ranking result
 E.g. Median Filter, Max Filter, Min filter
I. Median Filter
 Popular with certain random
noise and impulse noise (salt
& paper noise)
 They provide excellent noise
reduction
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Filtering cont’d
5
Spatial filters : Smoothing
order statistics: Median filter
use : blurring + reduce salt and pepper noise
The original
image with salt
and pepper noise
The smoothed
image using
averaging
The smoothed image
using median
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Filtering cont’d
5
Smoothing Filters: Median Filtering
(non-linear)
 Very effective for removing “salt and pepper” noise).
averaging
median
filtering
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Spatial Filtering cont’d
5
Spatial filters: Order-Statistic Filters :
ii. Max Filter
 It used to find the brightest points in an image
 Response of a 3 x 3 max filter is given by
R = 𝑀𝑎𝑥 𝑧𝑘 𝐾 = 1, 2, 3, 4, , ,, , 9
 E.g. Given a 3×3 neighborhood
 Then the center pixel (50) will be replaced with the maximum value, which is 90
iii. Min Filter
 Used to find the darkest points in an image
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
Combining Spatial Enhancing Methods
6
Reading Assignment
Spatial Domain Image Processing
Getnet T. Email: getnet6202@gmail.com , College of Informatics , University of Gondar, July 2025
End of Spatial Domain Image Processing
Thank You

More Related Content

PDF
Chapter 3. Intensity Transformations and Spatial Filtering.pdf
PPTX
Image Enhancement - Point Processing
PPTX
Digital Image Processing Unit -2 Notes complete
PPTX
Chapter 3 Image Enhanvement_ComputerVision.pptx
PDF
Image Enhancement in the Spatial Domain.pdf
PPSX
Image Enhancement in Spatial Domain
PPTX
DIP-Enhancement-Spatial.pptx
PPTX
Chapter 3 image enhancement (spatial domain)
Chapter 3. Intensity Transformations and Spatial Filtering.pdf
Image Enhancement - Point Processing
Digital Image Processing Unit -2 Notes complete
Chapter 3 Image Enhanvement_ComputerVision.pptx
Image Enhancement in the Spatial Domain.pdf
Image Enhancement in Spatial Domain
DIP-Enhancement-Spatial.pptx
Chapter 3 image enhancement (spatial domain)

Similar to Chapter 3 Spatial Domain Image Processing.pdf (20)

PPT
Spatial domain and filtering
PPTX
Frequency and Spatial Domain, Contrast Stretching.pptx
PPT
image enhancement
PDF
Lec_2_Digital Image Fundamentals.pdf
PPTX
3rd unit.pptx
PPTX
UNIT-2-PPT1-Image Enhancement in Spatial Domain.pptx
PDF
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
PPT
image processing intensity transformation
PPTX
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
PPTX
Module 2
PDF
DIP Lecture 7-9.pdf
PPTX
IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN.pptx
PDF
Presentation 1
PPTX
Intensity Transformation
PPTX
Image Processing - Unit II - Image Enhancement discussed
PPTX
Image Enhancement in Spatial Domain and Frequency Domain
PPTX
Image enhancement
PPT
Image Enhancement in the Spatial Domain U2.ppt
Spatial domain and filtering
Frequency and Spatial Domain, Contrast Stretching.pptx
image enhancement
Lec_2_Digital Image Fundamentals.pdf
3rd unit.pptx
UNIT-2-PPT1-Image Enhancement in Spatial Domain.pptx
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
image processing intensity transformation
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
Module 2
DIP Lecture 7-9.pdf
IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN.pptx
Presentation 1
Intensity Transformation
Image Processing - Unit II - Image Enhancement discussed
Image Enhancement in Spatial Domain and Frequency Domain
Image enhancement
Image Enhancement in the Spatial Domain U2.ppt
Ad

More from Getnet Tigabie Askale -(GM) (20)

PDF
Chapter 2 Digital Image Fundamentals.pdf
PDF
Chapter 1 Introduction to Computer Vision and Image Processing .pdf
PPTX
Fundamentals of Database management system Lab Manual.pptx
PDF
Chapter 5 and 6 instructions and program control instructions.pdf
PPTX
Chapter 2 and 3 8086,8088 architecture and HW specification.pptx
PDF
Chapter 7 Interrupts in microprocessor and assembly language.pdf
PPTX
Chapter 4 addressing mode in microprocessor.pptx
PDF
chapter 1-part 1 introduction o microprocessor.pdf
PPT
Chapter 1-part 2 introduction to microprocessor.ppt
PPTX
CH2 Mobile Computing in wireless communication.pptx
PPTX
CH4 Wireless Local Area Networks in wireless communication.pptx
PPTX
CH3 Wireless Network Principle in wireless Communication.pptx
PPTX
CH1 Introduction to wireless communication and Mobile Computing.pptx
PPTX
CH5 Cellular Networks in wireless communication.pptx
PPTX
CH6 Mobile Network Layer in wireless communication.pptx
PDF
Chapter 4 FD and normalization edited.pdf
PDF
Chapter 3 Database Modeling short slide.pdf
PDF
Chapter 5 record storage and primary file organization.pdf
PDF
chapter 6 Relational Algebra and calculus.pdf
PDF
chapter 1 Introduction to Database Systems Best.pdf
Chapter 2 Digital Image Fundamentals.pdf
Chapter 1 Introduction to Computer Vision and Image Processing .pdf
Fundamentals of Database management system Lab Manual.pptx
Chapter 5 and 6 instructions and program control instructions.pdf
Chapter 2 and 3 8086,8088 architecture and HW specification.pptx
Chapter 7 Interrupts in microprocessor and assembly language.pdf
Chapter 4 addressing mode in microprocessor.pptx
chapter 1-part 1 introduction o microprocessor.pdf
Chapter 1-part 2 introduction to microprocessor.ppt
CH2 Mobile Computing in wireless communication.pptx
CH4 Wireless Local Area Networks in wireless communication.pptx
CH3 Wireless Network Principle in wireless Communication.pptx
CH1 Introduction to wireless communication and Mobile Computing.pptx
CH5 Cellular Networks in wireless communication.pptx
CH6 Mobile Network Layer in wireless communication.pptx
Chapter 4 FD and normalization edited.pdf
Chapter 3 Database Modeling short slide.pdf
Chapter 5 record storage and primary file organization.pdf
chapter 6 Relational Algebra and calculus.pdf
chapter 1 Introduction to Database Systems Best.pdf
Ad

Recently uploaded (20)

PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
PDF
Smarter Business Operations Powered by IoT Remote Monitoring
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
KodekX | Application Modernization Development
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
PPTX
Cloud computing and distributed systems.
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Sensors and Actuators in IoT Systems using pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
Telecom Fraud Prevention Guide | Hyperlink InfoSystem
PPTX
MYSQL Presentation for SQL database connectivity
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
SAP855240_ALP - Defining the Global Template PUBLIC.pdf
PDF
HCSP-Presales-Campus Network Planning and Design V1.0 Training Material-Witho...
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
Smarter Business Operations Powered by IoT Remote Monitoring
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
KodekX | Application Modernization Development
NewMind AI Monthly Chronicles - July 2025
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
Cloud computing and distributed systems.
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
20250228 LYD VKU AI Blended-Learning.pptx
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Sensors and Actuators in IoT Systems using pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Telecom Fraud Prevention Guide | Hyperlink InfoSystem
MYSQL Presentation for SQL database connectivity
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
GamePlan Trading System Review: Professional Trader's Honest Take
SAP855240_ALP - Defining the Global Template PUBLIC.pdf
HCSP-Presales-Campus Network Planning and Design V1.0 Training Material-Witho...

Chapter 3 Spatial Domain Image Processing.pdf

  • 1. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 College of Informatics Department of Computer Science ComputerVision and Image Processing (CoSc4113) ChapterThree: Spatial Domain Image Processing University of Gondar
  • 2. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Domain Image Processing Objectives By the end of this lesson, you will be able to: Explain the concept and significance of spatial domain image processing 1 2 3 4 Apply basic intensity transformation functions to enhance digital images Implement spatial filtering techniques for image enhancement Interpret image histograms to assess image properties perform histogram processing to improve image contrast and detail Combine multiple spatial enhancement methods for advanced image processing 5 6
  • 3. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Processing of Digital Images Basic Intensity Transformation Functions Histogram of Images Histogram Processing Spatial Filtering Combining Spatial Enhancement Methods Contents 1 2 3 4 5 6 Spatial Domain Image Processing
  • 4. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Processing of Digital Images 1 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 Technique operate directly on the pixel of an image Two Principal categories of Spatial Processing are Intensity transformation and Spatial Filtering Spatial domain process on image can be described as g(x,y)=T[f(x,y)] Where f(x,y) is the input image, g(x,y) is the output image, T is an operator T operates on the neighbors of (x, y) (a square or rectangular sub-image centered at (x,y) to yield the output g(x, y). Spatial Domain Image Processing
  • 5. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Processing of Digital Images Cont’d 1 The operator T can apply to a single image or to a set of images such as performing the pixel-by-pixel sum of a sequence of images for noise reduction The point (x,y) shown is an arbitrary location in the image and the small region shown containing the point is a neighborhood of (x,y) Spatial domain Spatial Domain Image Processing
  • 6. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Processing of Digital Images Cont’d 1 The process shown in figure illustrates moving the origin of the neighborhood from pixel to pixel and applying the operator T to the pixels in the neighborhood to yield the output at the location Thus, for any specific location (x,y), the value of the output image g at those coordinates is equal to the result of applying T to the neighborhood with origin at (x,y) in f. 3 x 3 neighborhood of (x,y) A 3 x 3 neighborhood about a point (x,y) in an image in the spatial domain. The neighborhood is moved from pixel to pixel in the image to generate an output image Spatial Domain Image Processing
  • 7. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Processing of Digital Images Cont’d 1 The smallest neighborhood (mask) is of size 1 x 1 (pixel) Here, T is called intensity transformation function or (mapping, gray level function) g(x,y) =T[f(x,y)] S=T(r) Where s,r, denote the intensity of g and f at any point (x,y) S r Spatial Domain Image Processing
  • 8. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025  For example, if T(r) has the form as shown in figure, the effect of applying the transformation to every pixel of f to generate the corresponding pixels in g would be to produce an image of higher contrast than the original by darkening the intensity levels below k and brightening the levels above k  This technique, sometimes called as contrast stretching, values of r lower than k are compressed by the transformation function into a narrow range of s, toward black.  The opposite is true for values of r higher than k Spatial Processing of Digital Images Cont’d 1 Spatial Domain Image Processing
  • 9. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025  Function shown in figure, T(r) produces a two-level (binary) image.  A mapping of this form is called a thresholding function.  Approaches whose results depend only on the intensity at a point sometimes are called point processing techniques, as opposed to the neighborhood processing techniques. Spatial Processing of Digital Images Cont’d 1 Spatial Domain Image Processing
  • 10. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Basic IntensityTransformation Functions 2  Intensity transformations the values of pixels, before and after processing, will be denoted by r and s, respectively.  Expression of the form s = T(r), is used where T is a transformation that maps a pixel value r into a pixel value s.  As dealing is in digital quantities, values of a transformation function typically are stored in a one-dimensional array and the mappings from r to s are implemented via table lookups.  For an 8-bit environment, a lookup table containing the values of T will have 256 entries.  There are three basic gray level transformation  Linear (Identity and Negative Transformation)  Logarithmic (log and log inverse)  Power – law (nth power and nth root transformations) Spatial Domain Image Processing
  • 11. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Basic IntensityTransformation Functions 2  In Identity transformation, each value of the input image is directly mapped to each other value of output image. That results in the same input image and output image Identity Transformation Spatial Domain Image Processing
  • 12. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Basic IntensityTransformation Functions Cont’d 2  The negative of an image with intensity levels in the range [0, L - 1] is obtained by using the negative transformation shown in figure  The expression is s=L-1-r  Reversing the intensity levels of an image in this manner produces the equivalent of a photographic negative  each value of the input image is subtracted from the L-1 and mapped onto the output image  Since the input image of Einstein is an 8bpp image, so the number of levels in this image are 256. Putting 256 in the equation, we get s = 255 – r Image Negatives: Spatial Domain Image Processing
  • 13. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Basic IntensityTransformation Functions Cont’d 2  Such processing is suited for enhancing white or gray level details embedded in dark regions of an image, especially when the black areas are dominant in size a. Original digital mammogram b. Negative image obtained using the negative transformation  The original image is a digital mammogram showing a small lesion.  In spite of the fact that the visual content is the same in both images, Analysis of breast tissue in the negative image is much easier. Image Negatives: Spatial Domain Image Processing
  • 14. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Basic IntensityTransformation Functions Cont’d 2  The general form of the log transformation in figure is s=c log(1+r) where ¢ is a constant, and it is assumed that r > =0  The shape of the log curve in figure shows that this transformation maps a narrow range of low intensity values in the input into a wider range of output levels  This transformation is used to expand the value of dark pixels in an image compressing the higher level-values Log Transformations: Spatial Domain Image Processing
  • 15. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Basic IntensityTransformation Functions Cont’d 2  The log function compresses the dynamic range of images with large variations in pixel values.  In Fourier spectrum pixel values have a large dynamic range  Fourier spectrum with values in the range 0 to 1.5 x106 is shown in first figure  When these values are scaled linearly for display in an 8- bit system, the brightest pixels will dominate the display.  The effect of this dominance is relatively small area of the image is not perceived as black  After applying s = ¢ log (1 + r) with ¢ = 1 to the spectrum values, then the range of values of the result becomes 0 to 6.2, which is more manageable.  Second figure shows the result of scaling this new range linearly and displaying the spectrum in the same 8-bit display. Log Transformations: Spatial Domain Image Processing
  • 16. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Basic IntensityTransformation Functions Cont’d 2  Power-law transformations have the basic form S =c.r y where ¢ and y are positive constants.  Sometimes above equation is written as S = c(r+) y for an offset  Plots of s versus r for various values of are shown in figure  Here, possible transformation curves obtained simply by varying y. Curves generated with values of y > 1 have exactly the opposite effect as those generated with values of y < 1  A variety of devices used for image capture, printing, and display respond according to a power law.  The exponent in the power-law equation is referred to as gamma and the process used to correct these power-law response phenomena is called gamma correction Power-Law (Gamma) Transformations: Plots of the equation s = ¢.r7 for various values of y (C = 1 for all cases) Spatial Domain Image Processing
  • 17. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Histogram of an Image 3 Spatial Domain Image Processing
  • 18. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Histogram of an Image cont’d 3 Spatial Domain Image Processing
  • 19. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Histogram Processing 4 Spatial Domain Image Processing
  • 20. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Histogram Processing cont’d 4 Spatial Domain Image Processing
  • 21. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 4 Histogram Processing cont’d Spatial Domain Image Processing
  • 22. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 4 Histogram Processing cont’d Spatial Domain Image Processing
  • 23. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 4 Histogram Processing cont’d Spatial Domain Image Processing
  • 24. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 4 Histogram Processing cont’d Spatial Domain Image Processing
  • 25. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 4 Histogram Processing cont’d Spatial Domain Image Processing
  • 26. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 4 Histogram Processing cont’d Spatial Domain Image Processing
  • 27. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 4 Histogram Processing cont’d Spatial Domain Image Processing
  • 28. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 4 Histogram Processing cont’d Spatial Domain Image Processing
  • 29. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 4 Histogram Processing cont’d Spatial Domain Image Processing
  • 30. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 4 Histogram Processing cont’d Spatial Domain Image Processing
  • 31. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 4 Histogram Processing cont’d Spatial Domain Image Processing
  • 32. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 4 Histogram Processing cont’d Spatial Domain Image Processing
  • 33. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 4 Histogram Processing cont’d Spatial Domain Image Processing
  • 34. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 4 Histogram Processing cont’d Spatial Domain Image Processing
  • 35. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 4 Histogram Processing cont’d Spatial Domain Image Processing
  • 36. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 4 Histogram Processing cont’d Spatial Domain Image Processing
  • 37. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 4 Histogram Processing cont’d Spatial Domain Image Processing
  • 38. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 4 Histogram Processing cont’d Spatial Domain Image Processing
  • 39. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 4 Histogram Processing cont’d Spatial Domain Image Processing
  • 40. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 4 Histogram Processing cont’d Spatial Domain Image Processing
  • 41. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 4 Histogram Processing cont’d Spatial Domain Image Processing
  • 42. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 4 Histogram Processing cont’d Spatial Domain Image Processing
  • 43. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 4 Histogram Processing cont’d Spatial Domain Image Processing
  • 44. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Filtering 5 Remember that types of neighborhood:  intensity transformation: neighborhood of size 1x1  spatial filter (or mask ,kernel, template or window): neighborhood of larger size , like 3*3 mask  The spatial filter mask is moved from point to point in an image. At each point (x,y), the response of the filter is calculated Origin x y Image f (x, y) (x, y) Neighbourhood Spatial Domain Image Processing
  • 45. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Filtering cont’d 5 Neighbourhood Operations  For each pixel in the origin image, the outcome is written on the same location at the target image. Origin x y Image f (x, y) (x, y) Neighbourhood Target Spatial Domain Image Processing
  • 46. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Filtering cont’d 5 Simple Neighbourhood Operations Simple neighbourhood operations example:  Min: Set the pixel value to the minimum in the neighbourhood  Max: Set the pixel value to the maximum in the neighbourhood Spatial Domain Image Processing
  • 47. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Filtering cont’d 5 The Spatial Filtering Process j k l m n o p q r Origin x y Image f (x, y) eprocessed = n*e + j*a + k*b + l*c + m*d + o*f + p*g + q*h + r*i Filter (w) Simple 3*3 Neighbourhood e 3*3 Filter a b c d e f g h i Original Image Pixels * The above is repeated for every pixel in the original image to generate the filtered image Spatial Domain Image Processing
  • 48. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Filtering cont’d 5 Spatial filters 1.Smoothing Spatial filters [low pass]. for Smoothing / Blurring 2. Sharpening Spatial Filters[high pass]. for Edge Detection / Sharpening Spatial Domain Image Processing
  • 49. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Filtering cont’d 5 Spatial filters : Smoothing ( low pass) Use: for blurring and noise reduction. Type of smoothing filters: 1.Standard average 2. weighted average. 3. Median filter linear Order statistics Spatial Domain Image Processing
  • 50. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Filtering cont’d 5 Smoothing Spatial Filters One of the simplest spatial filtering operations we can perform is a smoothing operation  Simply average all of the pixels in a neighbourhood around a central value  Especially useful in removing noise from images  Also useful for highlighting gross detail  All weights are equal 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 Simple averaging filter Spatial Domain Image Processing
  • 51. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Filtering cont’d 5 Smoothing Spatial Filtering Origin x y Image f (x, y) e = 1/9*106 + 1/9*104 + 1/9*100 + 1/9*108 + 1/9*99 + 1/9*98 + 1/9*95 + 1/9*90 + 1/9*85 = 98.3333 Filter Simple 3*3 Neighbourhood 106 104 99 95 100108 98 90 85 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 3*3 Smoothing Filter 104 100 108 99 106 98 95 90 85 Original Image Pixels * The above is repeated for every pixel in the original image to generate the smoothed image Spatial Domain Image Processing
  • 52. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Filtering cont’d 5 Spatial filters : Smoothing linear smoothing : averaging kernels Standard average Spatial Domain Image Processing
  • 53. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Filtering cont’d 5 Spatial filters : Smoothing Standard and weighted Average- example 130 90 120 110 200 98 94 91 100 99 91 90 90 85 96 82 Standard averaging filter: (110 +120+90+91+94+98+90+91+99)/9 =883/9 = 98.1 The mask is moved from point to point in an image. At each point (x,y), the response of the filter is calculated Spatial Domain Image Processing
  • 54. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Filtering cont’d 5 What happens when the Values of the Kernel Fall Outside the Image??! Spatial Domain Image Processing
  • 55. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Filtering cont’d 5 First solution :Zero padding, -ve: black border Spatial Domain Image Processing
  • 56. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Filtering cont’d 5 border padding Spatial Domain Image Processing
  • 57. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Filtering cont’d 5 Spatial filters : Smoothing Averaging effects: blurring + reducing noise Original image 3 x 3 averaging 5 x 5 averaging 9 x 9 averaging 15 x 15 averaging 35 x 35 averaging Notice how detail begins to disappear Spatial Domain Image Processing
  • 58. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Filtering cont’d 5 Spatial filters : Smoothing linear smoothing : averaging kernels weighted average. Used to reduce blurring more. Spatial Domain Image Processing
  • 59. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Filtering cont’d 5 Spatial filters : Smoothing Standard and weighted Average- example 130 90 120 110 200 98 94 91 100 99 91 90 90 85 96 82 :Weighted averaging filter: (110 +2 x 120+90+2 x 91+4 x 94+2 x 98+90+2 x 91+99)/16 = The mask is moved from point to point in an image. At each point (x,y), the response of the filter is calculated Spatial Domain Image Processing
  • 60. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Filtering cont’d 5 Spatial filters: Order-Statistic Filters : 130 90 120 110 200 98 94 91 100 99 95 90 90 85 96 82 Steps: 1. Sort the pixels in ascending order: 90,90, 91, 94, 95, 98, 99, 110, 120 2. replace the original pixel value by the median :95 95 becomes  These are non-linear spatial filters whose response is based on ordering (increasing /decreasing) the pixel contained in the area encompassed by the filter  Then replacing the value of the center with the middle value determined by ranking result  E.g. Median Filter, Max Filter, Min filter I. Median Filter  Popular with certain random noise and impulse noise (salt & paper noise)  They provide excellent noise reduction Spatial Domain Image Processing
  • 61. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Filtering cont’d 5 Spatial filters : Smoothing order statistics: Median filter use : blurring + reduce salt and pepper noise The original image with salt and pepper noise The smoothed image using averaging The smoothed image using median Spatial Domain Image Processing
  • 62. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Filtering cont’d 5 Smoothing Filters: Median Filtering (non-linear)  Very effective for removing “salt and pepper” noise). averaging median filtering Spatial Domain Image Processing
  • 63. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Spatial Filtering cont’d 5 Spatial filters: Order-Statistic Filters : ii. Max Filter  It used to find the brightest points in an image  Response of a 3 x 3 max filter is given by R = 𝑀𝑎𝑥 𝑧𝑘 𝐾 = 1, 2, 3, 4, , ,, , 9  E.g. Given a 3×3 neighborhood  Then the center pixel (50) will be replaced with the maximum value, which is 90 iii. Min Filter  Used to find the darkest points in an image Spatial Domain Image Processing
  • 64. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 Combining Spatial Enhancing Methods 6 Reading Assignment Spatial Domain Image Processing
  • 65. Getnet T. Email: [email protected] , College of Informatics , University of Gondar, July 2025 End of Spatial Domain Image Processing Thank You