SlideShare a Scribd company logo
COMPUTER GRAPHICS & IMAGE PROCESSING
COM2304
Intensity Transformation and Spatial Filtering – II
Spatial Filtering and Smoothing
K.A.S.H.Kulathilake
B.Sc. (Hons) IT (SLIIT), MCS (UCSC), M.Phil (UOM), SEDA(UK)
Rajarata University of Sri Lanka
Faculty of Applied Sciences
Department of Physical Sciences
Learning Outcomes
COM2304 - Computer Graphics & Image
Processing
• At the end of this lecture, you should be
able to;
– describe the fundamentals of spatial filtering.
– generating spatial filter masks.
– identify smoothing via linear filters and non
linear filters.
– apply smoothing techniques for problem
solving.
Filters in Image Processing
• Filter can accept or reject certain frequency
components.
• In image processing filters are mainly used to
suppress either the high frequencies in the
image, i.e. smoothing the image, or the low
frequencies, i.e. enhancing/ sharpening or
detecting edges in the image.
• An image can be filtered either in the
frequency or in the spatial domain.
COM2304 - Computer Graphics & Image
Processing
Fundamentals of Frequency
Domain Filtering
• Frequency domain filtering involves ;
– transforming the image into the
frequency domain,
– multiplying it with the frequency
filter function and
– re-transforming the result into the
spatial domain.
• The filter function is shaped so as to
attenuate some frequencies and
enhance others.
• For example, a simple lowpass function
is 1 for frequencies smaller than the
cut-off frequency and 0 for all others.
COM2304 - Computer Graphics & Image
Processing
Fundamentals of Spatial Filtering
• Spatial filter contains two components;
– MASK/ CONVOLUTION MATRIX/ KERNEL: A neighborhood
(typically small rectangle:)
– FILTER FUNCTION: A predefined operation that is performed
on the image pixels encompassed by the neighborhood.
• Spatial filtering is the method of choice in situations when only
additive random noise is present.
• Filtering creates a new pixel value with coordinates equal to the
coordinates of the center of the neighborhood, and whose value
is the result of the filtering operation.
COM2304 - Computer Graphics & Image
Processing
Fundamentals of Spatial Filtering
(Cont….)
COM2304 - Computer Graphics & Image
Processing
Fundamentals of Spatial Filtering
(Cont….)
COM2304 - Computer Graphics & Image
Processing
If the operation
performed on the image
pixels is linear, then the
filter is called a linear
spatial filter, otherwise,
the filter is non-linear.
Fundamentals of Spatial Filtering
(Cont….)
• Spatial filtering of an image of size M×N with a filter of size
m×n is given by the expression;
• Where w is the mask and f is the image function, x and y
are varied so that each pixel in w visits every pixel in f.
• m = 2a+1 and n = 2b+1, where a and b are positive
integers.
• This concept is known as correlation.
COM2304 - Computer Graphics & Image
Processing
Fundamentals of Spatial Filtering
(Cont….)
• There are two closely related concepts that
must be understood clearly when performing
linear spatial filtering
– Correlation
• Correlation is the process of moving a filter mask over
the image and computing the sum of products at each
location exactly as explained previously.
– Convolution
• The mechanics of convolution are the same as
correlation except that the filter is first rotated by 180
degrees.
COM2304 - Computer Graphics & Image
Processing
Fundamentals of Spatial Filtering
(Cont….)
COM2304 - Computer Graphics & Image
Processing
If the filter mask is symmetric, correlation and convolution
yield the same result
Mask/Kernel/ Convolution Matrix
• In image processing, a kernel, convolution
matrix, or mask is a small matrix.
• It is useful for blurring, sharpening,
embossing, edge detection, and more.
• This is accomplished by means of convolution
between a kernel and an image.
COM2304 - Computer Graphics & Image
Processing
Mask/Kernel/ Convolution Matrix
(Cont…)
• Important Features of
Kernel
– Size: 3×3, 5×5, 9×9,
21×21
– Shape: rectangle, cross,
strip, circular, diamond
or user defined.
– Coefficients / Values:
set based on the
operation.
– Anchor point: mostly in
middle
COM2304 - Computer Graphics & Image
Processing
0 -1 0
-1 5 -1
0 -1 0
3×3 Kernel
Anchor
Values for
sharpening
operation
Mask/Kernel/ Convolution Matrix
(Cont…)
COM2304 - Computer Graphics & Image
Processing
0 -1 0
-1 5 -1
0 -1 0
Kernel
Mask/Kernel/ Convolution Matrix
(Cont…)
COM2304 - Computer Graphics & Image
Processing
http://setosa.io/ev/image-kernels/
https://en.wikipedia.org/wiki/Kernel_(image_processing)
Convolution
• Convolution is a simple mathematical
operation which is fundamental to many
common image processing operators.
• This can be used in image processing to
implement operators whose output pixel
values are simple linear combinations of
certain input pixel values.
COM2304 - Computer Graphics & Image
Processing
Convolution (Cont…)
COM2304 - Computer Graphics & Image
Processing
Each kernel position
corresponds to a single
output pixel, the value of
which is calculated by
multiplying together the
kernel value and the
underlying image pixel
value for each of the cells
in the kernel, and then
adding all these numbers
together.
The convolution is
performed by sliding the
kernel over the image,
generally starting at the
top left corner.
Convolution (Cont…)
COM2304 - Computer Graphics & Image
Processing
Generating Spatial Filter Masks
• Generating an m×n linear spatial filter requires that we
specify mn mask coefficients.
• These coefficients are selected based on what the filter
is supposed to do.
• There are different types of filters available, some of
them are;
– Linear filters - In signal processing, a linear filter is a filter
whose output is a linear function of its input.
– Continuous function based filters – e.g. Gaussian
smoothing (it’s a kind of linear filter).
– Non linear filters - In signal processing, a non-linear filter is
a filter whose output is not a linear function of its input.
COM2304 - Computer Graphics & Image
Processing
Generating Spatial Filter Masks (cont…)
• Linear filters
– Implement sum of products
– ex: filters used for smoothing
• Continuous function based filters
– ex: Gaussian function of two variables as shown in the following
equation;
– Where σ is the standard deviation and coordinates x and y are
the positive integers.
– Recall that 2D Gaussian function has bell shape and the σ
control the tightness of the bell.
COM2304 - Computer Graphics & Image
Processing
Generating Spatial Filter Masks (cont…)
• Non linear/ Order static filters
– Non linear filters require to specify the size of the
filter and the operation(s) to be performed on the
image pixel contained in the filter.
• ex: filter 5×5 filter centered at an arbitrary point and
perform max operation.
– Non linear filters are quiet powerful in some
applications, than the linear filters.
COM2304 - Computer Graphics & Image
Processing
Smoothing Spatial Filters
• Smoothing filters are used for blurring and
noise reduction.
• Blurring is used in preprocessing tasks, such as
removal of small details from an image prior
to object extraction, and bridging of small
gaps in lines or curves.
• Noise reduction can be accomplished by
blurring with a linear filter and also by
nonlinear filtering.
COM2304 - Computer Graphics & Image
Processing
Smoothing Linear Filters
• Average /Mean Filter
– The output is simply the average of the pixels
contained in the neighborhood of the filter mask.
– In smoothing filter, it replaces the value of every pixel
in an image by the average of the intensity levels in
the neighborhood defined by the filter mask.
– This process result in an image with reduced “sharp”
transitions in intensities.
– Most obvious application of smoothing is noise
reduction because random noise typically consists of
sharp transitions in intensity levels.
COM2304 - Computer Graphics & Image
Processing
Smoothing Linear Filters (Cont…)
COM2304 - Computer Graphics & Image
Processing
Smoothing Linear Filters (Cont…)
– Averaging filters blur edges, because edges
represent the sharp intensity transition.
– Average blurring smoothes the false contours that
result from using an insufficient number of
intensity levels.
– A major use of averaging filters is in the reduction
of “irrelevant” detail (pixel regions that are small
with respect to the size of the filter mask) in an
image.
COM2304 - Computer Graphics & Image
Processing
Smoothing Linear Filters (Cont…)
COM2304 - Computer Graphics & Image
Processing
Observe
blurring
occur during
smoothing
operation
Smoothing Linear Filters (Cont…)
– Let Sx,y represent the set of coordinates in neighbourhood
of size m×n, centered at point (x, y).
– The arithmetic mean filter computes the average value of
the corrupted image g( x, y) in the area defined by Sx,y.
– The value of the restored image f’ at point ( x, y) is simply
the arithmetic mean computed using the pixels in the
region defined by Sx,y.
COM2304 - Computer Graphics & Image
Processing


xySts
tsg
mn
yxf
),(
),(
1
),(ˆ
Smoothing Linear Filters (Cont…)
• There are different kinds of mean filters all of
which exhibit slightly different behaviour:
• Geometric Mean:
– Achieves similar smoothing to the arithmetic
mean, but tends to lose less image detail
COM2304 - Computer Graphics & Image
Processing
mn
Sts xy
tsgyxf
1
),(
),(),(ˆ








 
Smoothing Linear Filters (Cont…)
• Harmonic Mean:
– Works well for salt noise, but fails for pepper
noise.
– Also does well for other kinds of noise such as
Gaussian noise
COM2304 - Computer Graphics & Image
Processing


xySts tsg
mn
yxf
),( ),(
1
),(ˆ
Smoothing Linear Filters (Cont…)
• Contraharmonic Mean:
– Q is the order of the filter and adjusting its value
changes the filter’s behaviour.
– Positive values of Q eliminate pepper noise.
– Negative values of Q eliminate salt noise.
– If Q =0 it represents the arithmetic filter.
COM2304 - Computer Graphics & Image
Processing






xy
xy
Sts
Q
Sts
Q
tsg
tsg
yxf
),(
),(
1
),(
),(
),(ˆ
Smoothing Linear Filters (Cont…)
Original
Image
Image
Corrupted
By Gaussian
Noise
After A 3*3
Geometric
Mean Filter
After A 3*3
Arithmetic
Mean Filter
COM2304 - Computer Graphics & Image
Processing
Smoothing Linear Filters (Cont…)
Image
Corrupted
By Pepper
Noise
Result of
Filtering Above
With 3*3
Contraharmonic
Q=1.5
COM2304 - Computer Graphics & Image
Processing
Smoothing Linear Filters (Cont…)
Image
Corrupted
By Salt
Noise
Result of
Filtering Above
With 3*3
Contraharmonic
Q=-1.5
COM2304 - Computer Graphics & Image
Processing
Smoothing Linear Filters (Cont…)
Choosing the wrong value for Q when using the
contraharmonic filter can have drastic results
COM2304 - Computer Graphics & Image
Processing
Smoothing Linear Filters (Cont…)
• A spatial averaging filter in which all
coefficients are equal is called a Box
Filter.
• The basic strategy behind weighting
the center point the highest and then
reducing the value of the coefficients
as a function of increasing distance
from the origin in spatial averaging
filter is simply an attempt to reduce
blurring in the smoothing process.
COM2304 - Computer Graphics & Image
Processing
Smoothing Linear Filters (Cont…)
• Gaussian Smoothing:
– The Gaussian filter is a non-uniform low pass filter.
– The kernel coefficients diminish with increasing distance from
the kernel’s centre.
– Central pixels have a higher weighting than those on the
periphery.
– Larger values of σ produce a wider peak (greater blurring).
– Kernel size must increase with increasing σ to maintain the
Gaussian nature of the filter (`bell-shaped') .
– Gaussian kernel coefficients depend on the value of σ.
– At the edge of the mask, coefficients must be close to 0.
– The kernel is rotationally symmetric with no directional bias.
– Gaussian filters might not preserve image brightness.
COM2304 - Computer Graphics & Image
Processing
Smoothing Linear Filters (Cont…)
• The Gaussian distribution
in 1-D has the form:
• Where σ is the standard
deviation of the
distribution.
• We have also assumed
that the distribution has a
mean of zero (i.e. it is
centered on the line x=0).
COM2304 - Computer Graphics & Image
Processing
1-D Gaussian distribution with
mean 0 and σ=1
Smoothing Linear Filters (Cont…)
• In 2-D, an isotropic
(i.e. circularly symmetric)
Gaussian has the form:
COM2304 - Computer Graphics & Image
Processing
2-D Gaussian distribution with
mean (0,0) and σ=1
Discrete approximation to Gaussian
function with σ=1
The std. dev σ of the Gaussian
determines the amount of
smoothing.
Smoothing Linear Filters (Cont…)
COM2304 - Computer Graphics & Image
Processing
Smoothing Order Static (Nonlinear)
Filters
• The response of the order static or nonlinear
filters is based on ordering (ranking) the pixels
contained in the image area encompassed by the
filter, and then replacing the value of the center
pixel with the value determine by the ranking
result.
• Useful nonlinear filters include;
– Median filter
– Max and min filter
– Midpoint filter
COM2304 - Computer Graphics & Image
Processing
Smoothing Order Static (Nonlinear)
Filters (Cont…)
• Median Filter:
– It can reduce certain typed of random noise with
less blurring than the linear smoothing filters of
similar size.
– Provides excellent results when applying to reduce
salt and pepper noise.
COM2304 - Computer Graphics & Image
Processing
)},({),(ˆ
),(
tsgmedianyxf
xySts 

Smoothing Order Static (Nonlinear)
Filters (Cont…)
COM2304 - Computer Graphics & Image
Processing
Smoothing Order Static (Nonlinear)
Filters (Cont…)
COM2304 - Computer Graphics & Image
Processing
Smoothing Order Static (Nonlinear)
Filters (Cont…)
• Median filter smoothes ("washes") all edges
and boundaries and may "erase" all details
whose size is about n/2× m/2, where n × m is
a window size.
• As a result, an image becomes "fuzzy".
• Median filter is not so efficient for additive
Gaussian noise removal, it yields to linear
filters.
COM2304 - Computer Graphics & Image
Processing
Smoothing Order Static (Nonlinear)
Filters (Cont…)
• Max Filter:
• Min Filter:
–Max filter is useful for finding the brightest points in an
image and min filter for finding the darkest points in an
image.
–Max filter is good for pepper noise and min filter is good for
salt noise
COM2304 - Computer Graphics & Image
Processing
)},({max),(ˆ
),(
tsgyxf
xySts 

)},({min),(ˆ
),(
tsgyxf
xySts 

Smoothing Order Static (Nonlinear)
Filters (Cont…)
• Midpoint Filter:
– Good for random Gaussian and uniform noise
COM2304 - Computer Graphics & Image
Processing



 

)},({min)},({max
2
1
),(ˆ
),(),(
tsgtsgyxf
xyxy StsSts
Smoothing Order Static (Nonlinear)
Filters (Cont…)
• Alpha-trimmed Mean Filter:
– We can delete the d/2 lowest and d/2 highest grey
levels.
– So g(s, t) represents the remaining mn – d pixels.
– When d= 0 : arithmetic mean filter.
– Good for combination of salt and pepper and
Gaussian noise.
COM2304 - Computer Graphics & Image
Processing


xySts
tsg
dmn
yxf
),(
),(
1
),(ˆ
Smoothing Order Static (Nonlinear)
Filters (Cont…)
COM2304 - Computer Graphics & Image
Processing
Removing Periodic Noise
• Removing periodic noise form an image
involves removing a particular range of
frequencies from that image.
• Band reject filters can be used for this
purpose.
Out of the scope of this course -   
COM2304 - Computer Graphics & Image
Processing
Reference
• Chapter 03, Chapter 05 of Gonzalez, R.C.,
Woods, R.E., Digital Image Processing, 3rd ed.
Addison-Wesley Pub.
• http://setosa.io/ev/image-kernels/
• https://en.wikipedia.org/wiki/Kernel_(image_
processing)
COM2304 - Computer Graphics & Image
Processing
Learning Outcomes Revisit
• Now, you should be able to;
– describe the fundamentals of spatial filtering.
– generating spatial filter masks.
– identify smoothing via linear filters and non
linear filters.
– apply smoothing techniques for problem
solving.
COM2304 - Computer Graphics & Image
Processing
QUESTIONS ?
Next Lecture – Intensity Transformation and Spatial Filtering – III
COM2304 - Computer Graphics & Image
Processing

More Related Content

What's hot

Image Processing: Spatial filters
Image Processing: Spatial filtersImage Processing: Spatial filters
Image Processing: Spatial filters
A B Shinde
 
Image segmentation techniques
Image segmentation techniquesImage segmentation techniques
Image segmentation techniques
gmidhubala
 
Chapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woodsChapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woods
asodariyabhavesh
 
Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentation
ramya marichamy
 
Fidelity criteria in image compression
Fidelity criteria in image compressionFidelity criteria in image compression
Fidelity criteria in image compression
KadamPawan
 
Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)
asodariyabhavesh
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and Segmentation
A B Shinde
 
1.arithmetic & logical operations
1.arithmetic & logical operations1.arithmetic & logical operations
1.arithmetic & logical operations
mukesh bhardwaj
 
Frequency domain methods
Frequency domain methods Frequency domain methods
Frequency domain methods
thanhhoang2012
 
Sharpening using frequency Domain Filter
Sharpening using frequency Domain FilterSharpening using frequency Domain Filter
Sharpening using frequency Domain Filter
arulraj121
 
Morphological operations
Morphological operationsMorphological operations
Image Filtering in the Frequency Domain
Image Filtering in the Frequency DomainImage Filtering in the Frequency Domain
Image Filtering in the Frequency Domain
Amnaakhaan
 
Smoothing Filters in Spatial Domain
Smoothing Filters in Spatial DomainSmoothing Filters in Spatial Domain
Smoothing Filters in Spatial Domain
Madhu Bala
 
Digital Image Processing Fundamental
Digital Image Processing FundamentalDigital Image Processing Fundamental
Digital Image Processing Fundamental
Thuong Nguyen Canh
 
Sharpening spatial filters
Sharpening spatial filtersSharpening spatial filters
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image Fundamentals
A B Shinde
 
Edge linking in image processing
Edge linking in image processingEdge linking in image processing
Edge linking in image processing
VARUN KUMAR
 

What's hot (20)

Unit3 dip
Unit3 dipUnit3 dip
Unit3 dip
 
Image Processing: Spatial filters
Image Processing: Spatial filtersImage Processing: Spatial filters
Image Processing: Spatial filters
 
Image segmentation techniques
Image segmentation techniquesImage segmentation techniques
Image segmentation techniques
 
Chapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woodsChapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woods
 
Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentation
 
Fidelity criteria in image compression
Fidelity criteria in image compressionFidelity criteria in image compression
Fidelity criteria in image compression
 
Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and Segmentation
 
image compression ppt
image compression pptimage compression ppt
image compression ppt
 
1.arithmetic & logical operations
1.arithmetic & logical operations1.arithmetic & logical operations
1.arithmetic & logical operations
 
Frequency domain methods
Frequency domain methods Frequency domain methods
Frequency domain methods
 
Sharpening using frequency Domain Filter
Sharpening using frequency Domain FilterSharpening using frequency Domain Filter
Sharpening using frequency Domain Filter
 
Morphological operations
Morphological operationsMorphological operations
Morphological operations
 
Image Filtering in the Frequency Domain
Image Filtering in the Frequency DomainImage Filtering in the Frequency Domain
Image Filtering in the Frequency Domain
 
Smoothing Filters in Spatial Domain
Smoothing Filters in Spatial DomainSmoothing Filters in Spatial Domain
Smoothing Filters in Spatial Domain
 
Digital Image Processing Fundamental
Digital Image Processing FundamentalDigital Image Processing Fundamental
Digital Image Processing Fundamental
 
Sharpening spatial filters
Sharpening spatial filtersSharpening spatial filters
Sharpening spatial filters
 
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image Fundamentals
 
Mathematical tools in dip
Mathematical tools in dipMathematical tools in dip
Mathematical tools in dip
 
Edge linking in image processing
Edge linking in image processingEdge linking in image processing
Edge linking in image processing
 

Viewers also liked

Digital image processing
Digital image processingDigital image processing
Digital image processing
Vandana Verma
 
Spatial enhancement
Spatial enhancement Spatial enhancement
Spatial enhancement abinarkt
 
Spatial domain and filtering
Spatial domain and filteringSpatial domain and filtering
Spatial domain and filtering
University of Potsdam
 
Texture in image processing
Texture in image processing Texture in image processing
Texture in image processing
Anna Aquarian
 
Image Texture Analysis
Image Texture AnalysisImage Texture Analysis
Image Texture Analysis
lalitxp
 
Edge detection of video using matlab code
Edge detection of video using matlab codeEdge detection of video using matlab code
Edge detection of video using matlab codeBhushan Deore
 
Digital Image Processing: Image Restoration
Digital Image Processing: Image RestorationDigital Image Processing: Image Restoration
Digital Image Processing: Image Restoration
Mostafa G. M. Mostafa
 
Edge Detection algorithm and code
Edge Detection algorithm and codeEdge Detection algorithm and code
Edge Detection algorithm and code
Vaddi Manikanta
 
Digital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial DomainDigital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial Domain
Mostafa G. M. Mostafa
 
Digital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency DomainDigital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency Domain
Mostafa G. M. Mostafa
 
Introduction to wavelet transform
Introduction to wavelet transformIntroduction to wavelet transform
Introduction to wavelet transform
Raj Endiran
 
Image enhancement
Image enhancementImage enhancement
Image enhancementAyaelshiwi
 
Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domainAshish Kumar
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
DEEPASHRI HK
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniquesSaideep
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
sakshij91
 
Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)
Kalyan Acharjya
 
image_enhancement_spatial
 image_enhancement_spatial image_enhancement_spatial
image_enhancement_spatial
honeyjecrc
 

Viewers also liked (20)

Digital image processing
Digital image processingDigital image processing
Digital image processing
 
Spatial enhancement
Spatial enhancement Spatial enhancement
Spatial enhancement
 
Spatial domain and filtering
Spatial domain and filteringSpatial domain and filtering
Spatial domain and filtering
 
Texture in image processing
Texture in image processing Texture in image processing
Texture in image processing
 
Image Texture Analysis
Image Texture AnalysisImage Texture Analysis
Image Texture Analysis
 
Edge detection of video using matlab code
Edge detection of video using matlab codeEdge detection of video using matlab code
Edge detection of video using matlab code
 
Digital Image Processing: Image Restoration
Digital Image Processing: Image RestorationDigital Image Processing: Image Restoration
Digital Image Processing: Image Restoration
 
Edge Detection algorithm and code
Edge Detection algorithm and codeEdge Detection algorithm and code
Edge Detection algorithm and code
 
Digital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial DomainDigital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial Domain
 
Digital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency DomainDigital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency Domain
 
Introduction to wavelet transform
Introduction to wavelet transformIntroduction to wavelet transform
Introduction to wavelet transform
 
Edge detection
Edge detectionEdge detection
Edge detection
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domain
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
 
Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)
 
image_enhancement_spatial
 image_enhancement_spatial image_enhancement_spatial
image_enhancement_spatial
 
Spatial filtering
Spatial filteringSpatial filtering
Spatial filtering
 

Similar to COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filtering and Smoothing

COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
Hemantha Kulathilake
 
Segmentation Techniques -I
Segmentation Techniques -ISegmentation Techniques -I
Segmentation Techniques -I
Hemantha Kulathilake
 
COM2304: Morphological Image Processing
COM2304: Morphological Image ProcessingCOM2304: Morphological Image Processing
COM2304: Morphological Image Processing
Hemantha Kulathilake
 
Digital Image Fundamentals - II
Digital Image Fundamentals - IIDigital Image Fundamentals - II
Digital Image Fundamentals - II
Hemantha Kulathilake
 
Segmentation Techniques -II
Segmentation Techniques -IISegmentation Techniques -II
Segmentation Techniques -II
Hemantha Kulathilake
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
Wael Sharba
 
ACMP340.pptx
ACMP340.pptxACMP340.pptx
ACMP340.pptx
FelixGathage
 
Translation Invariance (TI) based Novel Approach for better De-noising of Dig...
Translation Invariance (TI) based Novel Approach for better De-noising of Dig...Translation Invariance (TI) based Novel Approach for better De-noising of Dig...
Translation Invariance (TI) based Novel Approach for better De-noising of Dig...
IRJET Journal
 
COM2304: Introduction to Computer Vision & Image Processing
COM2304: Introduction to Computer Vision & Image Processing COM2304: Introduction to Computer Vision & Image Processing
COM2304: Introduction to Computer Vision & Image Processing
Hemantha Kulathilake
 
Spatial Filtering in intro image processingr
Spatial Filtering in intro image processingrSpatial Filtering in intro image processingr
Spatial Filtering in intro image processingr
kumarankit06875
 
When Discrete Optimization Meets Multimedia Security (and Beyond)
When Discrete Optimization Meets Multimedia Security (and Beyond)When Discrete Optimization Meets Multimedia Security (and Beyond)
When Discrete Optimization Meets Multimedia Security (and Beyond)
Shujun Li
 
COM2304: Digital Image Fundamentals - I
COM2304: Digital Image Fundamentals - I COM2304: Digital Image Fundamentals - I
COM2304: Digital Image Fundamentals - I
Hemantha Kulathilake
 
Image processing
Image processingImage processing
Image processing
kamal330
 
IRJET - Computer-Assisted ALL, AML, CLL, CML Detection and Counting for D...
IRJET -  	  Computer-Assisted ALL, AML, CLL, CML Detection and Counting for D...IRJET -  	  Computer-Assisted ALL, AML, CLL, CML Detection and Counting for D...
IRJET - Computer-Assisted ALL, AML, CLL, CML Detection and Counting for D...
IRJET Journal
 
COMPUTER GRAPHICS
COMPUTER GRAPHICSCOMPUTER GRAPHICS
COMPUTER GRAPHICS
Jagan Raja
 
DIP Notes Unit-1 PPT , engineering, computer Science
DIP Notes Unit-1 PPT , engineering, computer ScienceDIP Notes Unit-1 PPT , engineering, computer Science
DIP Notes Unit-1 PPT , engineering, computer Science
baaburao4200
 
IRJET - Change Detection in Satellite Images using Convolutional Neural N...
IRJET -  	  Change Detection in Satellite Images using Convolutional Neural N...IRJET -  	  Change Detection in Satellite Images using Convolutional Neural N...
IRJET - Change Detection in Satellite Images using Convolutional Neural N...
IRJET Journal
 
2. filtering basics
2. filtering basics2. filtering basics
2. filtering basics
Atul Kumar Jha
 
DIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdfDIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdf
Gaurav Sharma
 

Similar to COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filtering and Smoothing (20)

COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
COM2304: Intensity Transformation and Spatial Filtering – III Spatial Filters...
 
Segmentation Techniques -I
Segmentation Techniques -ISegmentation Techniques -I
Segmentation Techniques -I
 
COM2304: Morphological Image Processing
COM2304: Morphological Image ProcessingCOM2304: Morphological Image Processing
COM2304: Morphological Image Processing
 
Digital Image Fundamentals - II
Digital Image Fundamentals - IIDigital Image Fundamentals - II
Digital Image Fundamentals - II
 
Segmentation Techniques -II
Segmentation Techniques -IISegmentation Techniques -II
Segmentation Techniques -II
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
ACMP340.pptx
ACMP340.pptxACMP340.pptx
ACMP340.pptx
 
Translation Invariance (TI) based Novel Approach for better De-noising of Dig...
Translation Invariance (TI) based Novel Approach for better De-noising of Dig...Translation Invariance (TI) based Novel Approach for better De-noising of Dig...
Translation Invariance (TI) based Novel Approach for better De-noising of Dig...
 
COM2304: Introduction to Computer Vision & Image Processing
COM2304: Introduction to Computer Vision & Image Processing COM2304: Introduction to Computer Vision & Image Processing
COM2304: Introduction to Computer Vision & Image Processing
 
Spatial Filtering in intro image processingr
Spatial Filtering in intro image processingrSpatial Filtering in intro image processingr
Spatial Filtering in intro image processingr
 
When Discrete Optimization Meets Multimedia Security (and Beyond)
When Discrete Optimization Meets Multimedia Security (and Beyond)When Discrete Optimization Meets Multimedia Security (and Beyond)
When Discrete Optimization Meets Multimedia Security (and Beyond)
 
COM2304: Digital Image Fundamentals - I
COM2304: Digital Image Fundamentals - I COM2304: Digital Image Fundamentals - I
COM2304: Digital Image Fundamentals - I
 
Image processing
Image processingImage processing
Image processing
 
IRJET - Computer-Assisted ALL, AML, CLL, CML Detection and Counting for D...
IRJET -  	  Computer-Assisted ALL, AML, CLL, CML Detection and Counting for D...IRJET -  	  Computer-Assisted ALL, AML, CLL, CML Detection and Counting for D...
IRJET - Computer-Assisted ALL, AML, CLL, CML Detection and Counting for D...
 
COMPUTER GRAPHICS
COMPUTER GRAPHICSCOMPUTER GRAPHICS
COMPUTER GRAPHICS
 
DIP Notes Unit-1 PPT , engineering, computer Science
DIP Notes Unit-1 PPT , engineering, computer ScienceDIP Notes Unit-1 PPT , engineering, computer Science
DIP Notes Unit-1 PPT , engineering, computer Science
 
Presentation
PresentationPresentation
Presentation
 
IRJET - Change Detection in Satellite Images using Convolutional Neural N...
IRJET -  	  Change Detection in Satellite Images using Convolutional Neural N...IRJET -  	  Change Detection in Satellite Images using Convolutional Neural N...
IRJET - Change Detection in Satellite Images using Convolutional Neural N...
 
2. filtering basics
2. filtering basics2. filtering basics
2. filtering basics
 
DIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdfDIP Notes Unit-1 PPT.pdf
DIP Notes Unit-1 PPT.pdf
 

More from Hemantha Kulathilake

NLP_KASHK:Parsing with Context-Free Grammar
NLP_KASHK:Parsing with Context-Free Grammar NLP_KASHK:Parsing with Context-Free Grammar
NLP_KASHK:Parsing with Context-Free Grammar
Hemantha Kulathilake
 
NLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for EnglishNLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for English
Hemantha Kulathilake
 
NLP_KASHK:POS Tagging
NLP_KASHK:POS TaggingNLP_KASHK:POS Tagging
NLP_KASHK:POS Tagging
Hemantha Kulathilake
 
NLP_KASHK:Markov Models
NLP_KASHK:Markov ModelsNLP_KASHK:Markov Models
NLP_KASHK:Markov Models
Hemantha Kulathilake
 
NLP_KASHK:Smoothing N-gram Models
NLP_KASHK:Smoothing N-gram ModelsNLP_KASHK:Smoothing N-gram Models
NLP_KASHK:Smoothing N-gram Models
Hemantha Kulathilake
 
NLP_KASHK:Evaluating Language Model
NLP_KASHK:Evaluating Language ModelNLP_KASHK:Evaluating Language Model
NLP_KASHK:Evaluating Language Model
Hemantha Kulathilake
 
NLP_KASHK:N-Grams
NLP_KASHK:N-GramsNLP_KASHK:N-Grams
NLP_KASHK:N-Grams
Hemantha Kulathilake
 
NLP_KASHK:Minimum Edit Distance
NLP_KASHK:Minimum Edit DistanceNLP_KASHK:Minimum Edit Distance
NLP_KASHK:Minimum Edit Distance
Hemantha Kulathilake
 
NLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological ParsingNLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological Parsing
Hemantha Kulathilake
 
NLP_KASHK:Morphology
NLP_KASHK:MorphologyNLP_KASHK:Morphology
NLP_KASHK:Morphology
Hemantha Kulathilake
 
NLP_KASHK:Text Normalization
NLP_KASHK:Text NormalizationNLP_KASHK:Text Normalization
NLP_KASHK:Text Normalization
Hemantha Kulathilake
 
NLP_KASHK:Finite-State Automata
NLP_KASHK:Finite-State AutomataNLP_KASHK:Finite-State Automata
NLP_KASHK:Finite-State Automata
Hemantha Kulathilake
 
NLP_KASHK:Regular Expressions
NLP_KASHK:Regular Expressions NLP_KASHK:Regular Expressions
NLP_KASHK:Regular Expressions
Hemantha Kulathilake
 
NLP_KASHK: Introduction
NLP_KASHK: Introduction NLP_KASHK: Introduction
NLP_KASHK: Introduction
Hemantha Kulathilake
 
COM1407: File Processing
COM1407: File Processing COM1407: File Processing
COM1407: File Processing
Hemantha Kulathilake
 
COm1407: Character & Strings
COm1407: Character & StringsCOm1407: Character & Strings
COm1407: Character & Strings
Hemantha Kulathilake
 
COM1407: Structures, Unions & Dynamic Memory Allocation
COM1407: Structures, Unions & Dynamic Memory Allocation COM1407: Structures, Unions & Dynamic Memory Allocation
COM1407: Structures, Unions & Dynamic Memory Allocation
Hemantha Kulathilake
 
COM1407: Input/ Output Functions
COM1407: Input/ Output FunctionsCOM1407: Input/ Output Functions
COM1407: Input/ Output Functions
Hemantha Kulathilake
 
COM1407: Working with Pointers
COM1407: Working with PointersCOM1407: Working with Pointers
COM1407: Working with Pointers
Hemantha Kulathilake
 
COM1407: Arrays
COM1407: ArraysCOM1407: Arrays
COM1407: Arrays
Hemantha Kulathilake
 

More from Hemantha Kulathilake (20)

NLP_KASHK:Parsing with Context-Free Grammar
NLP_KASHK:Parsing with Context-Free Grammar NLP_KASHK:Parsing with Context-Free Grammar
NLP_KASHK:Parsing with Context-Free Grammar
 
NLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for EnglishNLP_KASHK:Context-Free Grammar for English
NLP_KASHK:Context-Free Grammar for English
 
NLP_KASHK:POS Tagging
NLP_KASHK:POS TaggingNLP_KASHK:POS Tagging
NLP_KASHK:POS Tagging
 
NLP_KASHK:Markov Models
NLP_KASHK:Markov ModelsNLP_KASHK:Markov Models
NLP_KASHK:Markov Models
 
NLP_KASHK:Smoothing N-gram Models
NLP_KASHK:Smoothing N-gram ModelsNLP_KASHK:Smoothing N-gram Models
NLP_KASHK:Smoothing N-gram Models
 
NLP_KASHK:Evaluating Language Model
NLP_KASHK:Evaluating Language ModelNLP_KASHK:Evaluating Language Model
NLP_KASHK:Evaluating Language Model
 
NLP_KASHK:N-Grams
NLP_KASHK:N-GramsNLP_KASHK:N-Grams
NLP_KASHK:N-Grams
 
NLP_KASHK:Minimum Edit Distance
NLP_KASHK:Minimum Edit DistanceNLP_KASHK:Minimum Edit Distance
NLP_KASHK:Minimum Edit Distance
 
NLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological ParsingNLP_KASHK:Finite-State Morphological Parsing
NLP_KASHK:Finite-State Morphological Parsing
 
NLP_KASHK:Morphology
NLP_KASHK:MorphologyNLP_KASHK:Morphology
NLP_KASHK:Morphology
 
NLP_KASHK:Text Normalization
NLP_KASHK:Text NormalizationNLP_KASHK:Text Normalization
NLP_KASHK:Text Normalization
 
NLP_KASHK:Finite-State Automata
NLP_KASHK:Finite-State AutomataNLP_KASHK:Finite-State Automata
NLP_KASHK:Finite-State Automata
 
NLP_KASHK:Regular Expressions
NLP_KASHK:Regular Expressions NLP_KASHK:Regular Expressions
NLP_KASHK:Regular Expressions
 
NLP_KASHK: Introduction
NLP_KASHK: Introduction NLP_KASHK: Introduction
NLP_KASHK: Introduction
 
COM1407: File Processing
COM1407: File Processing COM1407: File Processing
COM1407: File Processing
 
COm1407: Character & Strings
COm1407: Character & StringsCOm1407: Character & Strings
COm1407: Character & Strings
 
COM1407: Structures, Unions & Dynamic Memory Allocation
COM1407: Structures, Unions & Dynamic Memory Allocation COM1407: Structures, Unions & Dynamic Memory Allocation
COM1407: Structures, Unions & Dynamic Memory Allocation
 
COM1407: Input/ Output Functions
COM1407: Input/ Output FunctionsCOM1407: Input/ Output Functions
COM1407: Input/ Output Functions
 
COM1407: Working with Pointers
COM1407: Working with PointersCOM1407: Working with Pointers
COM1407: Working with Pointers
 
COM1407: Arrays
COM1407: ArraysCOM1407: Arrays
COM1407: Arrays
 

Recently uploaded

Unveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdfUnveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdf
Erdal Coalmaker
 
Leaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdfLeaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdf
RenuJangid3
 
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATIONPRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
ChetanK57
 
role of pramana in research.pptx in science
role of pramana in research.pptx in sciencerole of pramana in research.pptx in science
role of pramana in research.pptx in science
sonaliswain16
 
DMARDs Pharmacolgy Pharm D 5th Semester.pdf
DMARDs Pharmacolgy Pharm D 5th Semester.pdfDMARDs Pharmacolgy Pharm D 5th Semester.pdf
DMARDs Pharmacolgy Pharm D 5th Semester.pdf
fafyfskhan251kmf
 
S.1 chemistry scheme term 2 for ordinary level
S.1 chemistry scheme term 2 for ordinary levelS.1 chemistry scheme term 2 for ordinary level
S.1 chemistry scheme term 2 for ordinary level
ronaldlakony0
 
in vitro propagation of plants lecture note.pptx
in vitro propagation of plants lecture note.pptxin vitro propagation of plants lecture note.pptx
in vitro propagation of plants lecture note.pptx
yusufzako14
 
Hemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptxHemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptx
muralinath2
 
Mammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also FunctionsMammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also Functions
YOGESH DOGRA
 
Observation of Io’s Resurfacing via Plume Deposition Using Ground-based Adapt...
Observation of Io’s Resurfacing via Plume Deposition Using Ground-based Adapt...Observation of Io’s Resurfacing via Plume Deposition Using Ground-based Adapt...
Observation of Io’s Resurfacing via Plume Deposition Using Ground-based Adapt...
Sérgio Sacani
 
bordetella pertussis.................................ppt
bordetella pertussis.................................pptbordetella pertussis.................................ppt
bordetella pertussis.................................ppt
kejapriya1
 
DERIVATION OF MODIFIED BERNOULLI EQUATION WITH VISCOUS EFFECTS AND TERMINAL V...
DERIVATION OF MODIFIED BERNOULLI EQUATION WITH VISCOUS EFFECTS AND TERMINAL V...DERIVATION OF MODIFIED BERNOULLI EQUATION WITH VISCOUS EFFECTS AND TERMINAL V...
DERIVATION OF MODIFIED BERNOULLI EQUATION WITH VISCOUS EFFECTS AND TERMINAL V...
Wasswaderrick3
 
Comparative structure of adrenal gland in vertebrates
Comparative structure of adrenal gland in vertebratesComparative structure of adrenal gland in vertebrates
Comparative structure of adrenal gland in vertebrates
sachin783648
 
extra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdfextra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdf
DiyaBiswas10
 
NuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final versionNuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final version
pablovgd
 
Seminar of U.V. Spectroscopy by SAMIR PANDA
 Seminar of U.V. Spectroscopy by SAMIR PANDA Seminar of U.V. Spectroscopy by SAMIR PANDA
Seminar of U.V. Spectroscopy by SAMIR PANDA
SAMIR PANDA
 
In silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptxIn silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptx
AlaminAfendy1
 
Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.
Nistarini College, Purulia (W.B) India
 
Chapter 12 - climate change and the energy crisis
Chapter 12 - climate change and the energy crisisChapter 12 - climate change and the energy crisis
Chapter 12 - climate change and the energy crisis
tonzsalvador2222
 
GBSN - Microbiology (Lab 4) Culture Media
GBSN - Microbiology (Lab 4) Culture MediaGBSN - Microbiology (Lab 4) Culture Media
GBSN - Microbiology (Lab 4) Culture Media
Areesha Ahmad
 

Recently uploaded (20)

Unveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdfUnveiling the Energy Potential of Marshmallow Deposits.pdf
Unveiling the Energy Potential of Marshmallow Deposits.pdf
 
Leaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdfLeaf Initiation, Growth and Differentiation.pdf
Leaf Initiation, Growth and Differentiation.pdf
 
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATIONPRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
 
role of pramana in research.pptx in science
role of pramana in research.pptx in sciencerole of pramana in research.pptx in science
role of pramana in research.pptx in science
 
DMARDs Pharmacolgy Pharm D 5th Semester.pdf
DMARDs Pharmacolgy Pharm D 5th Semester.pdfDMARDs Pharmacolgy Pharm D 5th Semester.pdf
DMARDs Pharmacolgy Pharm D 5th Semester.pdf
 
S.1 chemistry scheme term 2 for ordinary level
S.1 chemistry scheme term 2 for ordinary levelS.1 chemistry scheme term 2 for ordinary level
S.1 chemistry scheme term 2 for ordinary level
 
in vitro propagation of plants lecture note.pptx
in vitro propagation of plants lecture note.pptxin vitro propagation of plants lecture note.pptx
in vitro propagation of plants lecture note.pptx
 
Hemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptxHemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptx
 
Mammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also FunctionsMammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also Functions
 
Observation of Io’s Resurfacing via Plume Deposition Using Ground-based Adapt...
Observation of Io’s Resurfacing via Plume Deposition Using Ground-based Adapt...Observation of Io’s Resurfacing via Plume Deposition Using Ground-based Adapt...
Observation of Io’s Resurfacing via Plume Deposition Using Ground-based Adapt...
 
bordetella pertussis.................................ppt
bordetella pertussis.................................pptbordetella pertussis.................................ppt
bordetella pertussis.................................ppt
 
DERIVATION OF MODIFIED BERNOULLI EQUATION WITH VISCOUS EFFECTS AND TERMINAL V...
DERIVATION OF MODIFIED BERNOULLI EQUATION WITH VISCOUS EFFECTS AND TERMINAL V...DERIVATION OF MODIFIED BERNOULLI EQUATION WITH VISCOUS EFFECTS AND TERMINAL V...
DERIVATION OF MODIFIED BERNOULLI EQUATION WITH VISCOUS EFFECTS AND TERMINAL V...
 
Comparative structure of adrenal gland in vertebrates
Comparative structure of adrenal gland in vertebratesComparative structure of adrenal gland in vertebrates
Comparative structure of adrenal gland in vertebrates
 
extra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdfextra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdf
 
NuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final versionNuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final version
 
Seminar of U.V. Spectroscopy by SAMIR PANDA
 Seminar of U.V. Spectroscopy by SAMIR PANDA Seminar of U.V. Spectroscopy by SAMIR PANDA
Seminar of U.V. Spectroscopy by SAMIR PANDA
 
In silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptxIn silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptx
 
Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.
 
Chapter 12 - climate change and the energy crisis
Chapter 12 - climate change and the energy crisisChapter 12 - climate change and the energy crisis
Chapter 12 - climate change and the energy crisis
 
GBSN - Microbiology (Lab 4) Culture Media
GBSN - Microbiology (Lab 4) Culture MediaGBSN - Microbiology (Lab 4) Culture Media
GBSN - Microbiology (Lab 4) Culture Media
 

COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filtering and Smoothing

  • 1. COMPUTER GRAPHICS & IMAGE PROCESSING COM2304 Intensity Transformation and Spatial Filtering – II Spatial Filtering and Smoothing K.A.S.H.Kulathilake B.Sc. (Hons) IT (SLIIT), MCS (UCSC), M.Phil (UOM), SEDA(UK) Rajarata University of Sri Lanka Faculty of Applied Sciences Department of Physical Sciences
  • 2. Learning Outcomes COM2304 - Computer Graphics & Image Processing • At the end of this lecture, you should be able to; – describe the fundamentals of spatial filtering. – generating spatial filter masks. – identify smoothing via linear filters and non linear filters. – apply smoothing techniques for problem solving.
  • 3. Filters in Image Processing • Filter can accept or reject certain frequency components. • In image processing filters are mainly used to suppress either the high frequencies in the image, i.e. smoothing the image, or the low frequencies, i.e. enhancing/ sharpening or detecting edges in the image. • An image can be filtered either in the frequency or in the spatial domain. COM2304 - Computer Graphics & Image Processing
  • 4. Fundamentals of Frequency Domain Filtering • Frequency domain filtering involves ; – transforming the image into the frequency domain, – multiplying it with the frequency filter function and – re-transforming the result into the spatial domain. • The filter function is shaped so as to attenuate some frequencies and enhance others. • For example, a simple lowpass function is 1 for frequencies smaller than the cut-off frequency and 0 for all others. COM2304 - Computer Graphics & Image Processing
  • 5. Fundamentals of Spatial Filtering • Spatial filter contains two components; – MASK/ CONVOLUTION MATRIX/ KERNEL: A neighborhood (typically small rectangle:) – FILTER FUNCTION: A predefined operation that is performed on the image pixels encompassed by the neighborhood. • Spatial filtering is the method of choice in situations when only additive random noise is present. • Filtering creates a new pixel value with coordinates equal to the coordinates of the center of the neighborhood, and whose value is the result of the filtering operation. COM2304 - Computer Graphics & Image Processing
  • 6. Fundamentals of Spatial Filtering (Cont….) COM2304 - Computer Graphics & Image Processing
  • 7. Fundamentals of Spatial Filtering (Cont….) COM2304 - Computer Graphics & Image Processing If the operation performed on the image pixels is linear, then the filter is called a linear spatial filter, otherwise, the filter is non-linear.
  • 8. Fundamentals of Spatial Filtering (Cont….) • Spatial filtering of an image of size M×N with a filter of size m×n is given by the expression; • Where w is the mask and f is the image function, x and y are varied so that each pixel in w visits every pixel in f. • m = 2a+1 and n = 2b+1, where a and b are positive integers. • This concept is known as correlation. COM2304 - Computer Graphics & Image Processing
  • 9. Fundamentals of Spatial Filtering (Cont….) • There are two closely related concepts that must be understood clearly when performing linear spatial filtering – Correlation • Correlation is the process of moving a filter mask over the image and computing the sum of products at each location exactly as explained previously. – Convolution • The mechanics of convolution are the same as correlation except that the filter is first rotated by 180 degrees. COM2304 - Computer Graphics & Image Processing
  • 10. Fundamentals of Spatial Filtering (Cont….) COM2304 - Computer Graphics & Image Processing If the filter mask is symmetric, correlation and convolution yield the same result
  • 11. Mask/Kernel/ Convolution Matrix • In image processing, a kernel, convolution matrix, or mask is a small matrix. • It is useful for blurring, sharpening, embossing, edge detection, and more. • This is accomplished by means of convolution between a kernel and an image. COM2304 - Computer Graphics & Image Processing
  • 12. Mask/Kernel/ Convolution Matrix (Cont…) • Important Features of Kernel – Size: 3×3, 5×5, 9×9, 21×21 – Shape: rectangle, cross, strip, circular, diamond or user defined. – Coefficients / Values: set based on the operation. – Anchor point: mostly in middle COM2304 - Computer Graphics & Image Processing 0 -1 0 -1 5 -1 0 -1 0 3×3 Kernel Anchor Values for sharpening operation
  • 13. Mask/Kernel/ Convolution Matrix (Cont…) COM2304 - Computer Graphics & Image Processing 0 -1 0 -1 5 -1 0 -1 0 Kernel
  • 14. Mask/Kernel/ Convolution Matrix (Cont…) COM2304 - Computer Graphics & Image Processing http://setosa.io/ev/image-kernels/ https://en.wikipedia.org/wiki/Kernel_(image_processing)
  • 15. Convolution • Convolution is a simple mathematical operation which is fundamental to many common image processing operators. • This can be used in image processing to implement operators whose output pixel values are simple linear combinations of certain input pixel values. COM2304 - Computer Graphics & Image Processing
  • 16. Convolution (Cont…) COM2304 - Computer Graphics & Image Processing Each kernel position corresponds to a single output pixel, the value of which is calculated by multiplying together the kernel value and the underlying image pixel value for each of the cells in the kernel, and then adding all these numbers together. The convolution is performed by sliding the kernel over the image, generally starting at the top left corner.
  • 17. Convolution (Cont…) COM2304 - Computer Graphics & Image Processing
  • 18. Generating Spatial Filter Masks • Generating an m×n linear spatial filter requires that we specify mn mask coefficients. • These coefficients are selected based on what the filter is supposed to do. • There are different types of filters available, some of them are; – Linear filters - In signal processing, a linear filter is a filter whose output is a linear function of its input. – Continuous function based filters – e.g. Gaussian smoothing (it’s a kind of linear filter). – Non linear filters - In signal processing, a non-linear filter is a filter whose output is not a linear function of its input. COM2304 - Computer Graphics & Image Processing
  • 19. Generating Spatial Filter Masks (cont…) • Linear filters – Implement sum of products – ex: filters used for smoothing • Continuous function based filters – ex: Gaussian function of two variables as shown in the following equation; – Where σ is the standard deviation and coordinates x and y are the positive integers. – Recall that 2D Gaussian function has bell shape and the σ control the tightness of the bell. COM2304 - Computer Graphics & Image Processing
  • 20. Generating Spatial Filter Masks (cont…) • Non linear/ Order static filters – Non linear filters require to specify the size of the filter and the operation(s) to be performed on the image pixel contained in the filter. • ex: filter 5×5 filter centered at an arbitrary point and perform max operation. – Non linear filters are quiet powerful in some applications, than the linear filters. COM2304 - Computer Graphics & Image Processing
  • 21. Smoothing Spatial Filters • Smoothing filters are used for blurring and noise reduction. • Blurring is used in preprocessing tasks, such as removal of small details from an image prior to object extraction, and bridging of small gaps in lines or curves. • Noise reduction can be accomplished by blurring with a linear filter and also by nonlinear filtering. COM2304 - Computer Graphics & Image Processing
  • 22. Smoothing Linear Filters • Average /Mean Filter – The output is simply the average of the pixels contained in the neighborhood of the filter mask. – In smoothing filter, it replaces the value of every pixel in an image by the average of the intensity levels in the neighborhood defined by the filter mask. – This process result in an image with reduced “sharp” transitions in intensities. – Most obvious application of smoothing is noise reduction because random noise typically consists of sharp transitions in intensity levels. COM2304 - Computer Graphics & Image Processing
  • 23. Smoothing Linear Filters (Cont…) COM2304 - Computer Graphics & Image Processing
  • 24. Smoothing Linear Filters (Cont…) – Averaging filters blur edges, because edges represent the sharp intensity transition. – Average blurring smoothes the false contours that result from using an insufficient number of intensity levels. – A major use of averaging filters is in the reduction of “irrelevant” detail (pixel regions that are small with respect to the size of the filter mask) in an image. COM2304 - Computer Graphics & Image Processing
  • 25. Smoothing Linear Filters (Cont…) COM2304 - Computer Graphics & Image Processing Observe blurring occur during smoothing operation
  • 26. Smoothing Linear Filters (Cont…) – Let Sx,y represent the set of coordinates in neighbourhood of size m×n, centered at point (x, y). – The arithmetic mean filter computes the average value of the corrupted image g( x, y) in the area defined by Sx,y. – The value of the restored image f’ at point ( x, y) is simply the arithmetic mean computed using the pixels in the region defined by Sx,y. COM2304 - Computer Graphics & Image Processing   xySts tsg mn yxf ),( ),( 1 ),(ˆ
  • 27. Smoothing Linear Filters (Cont…) • There are different kinds of mean filters all of which exhibit slightly different behaviour: • Geometric Mean: – Achieves similar smoothing to the arithmetic mean, but tends to lose less image detail COM2304 - Computer Graphics & Image Processing mn Sts xy tsgyxf 1 ),( ),(),(ˆ          
  • 28. Smoothing Linear Filters (Cont…) • Harmonic Mean: – Works well for salt noise, but fails for pepper noise. – Also does well for other kinds of noise such as Gaussian noise COM2304 - Computer Graphics & Image Processing   xySts tsg mn yxf ),( ),( 1 ),(ˆ
  • 29. Smoothing Linear Filters (Cont…) • Contraharmonic Mean: – Q is the order of the filter and adjusting its value changes the filter’s behaviour. – Positive values of Q eliminate pepper noise. – Negative values of Q eliminate salt noise. – If Q =0 it represents the arithmetic filter. COM2304 - Computer Graphics & Image Processing       xy xy Sts Q Sts Q tsg tsg yxf ),( ),( 1 ),( ),( ),(ˆ
  • 30. Smoothing Linear Filters (Cont…) Original Image Image Corrupted By Gaussian Noise After A 3*3 Geometric Mean Filter After A 3*3 Arithmetic Mean Filter COM2304 - Computer Graphics & Image Processing
  • 31. Smoothing Linear Filters (Cont…) Image Corrupted By Pepper Noise Result of Filtering Above With 3*3 Contraharmonic Q=1.5 COM2304 - Computer Graphics & Image Processing
  • 32. Smoothing Linear Filters (Cont…) Image Corrupted By Salt Noise Result of Filtering Above With 3*3 Contraharmonic Q=-1.5 COM2304 - Computer Graphics & Image Processing
  • 33. Smoothing Linear Filters (Cont…) Choosing the wrong value for Q when using the contraharmonic filter can have drastic results COM2304 - Computer Graphics & Image Processing
  • 34. Smoothing Linear Filters (Cont…) • A spatial averaging filter in which all coefficients are equal is called a Box Filter. • The basic strategy behind weighting the center point the highest and then reducing the value of the coefficients as a function of increasing distance from the origin in spatial averaging filter is simply an attempt to reduce blurring in the smoothing process. COM2304 - Computer Graphics & Image Processing
  • 35. Smoothing Linear Filters (Cont…) • Gaussian Smoothing: – The Gaussian filter is a non-uniform low pass filter. – The kernel coefficients diminish with increasing distance from the kernel’s centre. – Central pixels have a higher weighting than those on the periphery. – Larger values of σ produce a wider peak (greater blurring). – Kernel size must increase with increasing σ to maintain the Gaussian nature of the filter (`bell-shaped') . – Gaussian kernel coefficients depend on the value of σ. – At the edge of the mask, coefficients must be close to 0. – The kernel is rotationally symmetric with no directional bias. – Gaussian filters might not preserve image brightness. COM2304 - Computer Graphics & Image Processing
  • 36. Smoothing Linear Filters (Cont…) • The Gaussian distribution in 1-D has the form: • Where σ is the standard deviation of the distribution. • We have also assumed that the distribution has a mean of zero (i.e. it is centered on the line x=0). COM2304 - Computer Graphics & Image Processing 1-D Gaussian distribution with mean 0 and σ=1
  • 37. Smoothing Linear Filters (Cont…) • In 2-D, an isotropic (i.e. circularly symmetric) Gaussian has the form: COM2304 - Computer Graphics & Image Processing 2-D Gaussian distribution with mean (0,0) and σ=1 Discrete approximation to Gaussian function with σ=1 The std. dev σ of the Gaussian determines the amount of smoothing.
  • 38. Smoothing Linear Filters (Cont…) COM2304 - Computer Graphics & Image Processing
  • 39. Smoothing Order Static (Nonlinear) Filters • The response of the order static or nonlinear filters is based on ordering (ranking) the pixels contained in the image area encompassed by the filter, and then replacing the value of the center pixel with the value determine by the ranking result. • Useful nonlinear filters include; – Median filter – Max and min filter – Midpoint filter COM2304 - Computer Graphics & Image Processing
  • 40. Smoothing Order Static (Nonlinear) Filters (Cont…) • Median Filter: – It can reduce certain typed of random noise with less blurring than the linear smoothing filters of similar size. – Provides excellent results when applying to reduce salt and pepper noise. COM2304 - Computer Graphics & Image Processing )},({),(ˆ ),( tsgmedianyxf xySts  
  • 41. Smoothing Order Static (Nonlinear) Filters (Cont…) COM2304 - Computer Graphics & Image Processing
  • 42. Smoothing Order Static (Nonlinear) Filters (Cont…) COM2304 - Computer Graphics & Image Processing
  • 43. Smoothing Order Static (Nonlinear) Filters (Cont…) • Median filter smoothes ("washes") all edges and boundaries and may "erase" all details whose size is about n/2× m/2, where n × m is a window size. • As a result, an image becomes "fuzzy". • Median filter is not so efficient for additive Gaussian noise removal, it yields to linear filters. COM2304 - Computer Graphics & Image Processing
  • 44. Smoothing Order Static (Nonlinear) Filters (Cont…) • Max Filter: • Min Filter: –Max filter is useful for finding the brightest points in an image and min filter for finding the darkest points in an image. –Max filter is good for pepper noise and min filter is good for salt noise COM2304 - Computer Graphics & Image Processing )},({max),(ˆ ),( tsgyxf xySts   )},({min),(ˆ ),( tsgyxf xySts  
  • 45. Smoothing Order Static (Nonlinear) Filters (Cont…) • Midpoint Filter: – Good for random Gaussian and uniform noise COM2304 - Computer Graphics & Image Processing       )},({min)},({max 2 1 ),(ˆ ),(),( tsgtsgyxf xyxy StsSts
  • 46. Smoothing Order Static (Nonlinear) Filters (Cont…) • Alpha-trimmed Mean Filter: – We can delete the d/2 lowest and d/2 highest grey levels. – So g(s, t) represents the remaining mn – d pixels. – When d= 0 : arithmetic mean filter. – Good for combination of salt and pepper and Gaussian noise. COM2304 - Computer Graphics & Image Processing   xySts tsg dmn yxf ),( ),( 1 ),(ˆ
  • 47. Smoothing Order Static (Nonlinear) Filters (Cont…) COM2304 - Computer Graphics & Image Processing
  • 48. Removing Periodic Noise • Removing periodic noise form an image involves removing a particular range of frequencies from that image. • Band reject filters can be used for this purpose. Out of the scope of this course -    COM2304 - Computer Graphics & Image Processing
  • 49. Reference • Chapter 03, Chapter 05 of Gonzalez, R.C., Woods, R.E., Digital Image Processing, 3rd ed. Addison-Wesley Pub. • http://setosa.io/ev/image-kernels/ • https://en.wikipedia.org/wiki/Kernel_(image_ processing) COM2304 - Computer Graphics & Image Processing
  • 50. Learning Outcomes Revisit • Now, you should be able to; – describe the fundamentals of spatial filtering. – generating spatial filter masks. – identify smoothing via linear filters and non linear filters. – apply smoothing techniques for problem solving. COM2304 - Computer Graphics & Image Processing
  • 51. QUESTIONS ? Next Lecture – Intensity Transformation and Spatial Filtering – III COM2304 - Computer Graphics & Image Processing