Download presentation
Presentation is loading. Please wait.
Published byCharleen Nichols Modified over 6 years ago
1
IMAGE PROCESSING INTENSITY TRANSFORMATION AND SPATIAL FILTERING
Editor by DR. FERDA ERNAWAN Faculty of Computer Systems & Software Engineering
2
Today’s Lesson Image Enhancement in the Spatial Domain
Introduction to Spatial domain Intensity transformations Photographic Negative, Gamma transformation, Logarithmic Transformation, Contrast-stretching transformation Histogram transformation Spatial filtering Smoothing, Sharpening Learning Outcomes: To understand the basic operation of image enhancement in Spatial Domain.
3
Introduction to Spatial
Spatial domain is a signal having space as the independent variable (Jayaraman, Veerakumar, Esakkirajan, 2017 ), image is an example of a signal that can be processed in the spatial domain. There are two principal categories for processing in spatial domain: Spatial filtering : sharpening and blurring. Intensity transformation : contras manipulation and thresholding.
4
General Framework in Spatial Domain
The most basic transformation is h(x, y) = T(f(x, y)) where f(x, y) denotes input image, h(x, y) represents the output and T(f) is a function of a single (real) variable.
5
Conventions: Digital Images
Left: Digital image where the point of (x,y) is reffered. Below: Examples of gray-value transformations to enhance the image by controlling the contrast stretching function (i) and thresholding function (ii).
6
Intensity Transformations
7
Basic Gray Level (Intensity) Transformations Function
The simplest image processing technique. s = T( r ) transformation pixel r into s. Gray level is used to enhance an image : Negative Gamma Transformation Logarithmic Transformation Contrast-stretching / Piecewise linear Bit slicing
8
Negative Transformation
Gray-level transformation function used for image enhancement
9
Negative Transformation Example
This technique is suitable when the image has dominant black areas. S = L – 1 – r reversing the intensity (grey) level. Images taken from Gonzalez and Woods, 2016
10
Negative Transformation Example
Images taken from Gonzalez and Woods, 2016
11
Logarithmic Transformation Example
Enhance details in the darker regions of an image by expensing detail in brighter regions. Images taken from Gonzalez and Woods, 2016
12
Gamma Transformation Gamma transformation is an important technique for image display on a computer monitor. Images taken from Gonzalez and Woods, 2016
13
Piecewise-Linear Transformation Example
Contrast Stretching: Stretch gray-level ranges where we desire more information Images taken from Gonzalez and Woods, 2016
14
Piecewise-Linear Example 2
Images taken from Gonzalez and Woods, 2016
15
Intensity Level Slicing
Highlight specific ranges of gray-levels only. Images taken from Gonzalez and Woods, 2016
16
Histogram Transformation
17
Histogram Processing A fully automated gray-level stretching technique one of the image enhancement technique. What is Histogram? Images taken from Gonzalez and Woods, 2016
18
Image Histograms “Level of gray is represented by a unique number”
An image histogram is a plot of the gray-level frequencies. “Level of gray is represented by a unique number”
19
Image Histograms (cont..)
Divide frequencies by total number of pixels to represent as probabilities. 6 18 2 10
20
Properties of Image Histograms
Histograms with small spread correspond to low contrast images (i.e., mostly dark, mostly bright, or mostly gray). Histograms with wide spread correspond to high contrast images better image. Images taken from Gonzalez and Woods, 2016
21
Properties of Image Histograms (cont..)
Histograms clustered at the low end correspond to dark images. Histograms clustered at the high end correspond to bright images. Images taken from Gonzalez and Woods, 2016
22
Histogram Equalization
The main idea is to redistribute the gray-level values uniformly. Images taken from Gonzalez and Woods, 2016
23
Histogram Equalization
In practice, the equalized histogram might not be completely flat.
24
Histogram Equalization
Images taken from Gonzalez and Woods, 2016
25
Histogram Equalization – in Graph
Images taken from Gonzalez and Woods, 2016
26
Advantages of Histogram Equalization
Optimal contrast. Fully automated (adaptive, no human intervention). Image normalization: easy to compare two images taken under different lighting conditions.
27
Spatial filtering (Smoothing and Sharpening)
28
Spatial Filtering Filter (Mask) refers to “accepting” or “rejecting” a certain frequency components (smooth or sharp). Mask operation: output pixel value = some algorithm performed on all the pixels in the neighborhood of the corresponding input pixel Size of neighborhood = size of mask. Mask slides from left-side to right-side, then from top to bottom Same operation is performed on every pixel Neighborhood exceeds image boundary: zero padding or replication of border pixels
29
Spatial Example “Consider neighborhood pixel in order to do operation in smoothing or sharpening”.
30
Neighbourhood Operations
Origin x y Image f (x, y) (x, y) Neighbourhood Neighbourhood operations simply operate on a larger neighbourhood of pixels than point operations Neighbourhoods are mostly a rectangle around a central pixel Any size rectangle and any shape filter are possible
31
Neighbourhood Operations
Origin Target x y Image f (x, y) (x, y) Neighbourhood
32
The Spatial Filtering Process
Origin x * Original Image Pixels Filter (w) Simple 3*3 Neighbourhood e 3*3 Filter eprocessed = o*e + k*a + l*b + m*c + n*d + p*f + q*g + r*h + s*i y Image f (x, y) For each pixel is computed based on neighbourhood operation to generate the smoothed image
33
Smoothing Spatial Filtering
Origin x 104 100 108 99 106 98 95 90 85 1/9 * Original Image Pixels Filter 1/9 104 99 95 100 108 98 90 85 Simple 3*3 Neighbourhood 3*3 Smoothing Filter 106 e = 1/9* /9* /9* /9* /9*99 + 1/9* /9*95 + 1/9*90 + 1/9*85 = y Image f (x, y) For each pixel is computed based on neighbourhood operation to generate the smoothed image
34
Weighted Smoothing Filters
An effective smoothing filter uses different weights in the averaging function.
35
Linear Filter Example g(x,y) = w(-1,-1)f(x-1,y-1) +w(-1,0)f(-1,0) +…… + w(1,1)f(x+1, y+1)
36
Spatial Filtering - Smoothing
Spatial filter is suitable for blurring and noise reduction The aims are to remove the detail information and bridging of small gaps in lines or curves
37
Smoothing Masks Smoothing masks are normally adjusted to preserve average value (∑wi = 1)
38
Spatial Filtering - Sharpening
Highlight/enhance fine detail that has been blurred Application ranging from electronic printing and medical imaging to industrial inspection
39
Laplacian Filter The Laplacian filter is given as: Where:
The filter mask of Laplacian filter is shown as follows:
40
Laplacian Filter The result obtained from Laplacian filer produces highlights edges. Images taken from Gonzalez and Woods, 2016
41
Result of Laplacian Filter
In order to produce the final sharpened image, the original image is subtracted by the Laplacian result Laplacian Filtered Images taken from Gonzalez and Woods, 2016
42
Laplacian Filter Images taken from Gonzalez and Woods, 2016
43
Laplacian Filter Images taken from Gonzalez and Woods, 2016
44
Variants Laplacian Filter
Some variants Laplacian filters are given as follows: Simple Laplacian Variant of Laplacian Images taken from Gonzalez and Woods, 2016
45
Cont..
46
References R.C. Gonzalez and R.E. Woods, Digital Image Processing, Pearson Education India; Third edition. A.K. Jain, Fundamentals of Digital Image Processing, Pearson Education India; First edition. R.C. Gonzalez, R.E. Woods and S.L. Eddins, Digital Image Processing Using MATLAB. McGraw Hill Education; 2 edition. S. Jayaraman, T. Veerakumar, S. Esakkirajan, 2017.Digital Image Processing, McGraw Hill Education; 1 edition.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.