SlideShare a Scribd company logo
XỬ LÝ ẢNH TRONG CƠ ĐIỆN TỬ
Machine Vision
1
TRƯỜNG ĐẠI HỌC BÁCH KHOA HÀ NỘI
Giảng viên: TS. Nguyễn Thành Hùng
Đơn vị: Bộ môn Cơ điện tử, Viện Cơ khí
Hà Nội, 2021
2
Chapter 3. Intensity Transformations and Spatial Filtering
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
❖Two principal categories of spatial processing are intensity transformations and
spatial filtering.
➢ Intensity transformations operate on single pixels of an image for tasks such
as contrast manipulation and image thresholding.
➢ Spatial filtering performs operations on the neighborhood of every pixel in an
image.
➢ Examples of spatial filtering include image smoothing and sharpening.
3
Chapter 3. Intensity Transformations and Spatial Filtering
1. Background
2. Some Basic Intensity Transformation Functions
3. Histogram Processing
4. Fundamentals of Spatial Filtering
5. Smoothing (Lowpass) Spatial Filters
6. Sharpening (Highpass) Spatial Filters
7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters
8. Combining Spatial Enhancement Methods
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
4
1. Background
❖The Basics of Intensity Transformations and Spatial Filtering
➢The spatial domain processes are based on the expression
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
where f(x, y) is an input image, g(x, y) is the
output image, and T is an operator on f defined
over a neighborhood of point (x, y).
A 3x3 neighborhood about a point (x0, y0) in an image. The neighborhood
is moved from pixel to pixel in the image to generate an output image.
5
1. Background
❖The Basics of Intensity Transformations and Spatial Filtering
➢intensity (also called a gray-level, or mapping) transformation function
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
Intensity transformation functions.
(a) Contrast stretching function.
(b) Thresholding function.
6
Chapter 3. Intensity Transformations and Spatial Filtering
1. Background
2. Some Basic Intensity Transformation Functions
3. Histogram Processing
4. Fundamentals of Spatial Filtering
5. Smoothing (Lowpass) Spatial Filters
6. Sharpening (Highpass) Spatial Filters
7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters
8. Combining Spatial Enhancement Methods
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
7
❖Three basic types of functions
➢ linear (negative and identity transformations)
➢ logarithmic (log and inverse-log transformations)
➢ power-law (nth power and nth root
transformations)
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
Some basic intensity transformation functions.
2. Some Basic Intensity Transformation Functions
8
2. Some Basic Intensity Transformation Functions
❖Image Negatives
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
(a) A digital mammogram. (b) Negative image obtained using Eq. (3-3) .
(Image (a) Courtesy of General Electric Medical Systems.)
9
2. Some Basic Intensity Transformation Functions
❖Log Transformations
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
where c is a constant and it is assumed that r  0
(a) Fourier spectrum displayed as a grayscale image. (b) Result of applying the log
transformation in Eq. (3-4) with c = 1. Both images are scaled to the range [0, 255].
10
2. Some Basic Intensity Transformation Functions
❖Power-Law (Gamma) Transformations
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
where c and are positive constants
Plots of the gamma equation s = cr for various values
of  (c = 1 in all cases).
11
2. Some Basic Intensity Transformation Functions
❖Power-Law (Gamma) Transformations
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
(a) Image of a human retina. (b) Image as
as it appears on a monitor with a gamma
setting of 2.5 (note the darkness). (c)
Gammacorrected image. (d) Corrected
image, as it appears on the same monitor
(compare with the original image). (Image
(a) courtesy of the National Eye Institute,
NIH)
12
2. Some Basic Intensity Transformation Functions
❖Power-Law (Gamma) Transformations
➢Contrast enhancement using power-law intensity transformations.
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
a) Magnetic resonance image (MRI) of a fractured human spine (the region of the fracture is enclosed by the circle). (b)–(d)
Results of applying the transformation in Eq. (3-5) with and and 0.3, respectively. (Original image courtesy of Dr. David R. Pickens,
Department of Radiology and Radiological Sciences, Vanderbilt University Medical Center.)
13
2. Some Basic Intensity Transformation Functions
❖Power-Law (Gamma) Transformations
➢Another illustration of power-law transformations.
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
(a) Aerial image. (b)–(d) Results of applying the transformation in Eq. (3-5) with  = 3.0, 4.0 and 5.0, respectively.
(c = 1 in all cases.) (Original image courtesy of NASA.)
14
2. Some Basic Intensity Transformation Functions
❖Piecewise Linear Transformation Functions
➢Contrast Stretching
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
where rmin and rmax denote
the minimum and maximum
intensity levels in the input
image, respectively
where m is the mean intensity
level in the image
15
2. Some Basic Intensity Transformation Functions
❖Piecewise Linear Transformation Functions
➢Intensity-Level Slicing
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
Figure 1: (a) This transformation function highlights range [A, B] and
reduces all other intensities to a lower level. (b) This function highlights
range [A, B] and leaves other intensities unchanged.
Figure 2: (a) Aortic angiogram. (b) Result of using a slicing transformation
of the type illustrated in Fig. 1(a) , with the range of intensities of interest
selected in the upper end of the gray scale. (c) Result of using the
transformation in Fig. 1(b) , with the selected range set near black, so that
the grays in the area of the blood vessels and kidneys were preserved.
(Original image courtesy of Dr. Thomas R. Gest, University of Michigan
Medical School.)
16
2. Some Basic Intensity Transformation Functions
❖Piecewise Linear Transformation Functions
➢Bit-Plane Slicing
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
Bit-planes of an 8-bit image.
17
2. Some Basic Intensity Transformation Functions
❖Piecewise Linear Transformation Functions
➢Bit-Plane Slicing
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
(a) An 8-bit gray-scale
image of size pixels. (b)
through (i) Bit planes 8
through 1, respectively,
where plane 1 contains
the least significant bit.
Each bit plane is a binary
image. Figure (a) is an
SEM image of a
trophozoite that causes a
disease called giardiasis.
(Courtesy of Dr. Stan
Erlandsen, U.S. Center
for Disease Control and
Prevention.)
18
2. Some Basic Intensity Transformation Functions
❖Piecewise Linear Transformation Functions
➢Bit-Plane Slicing
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
Image reconstructed from bit planes: (a) 8 and 7; (b) 8, 7, and 6; (c) 8, 7, 6, and 5.
19
Chapter 3. Intensity Transformations and Spatial Filtering
1. Background
2. Some Basic Intensity Transformation Functions
3. Histogram Processing
4. Fundamentals of Spatial Filtering
5. Smoothing (Lowpass) Spatial Filters
6. Sharpening (Highpass) Spatial Filters
7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters
8. Combining Spatial Enhancement Methods
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
20
3. Histogram Processing
❖Histogram
➢The unnormalized histogram:
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
where rk is the k-th intensity level of an L-level
digital image f(x, y); nk is the number of pixels
in f with intensity rk and the subdivisions of the
intensity scale are called histogram bins.
21
3. Histogram Processing
❖Histogram
➢The normalized histogram:
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
where M and N are the number of image rows and columns, respectively.
෍
𝑘=1
𝐿−1
𝑝 𝑟𝑘 = 1
22
3. Histogram Processing
❖Histogram
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
Four image types and their corresponding histograms. (a) dark; (b) light; (c) low contrast; (d) high contrast.
The horizontal axis of the histograms are values of rk and the vertical axis are values of p(rk) .
30
3. Histogram Processing
❖Histogram Equalization
➢The probability of occurrence of intensity level in a digital image is approximated
by
where MN is the total number of pixels in the image, and nk denotes the number of pixels that have
intensity rk.
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
a histogram equalization or histogram linearization transformation
➢The discrete form of the transformation function is
31
3. Histogram Processing
❖Histogram Equalization
➢Example: Illustration of the mechanics of histogram equalization.
• Suppose that a 3-bit image (L = 3) of size 64x64 pixels (MN = 4096) has the intensity distribution
in Table
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
32
3. Histogram Processing
❖Histogram Equalization
➢Example: Illustration of the mechanics of histogram equalization.
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
We round them to their nearest integer values in the range [0, 7]:
The values of the equalized histogram.
33
3. Histogram Processing
❖Histogram Equalization
➢Example: Illustration of the mechanics of histogram equalization.
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
Histogram equalization. (a) Original histogram. (b) Transformation function. (c) Equalized histogram.
34
3. Histogram Processing
❖Histogram Equalization
➢Algorithm for Histogram Equalization
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
35
3. Histogram Processing
❖Histogram Equalization
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
Histogram-
equalized images
Source images Histogram Histogram-
equalized images
Source images Histogram
37
3. Histogram Processing
❖Histogram Equalization
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
(a) Image from Phoenix Lander. (b) Result of
histogram equalization. (c) Histogram of image
(a). (d) Histogram of image (b). (Original image
courtesy of NASA.)
39
Chapter 3. Intensity Transformations and Spatial Filtering
1. Background
2. Some Basic Intensity Transformation Functions
3. Histogram Processing
4. Fundamentals of Spatial Filtering
5. Smoothing (Lowpass) Spatial Filters
6. Sharpening (Highpass) Spatial Filters
7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters
8. Combining Spatial Enhancement Methods
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
40
4. Fundamentals of Spatial Filtering
❖The Mechanics of Linear Spatial Filtering
➢Spatial filter kernel: filter kernel, kernel, mask,
template, and window
➢Linear spatial filtering
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
41
4. Fundamentals of Spatial Filtering
❖Spatial Correlation
and Convolution
➢1-D illustration
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
42
4. Fundamentals of Spatial Filtering
❖Spatial Correlation and Convolution
➢2-D illustration
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
➢Correlation
➢Convolution
43
4. Fundamentals of Spatial Filtering
❖Spatial Correlation and Convolution
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
44
Chapter 3. Intensity Transformations and Spatial Filtering
1. Background
2. Some Basic Intensity Transformation Functions
3. Histogram Processing
4. Fundamentals of Spatial Filtering
5. Smoothing (Lowpass) Spatial Filters
6. Sharpening (Highpass) Spatial Filters
7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters
8. Combining Spatial Enhancement Methods
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
45
5. Smoothing (Lowpass) Spatial Filters
➢Smoothing (also called averaging) spatial filters are used to reduce sharp
transitions in intensity.
➢Application: noise reduction, reduce aliasing, reduce irrelevant detail in an image,
smoothing the false contours, …
➢Linear spatial filtering
➢Nonlinear smoothing filters
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
46
5. Smoothing (Lowpass) Spatial Filters
❖Box Filter Kernels
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
47
5. Smoothing (Lowpass) Spatial Filters
❖Box Filter Kernels
➢Example: Lowpass filtering with a box
kernel
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
(a) Test pattern of size 1024x1024 pixels. (b)-(d)
Results of lowpass filtering with box kernels of
sizes 3x3, 11x11, and 21x21 respectively.
48
5. Smoothing (Lowpass) Spatial Filters
❖Lowpass Gaussian Filter Kernels
➢Gaussian kernels of the form
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
Distances from the center for
various sizes of square kernels.
49
5. Smoothing (Lowpass) Spatial Filters
❖Lowpass Gaussian Filter Kernels
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
(a) Sampling a Gaussian function to obtain a discrete Gaussian kernel.
The values shown are for K = 1 and  = 1. (b) Resulting kernel.
50
5. Smoothing (Lowpass) Spatial Filters
❖Lowpass Gaussian Filter Kernels
➢Example: Lowpass filtering with a Gaussian kernel
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
(a)A test pattern of size 1024x1024. (b) Result of lowpass filtering the pattern with a Gaussian kernel of
size 21x21, with standard deviations  = 3.5. (c) Result of using a kernel of size 43x43, with  = 7. We
used K = 1 in all cases.
51
5. Smoothing (Lowpass) Spatial Filters
❖Lowpass Gaussian Filter Kernels
➢Example: Lowpass filtering with a Gaussian kernel
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
(a) Result of filtering using a Gaussian kernels of size43x43, with  = 7. (b) Result of using
a kernel of 85x85, with the same value of . (c) Difference image.
52
5. Smoothing (Lowpass) Spatial Filters
➢Example: Comparison of Gaussian and box filter smoothing characteristics.
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
53
5. Smoothing (Lowpass) Spatial Filters
➢Example: Using lowpass filtering and thresholding for region extraction.
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
54
5. Smoothing (Lowpass) Spatial Filters
❖Order-Statistic (Nonlinear) Filters
➢Median filter: replaces the value of the center pixel by the median of the intensity
values in the neighborhood of that pixel
→Effective in the presence of impulse noise (salt-and-pepper noise)
→The 50th percentile of a ranked set of numbers
➢Max filter:
→Finding the brightest points in an image or for eroding dark areas adjacent to light
regions
→The 100th percentile filter
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
55
5. Smoothing (Lowpass) Spatial Filters
❖Order-Statistic (Nonlinear) Filters
➢Min filter:
→used for the opposite purpose
→The 0th percentile filter
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
56
5. Smoothing (Lowpass) Spatial Filters
❖Order-Statistic (Nonlinear) Filters
➢Example: Median filtering
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
57
Chapter 3. Intensity Transformations and Spatial Filtering
1. Background
2. Some Basic Intensity Transformation Functions
3. Histogram Processing
4. Fundamentals of Spatial Filtering
5. Smoothing (Lowpass) Spatial Filters
6. Sharpening (Highpass) Spatial Filters
7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters
8. Combining Spatial Enhancement Methods
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
58
6. Sharpening (Highpass) Spatial Filters
❖Foundation
➢First-order derivative
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
➢Second-order derivative
59
6. Sharpening (Highpass) Spatial Filters
❖Image Sharpening—the Laplacian
➢Laplacian
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
60
6. Sharpening (Highpass) Spatial Filters
❖Image Sharpening—the Laplacian
➢Laplacian kernel
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
61
6. Sharpening (Highpass) Spatial Filters
❖Image Sharpening—the Laplacian
➢The basic way in which the Laplacian is used for image sharpening:
▪ c = 1 if the center element of the Laplacian kernel is positive
▪ c = -1 if the center element of the Laplacian kernel is negative
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
62
6. Sharpening (Highpass) Spatial Filters
❖Image Sharpening—the Laplacian
➢Example: Image sharpening using the Laplacian
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
a) Blurred image of the North Pole of the moon. (b) Laplacian image obtained using the kernel in Fig.
3.51(a). (c) Image sharpened using Eq. (3-63) with c = -1. (d) Image sharpened using the same procedure,
but with the kernel in Fig. 3.51(b). (Original image courtesy of NASA.)
63
6. Sharpening (Highpass) Spatial Filters
❖Unsharp Masking and Highboost Filtering
➢Unsharp masking
▪ Blur the original image
▪ Subtract the blurred image from the original (the resulting difference is called the mask)
▪ Add the mask to the original
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
blurred image
▪ When k = 1 → unsharp masking
▪ When k > 1 → highboost filtering
▪ When 0  k < 1 → reduces the contribution of the unsharp mask
64
6. Sharpening (Highpass) Spatial Filters
❖Unsharp Masking and Highboost Filtering
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
1-D illustration of the mechanics of unsharp masking. (a) Original signal. (b) Blurred signal with original
shown dashed for reference. (c) Unsharp mask. (d) Sharpened signal, obtained by adding (c) to (a).
65
6. Sharpening (Highpass) Spatial Filters
❖Unsharp Masking and Highboost Filtering
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
(a) Unretouched “soft-tone” digital image of size 469x600 pixels. (b) Image blurred using a 31x31 Gaussian lowpass
filter with  = 5. (c) Mask. (d) Result of unsharp masking using Eq. (3-65) with k = 1. (e) and (f) Results of highboost
filtering with k = 2 and k = 3 respectively.
66
6. Sharpening (Highpass) Spatial Filters
❖Image Sharpening—the Gradient
➢The gradient of an image f at coordinates (x, y)
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
➢The magnitude (length) of vector f
67
6. Sharpening (Highpass) Spatial Filters
❖Image Sharpening—the Gradient
➢Roberts cross-gradient operators
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
68
6. Sharpening (Highpass) Spatial Filters
❖Image Sharpening—the Gradient
➢Sobel operators
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
69
6. Sharpening (Highpass) Spatial Filters
❖Image Sharpening—the Gradient
➢Filter masks
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
(a) A 3x3 region of an image, where the zs are intensity values. (b)–(c) Roberts cross-gradient operators.
(d)–(e) Sobel operators. All the kernel coefficients sum to zero, as expected of a derivative operator.
70
6. Sharpening (Highpass) Spatial Filters
❖Image Sharpening—the Gradient
➢Example: Using the gradient for edge enhancement.
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
(a) Image of a contact lens (note defects on the boundary at 4 and 5 o’clock).
(b) Sobel gradient. (Original image courtesy of Perceptics Corporation.)
71
Chapter 3. Intensity Transformations and Spatial Filtering
1. Background
2. Some Basic Intensity Transformation Functions
3. Histogram Processing
4. Fundamentals of Spatial Filtering
5. Smoothing (Lowpass) Spatial Filters
6. Sharpening (Highpass) Spatial Filters
7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters
8. Combining Spatial Enhancement Methods
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
72
7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters
❖Transfer functions of ideal 1-D filters
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
Transfer functions of ideal 1-D
filters in the frequency domain
(u denotes frequency). (a)
Lowpass filter. (b) Highpass
filter. (c) Bandreject filter. (d)
Bandpass filter. (As before, we
show only positive frequencies
for simplicity.)
73
7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters
❖Transfer functions of ideal 1-D filters
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
74
7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters
❖Transfer functions of ideal 1-D filters
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
A zone plate image of size 597x597 pixels
(a) A 1-D spatial lowpass filter function. (b) 2-D kernel
obtained by rotating the 1-D profile about its center.
75
7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters
❖Transfer functions of ideal 1-D filters
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
(a) Zone plate image filtered with a separable lowpass kernel. (b) Image
filtered with the isotropic lowpass kernel in Fig. 3.60(b).
76
7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters
❖Transfer functions of ideal 1-D filters
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
Spatial filtering of the zone
plate image. (a) Lowpass
result; this is the same as Fig.
3.61(b) . (b) Highpass result.
(c) Image (b) with intensities
scaled. (d) Bandreject result.
(e) Bandpass result. (f) Image
(e) with intensities scaled.
77
Chapter 3. Intensity Transformations and Spatial Filtering
1. Background
2. Some Basic Intensity Transformation Functions
3. Histogram Processing
4. Fundamentals of Spatial Filtering
5. Smoothing (Lowpass) Spatial Filters
6. Sharpening (Highpass) Spatial Filters
7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters
8. Combining Spatial Enhancement Methods
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
78
8. Combining Spatial Enhancement Methods
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
➢ Laplacian is superior for enhancing fine detail.
➢ The gradient has a stronger response in areas of significant intensity transitions (ramps and steps).
(a) Image of whole body bone scan. (b) Laplacian of (a). (c) Sharpened image obtained by adding (a) and (b).
(d) Sobel gradient of image (a). (Original image courtesy of G.E. Medical Systems.)
79
8. Combining Spatial Enhancement Methods
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
(e) Sobel image smoothed with a 3x3 box filter. (f) Mask image formed by the product of (b) and (e). (g) Sharpened image
obtained by the adding images (a) and (f). (h) Final result obtained by applying a power-law transformation to (g). Compare
images (g) and (h) with (a). (Original image courtesy of G.E. Medical Systems.)

More Related Content

What's hot

SPATIAL FILTER
SPATIAL FILTERSPATIAL FILTER
Digital Image Processing - Image Restoration
Digital Image Processing - Image RestorationDigital Image Processing - Image Restoration
Digital Image Processing - Image Restoration
Mathankumar S
 
Chap6 image restoration
Chap6 image restorationChap6 image restoration
Chap6 image restoration
ShardaSalunkhe1
 
Dip review
Dip reviewDip review
Dip review
Harish Reddy
 
Fundamental steps in image processing
Fundamental steps in image processingFundamental steps in image processing
Fundamental steps in image processing
PremaPRC211300301103
 
Module 31
Module 31Module 31
Module 31
UllasSS1
 
4.intensity transformations
4.intensity transformations4.intensity transformations
4.intensity transformations
Yahya Alkhaldi
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
A B Shinde
 
Histogram Specification or Matching Problem
Histogram Specification or Matching ProblemHistogram Specification or Matching Problem
Histogram Specification or Matching Problem
Kalyan Acharjya
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processing
Ahmed Daoud
 
6.frequency domain image_processing
6.frequency domain image_processing6.frequency domain image_processing
6.frequency domain image_processing
Nashid Alam
 
Image Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain FiltersImage Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain Filters
Karthika Ramachandran
 
Image restoration
Image restorationImage restoration
Image restoration
Upendra Pratap Singh
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
shabanam tamboli
 
04 image enhancement edge detection
04 image enhancement edge detection04 image enhancement edge detection
04 image enhancement edge detection
Rumah Belajar
 
Matlab Image Restoration Techniques
Matlab Image Restoration TechniquesMatlab Image Restoration Techniques
Matlab Image Restoration Techniques
DataminingTools Inc
 
Chapter 9 morphological image processing
Chapter 9 morphological image processingChapter 9 morphological image processing
Chapter 9 morphological image processing
asodariyabhavesh
 
Dip
Dip Dip
Lec 07 image enhancement in frequency domain i
Lec 07 image enhancement in frequency domain iLec 07 image enhancement in frequency domain i
Lec 07 image enhancement in frequency domain i
Ali Hassan
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
Poonam Seth
 

What's hot (20)

SPATIAL FILTER
SPATIAL FILTERSPATIAL FILTER
SPATIAL FILTER
 
Digital Image Processing - Image Restoration
Digital Image Processing - Image RestorationDigital Image Processing - Image Restoration
Digital Image Processing - Image Restoration
 
Chap6 image restoration
Chap6 image restorationChap6 image restoration
Chap6 image restoration
 
Dip review
Dip reviewDip review
Dip review
 
Fundamental steps in image processing
Fundamental steps in image processingFundamental steps in image processing
Fundamental steps in image processing
 
Module 31
Module 31Module 31
Module 31
 
4.intensity transformations
4.intensity transformations4.intensity transformations
4.intensity transformations
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
Histogram Specification or Matching Problem
Histogram Specification or Matching ProblemHistogram Specification or Matching Problem
Histogram Specification or Matching Problem
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processing
 
6.frequency domain image_processing
6.frequency domain image_processing6.frequency domain image_processing
6.frequency domain image_processing
 
Image Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain FiltersImage Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain Filters
 
Image restoration
Image restorationImage restoration
Image restoration
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
04 image enhancement edge detection
04 image enhancement edge detection04 image enhancement edge detection
04 image enhancement edge detection
 
Matlab Image Restoration Techniques
Matlab Image Restoration TechniquesMatlab Image Restoration Techniques
Matlab Image Restoration Techniques
 
Chapter 9 morphological image processing
Chapter 9 morphological image processingChapter 9 morphological image processing
Chapter 9 morphological image processing
 
Dip
Dip Dip
Dip
 
Lec 07 image enhancement in frequency domain i
Lec 07 image enhancement in frequency domain iLec 07 image enhancement in frequency domain i
Lec 07 image enhancement in frequency domain i
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
 

Similar to Chapter 3. Intensity Transformations and Spatial Filtering.pdf

Chapter 2. Digital Image Fundamentals.pdf
Chapter 2. Digital Image Fundamentals.pdfChapter 2. Digital Image Fundamentals.pdf
Chapter 2. Digital Image Fundamentals.pdf
DngThanh44
 
Image Enhancement in Spatial Frequency Domain
Image Enhancement in Spatial Frequency DomainImage Enhancement in Spatial Frequency Domain
Image Enhancement in Spatial Frequency Domain
venkadanathanachudha
 
mini prjt
mini prjtmini prjt
Chapter01 (2)
Chapter01 (2)Chapter01 (2)
Chapter01 (2)
shabanam tamboli
 
AN EFFICIENT FEATURE EXTRACTION AND CLASSIFICATION OF HANDWRITTEN DIGITS USIN...
AN EFFICIENT FEATURE EXTRACTION AND CLASSIFICATION OF HANDWRITTEN DIGITS USIN...AN EFFICIENT FEATURE EXTRACTION AND CLASSIFICATION OF HANDWRITTEN DIGITS USIN...
AN EFFICIENT FEATURE EXTRACTION AND CLASSIFICATION OF HANDWRITTEN DIGITS USIN...
IJCSEA Journal
 
Lec_3_Image Enhancement_spatial Domain.pdf
Lec_3_Image Enhancement_spatial Domain.pdfLec_3_Image Enhancement_spatial Domain.pdf
Lec_3_Image Enhancement_spatial Domain.pdf
nagwaAboElenein
 
3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides
BHAGYAPRASADBUGGE
 
Chapter02.ppt
Chapter02.pptChapter02.ppt
Chapter02.ppt
RishiJain193179
 
P180203105108
P180203105108P180203105108
P180203105108
IOSR Journals
 
Chapter1.ppt
Chapter1.pptChapter1.ppt
Chapter1.ppt
HarisMasood20
 
A new gridding technique for high density microarray
A new gridding technique for high density microarrayA new gridding technique for high density microarray
A new gridding technique for high density microarray
Alexander Decker
 
Digital Ortho Image Creation of Hall County Aerial Photos
Digital Ortho Image Creation of Hall County Aerial PhotosDigital Ortho Image Creation of Hall County Aerial Photos
Digital Ortho Image Creation of Hall County Aerial Photos
mpadams77
 
PDE BASED FEATURES FOR TEXTURE ANALYSIS USING WAVELET TRANSFORM
PDE BASED FEATURES FOR TEXTURE ANALYSIS USING WAVELET TRANSFORMPDE BASED FEATURES FOR TEXTURE ANALYSIS USING WAVELET TRANSFORM
PDE BASED FEATURES FOR TEXTURE ANALYSIS USING WAVELET TRANSFORM
IJCI JOURNAL
 
IJET-V2I6P17
IJET-V2I6P17IJET-V2I6P17
Ijetr011837
Ijetr011837Ijetr011837
Ijetr011837
ER Publication.org
 
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
 
An Improved TRICKS Method for Dynamic Contrast-Enhanced Tumor Imaging
An Improved TRICKS Method for Dynamic Contrast-Enhanced Tumor ImagingAn Improved TRICKS Method for Dynamic Contrast-Enhanced Tumor Imaging
An Improved TRICKS Method for Dynamic Contrast-Enhanced Tumor Imaging
Mike Aref
 
EFFICIENT IMAGE RETRIEVAL USING REGION BASED IMAGE RETRIEVAL
EFFICIENT IMAGE RETRIEVAL USING REGION BASED IMAGE RETRIEVALEFFICIENT IMAGE RETRIEVAL USING REGION BASED IMAGE RETRIEVAL
EFFICIENT IMAGE RETRIEVAL USING REGION BASED IMAGE RETRIEVAL
sipij
 
3rd unit.pptx
3rd unit.pptx3rd unit.pptx
3rd unit.pptx
ssuser0bf6a8
 
Image compression using Hybrid wavelet Transform and their Performance Compa...
Image compression using Hybrid wavelet Transform and their  Performance Compa...Image compression using Hybrid wavelet Transform and their  Performance Compa...
Image compression using Hybrid wavelet Transform and their Performance Compa...
IJMER
 

Similar to Chapter 3. Intensity Transformations and Spatial Filtering.pdf (20)

Chapter 2. Digital Image Fundamentals.pdf
Chapter 2. Digital Image Fundamentals.pdfChapter 2. Digital Image Fundamentals.pdf
Chapter 2. Digital Image Fundamentals.pdf
 
Image Enhancement in Spatial Frequency Domain
Image Enhancement in Spatial Frequency DomainImage Enhancement in Spatial Frequency Domain
Image Enhancement in Spatial Frequency Domain
 
mini prjt
mini prjtmini prjt
mini prjt
 
Chapter01 (2)
Chapter01 (2)Chapter01 (2)
Chapter01 (2)
 
AN EFFICIENT FEATURE EXTRACTION AND CLASSIFICATION OF HANDWRITTEN DIGITS USIN...
AN EFFICIENT FEATURE EXTRACTION AND CLASSIFICATION OF HANDWRITTEN DIGITS USIN...AN EFFICIENT FEATURE EXTRACTION AND CLASSIFICATION OF HANDWRITTEN DIGITS USIN...
AN EFFICIENT FEATURE EXTRACTION AND CLASSIFICATION OF HANDWRITTEN DIGITS USIN...
 
Lec_3_Image Enhancement_spatial Domain.pdf
Lec_3_Image Enhancement_spatial Domain.pdfLec_3_Image Enhancement_spatial Domain.pdf
Lec_3_Image Enhancement_spatial Domain.pdf
 
3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides
 
Chapter02.ppt
Chapter02.pptChapter02.ppt
Chapter02.ppt
 
P180203105108
P180203105108P180203105108
P180203105108
 
Chapter1.ppt
Chapter1.pptChapter1.ppt
Chapter1.ppt
 
A new gridding technique for high density microarray
A new gridding technique for high density microarrayA new gridding technique for high density microarray
A new gridding technique for high density microarray
 
Digital Ortho Image Creation of Hall County Aerial Photos
Digital Ortho Image Creation of Hall County Aerial PhotosDigital Ortho Image Creation of Hall County Aerial Photos
Digital Ortho Image Creation of Hall County Aerial Photos
 
PDE BASED FEATURES FOR TEXTURE ANALYSIS USING WAVELET TRANSFORM
PDE BASED FEATURES FOR TEXTURE ANALYSIS USING WAVELET TRANSFORMPDE BASED FEATURES FOR TEXTURE ANALYSIS USING WAVELET TRANSFORM
PDE BASED FEATURES FOR TEXTURE ANALYSIS USING WAVELET TRANSFORM
 
IJET-V2I6P17
IJET-V2I6P17IJET-V2I6P17
IJET-V2I6P17
 
Ijetr011837
Ijetr011837Ijetr011837
Ijetr011837
 
Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)
 
An Improved TRICKS Method for Dynamic Contrast-Enhanced Tumor Imaging
An Improved TRICKS Method for Dynamic Contrast-Enhanced Tumor ImagingAn Improved TRICKS Method for Dynamic Contrast-Enhanced Tumor Imaging
An Improved TRICKS Method for Dynamic Contrast-Enhanced Tumor Imaging
 
EFFICIENT IMAGE RETRIEVAL USING REGION BASED IMAGE RETRIEVAL
EFFICIENT IMAGE RETRIEVAL USING REGION BASED IMAGE RETRIEVALEFFICIENT IMAGE RETRIEVAL USING REGION BASED IMAGE RETRIEVAL
EFFICIENT IMAGE RETRIEVAL USING REGION BASED IMAGE RETRIEVAL
 
3rd unit.pptx
3rd unit.pptx3rd unit.pptx
3rd unit.pptx
 
Image compression using Hybrid wavelet Transform and their Performance Compa...
Image compression using Hybrid wavelet Transform and their  Performance Compa...Image compression using Hybrid wavelet Transform and their  Performance Compa...
Image compression using Hybrid wavelet Transform and their Performance Compa...
 

Recently uploaded

Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
bijceesjournal
 
Introduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptxIntroduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptx
MiscAnnoy1
 
Transformers design and coooling methods
Transformers design and coooling methodsTransformers design and coooling methods
Transformers design and coooling methods
Roger Rozario
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
JamalHussainArman
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
john krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptxjohn krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptx
Madan Karki
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
ecqow
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
Hematology Analyzer Machine - Complete Blood Count
Hematology Analyzer Machine - Complete Blood CountHematology Analyzer Machine - Complete Blood Count
Hematology Analyzer Machine - Complete Blood Count
shahdabdulbaset
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
mamamaam477
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
IJECEIAES
 
gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))
shivani5543
 
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
amsjournal
 

Recently uploaded (20)

Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
 
Introduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptxIntroduction to AI Safety (public presentation).pptx
Introduction to AI Safety (public presentation).pptx
 
Transformers design and coooling methods
Transformers design and coooling methodsTransformers design and coooling methods
Transformers design and coooling methods
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
john krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptxjohn krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptx
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
Hematology Analyzer Machine - Complete Blood Count
Hematology Analyzer Machine - Complete Blood CountHematology Analyzer Machine - Complete Blood Count
Hematology Analyzer Machine - Complete Blood Count
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
 
gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))gray level transformation unit 3(image processing))
gray level transformation unit 3(image processing))
 
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
UNLOCKING HEALTHCARE 4.0: NAVIGATING CRITICAL SUCCESS FACTORS FOR EFFECTIVE I...
 

Chapter 3. Intensity Transformations and Spatial Filtering.pdf

  • 1. XỬ LÝ ẢNH TRONG CƠ ĐIỆN TỬ Machine Vision 1 TRƯỜNG ĐẠI HỌC BÁCH KHOA HÀ NỘI Giảng viên: TS. Nguyễn Thành Hùng Đơn vị: Bộ môn Cơ điện tử, Viện Cơ khí Hà Nội, 2021
  • 2. 2 Chapter 3. Intensity Transformations and Spatial Filtering Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). ❖Two principal categories of spatial processing are intensity transformations and spatial filtering. ➢ Intensity transformations operate on single pixels of an image for tasks such as contrast manipulation and image thresholding. ➢ Spatial filtering performs operations on the neighborhood of every pixel in an image. ➢ Examples of spatial filtering include image smoothing and sharpening.
  • 3. 3 Chapter 3. Intensity Transformations and Spatial Filtering 1. Background 2. Some Basic Intensity Transformation Functions 3. Histogram Processing 4. Fundamentals of Spatial Filtering 5. Smoothing (Lowpass) Spatial Filters 6. Sharpening (Highpass) Spatial Filters 7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters 8. Combining Spatial Enhancement Methods Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 4. 4 1. Background ❖The Basics of Intensity Transformations and Spatial Filtering ➢The spatial domain processes are based on the expression Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). where f(x, y) is an input image, g(x, y) is the output image, and T is an operator on f defined over a neighborhood of point (x, y). A 3x3 neighborhood about a point (x0, y0) in an image. The neighborhood is moved from pixel to pixel in the image to generate an output image.
  • 5. 5 1. Background ❖The Basics of Intensity Transformations and Spatial Filtering ➢intensity (also called a gray-level, or mapping) transformation function Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). Intensity transformation functions. (a) Contrast stretching function. (b) Thresholding function.
  • 6. 6 Chapter 3. Intensity Transformations and Spatial Filtering 1. Background 2. Some Basic Intensity Transformation Functions 3. Histogram Processing 4. Fundamentals of Spatial Filtering 5. Smoothing (Lowpass) Spatial Filters 6. Sharpening (Highpass) Spatial Filters 7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters 8. Combining Spatial Enhancement Methods Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 7. 7 ❖Three basic types of functions ➢ linear (negative and identity transformations) ➢ logarithmic (log and inverse-log transformations) ➢ power-law (nth power and nth root transformations) Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). Some basic intensity transformation functions. 2. Some Basic Intensity Transformation Functions
  • 8. 8 2. Some Basic Intensity Transformation Functions ❖Image Negatives Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). (a) A digital mammogram. (b) Negative image obtained using Eq. (3-3) . (Image (a) Courtesy of General Electric Medical Systems.)
  • 9. 9 2. Some Basic Intensity Transformation Functions ❖Log Transformations Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). where c is a constant and it is assumed that r  0 (a) Fourier spectrum displayed as a grayscale image. (b) Result of applying the log transformation in Eq. (3-4) with c = 1. Both images are scaled to the range [0, 255].
  • 10. 10 2. Some Basic Intensity Transformation Functions ❖Power-Law (Gamma) Transformations Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). where c and are positive constants Plots of the gamma equation s = cr for various values of  (c = 1 in all cases).
  • 11. 11 2. Some Basic Intensity Transformation Functions ❖Power-Law (Gamma) Transformations Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). (a) Image of a human retina. (b) Image as as it appears on a monitor with a gamma setting of 2.5 (note the darkness). (c) Gammacorrected image. (d) Corrected image, as it appears on the same monitor (compare with the original image). (Image (a) courtesy of the National Eye Institute, NIH)
  • 12. 12 2. Some Basic Intensity Transformation Functions ❖Power-Law (Gamma) Transformations ➢Contrast enhancement using power-law intensity transformations. Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). a) Magnetic resonance image (MRI) of a fractured human spine (the region of the fracture is enclosed by the circle). (b)–(d) Results of applying the transformation in Eq. (3-5) with and and 0.3, respectively. (Original image courtesy of Dr. David R. Pickens, Department of Radiology and Radiological Sciences, Vanderbilt University Medical Center.)
  • 13. 13 2. Some Basic Intensity Transformation Functions ❖Power-Law (Gamma) Transformations ➢Another illustration of power-law transformations. Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). (a) Aerial image. (b)–(d) Results of applying the transformation in Eq. (3-5) with  = 3.0, 4.0 and 5.0, respectively. (c = 1 in all cases.) (Original image courtesy of NASA.)
  • 14. 14 2. Some Basic Intensity Transformation Functions ❖Piecewise Linear Transformation Functions ➢Contrast Stretching Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). where rmin and rmax denote the minimum and maximum intensity levels in the input image, respectively where m is the mean intensity level in the image
  • 15. 15 2. Some Basic Intensity Transformation Functions ❖Piecewise Linear Transformation Functions ➢Intensity-Level Slicing Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). Figure 1: (a) This transformation function highlights range [A, B] and reduces all other intensities to a lower level. (b) This function highlights range [A, B] and leaves other intensities unchanged. Figure 2: (a) Aortic angiogram. (b) Result of using a slicing transformation of the type illustrated in Fig. 1(a) , with the range of intensities of interest selected in the upper end of the gray scale. (c) Result of using the transformation in Fig. 1(b) , with the selected range set near black, so that the grays in the area of the blood vessels and kidneys were preserved. (Original image courtesy of Dr. Thomas R. Gest, University of Michigan Medical School.)
  • 16. 16 2. Some Basic Intensity Transformation Functions ❖Piecewise Linear Transformation Functions ➢Bit-Plane Slicing Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). Bit-planes of an 8-bit image.
  • 17. 17 2. Some Basic Intensity Transformation Functions ❖Piecewise Linear Transformation Functions ➢Bit-Plane Slicing Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). (a) An 8-bit gray-scale image of size pixels. (b) through (i) Bit planes 8 through 1, respectively, where plane 1 contains the least significant bit. Each bit plane is a binary image. Figure (a) is an SEM image of a trophozoite that causes a disease called giardiasis. (Courtesy of Dr. Stan Erlandsen, U.S. Center for Disease Control and Prevention.)
  • 18. 18 2. Some Basic Intensity Transformation Functions ❖Piecewise Linear Transformation Functions ➢Bit-Plane Slicing Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). Image reconstructed from bit planes: (a) 8 and 7; (b) 8, 7, and 6; (c) 8, 7, 6, and 5.
  • 19. 19 Chapter 3. Intensity Transformations and Spatial Filtering 1. Background 2. Some Basic Intensity Transformation Functions 3. Histogram Processing 4. Fundamentals of Spatial Filtering 5. Smoothing (Lowpass) Spatial Filters 6. Sharpening (Highpass) Spatial Filters 7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters 8. Combining Spatial Enhancement Methods Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 20. 20 3. Histogram Processing ❖Histogram ➢The unnormalized histogram: Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). where rk is the k-th intensity level of an L-level digital image f(x, y); nk is the number of pixels in f with intensity rk and the subdivisions of the intensity scale are called histogram bins.
  • 21. 21 3. Histogram Processing ❖Histogram ➢The normalized histogram: Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). where M and N are the number of image rows and columns, respectively. ෍ 𝑘=1 𝐿−1 𝑝 𝑟𝑘 = 1
  • 22. 22 3. Histogram Processing ❖Histogram Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). Four image types and their corresponding histograms. (a) dark; (b) light; (c) low contrast; (d) high contrast. The horizontal axis of the histograms are values of rk and the vertical axis are values of p(rk) .
  • 23. 30 3. Histogram Processing ❖Histogram Equalization ➢The probability of occurrence of intensity level in a digital image is approximated by where MN is the total number of pixels in the image, and nk denotes the number of pixels that have intensity rk. Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). a histogram equalization or histogram linearization transformation ➢The discrete form of the transformation function is
  • 24. 31 3. Histogram Processing ❖Histogram Equalization ➢Example: Illustration of the mechanics of histogram equalization. • Suppose that a 3-bit image (L = 3) of size 64x64 pixels (MN = 4096) has the intensity distribution in Table Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 25. 32 3. Histogram Processing ❖Histogram Equalization ➢Example: Illustration of the mechanics of histogram equalization. Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). We round them to their nearest integer values in the range [0, 7]: The values of the equalized histogram.
  • 26. 33 3. Histogram Processing ❖Histogram Equalization ➢Example: Illustration of the mechanics of histogram equalization. Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). Histogram equalization. (a) Original histogram. (b) Transformation function. (c) Equalized histogram.
  • 27. 34 3. Histogram Processing ❖Histogram Equalization ➢Algorithm for Histogram Equalization Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 28. 35 3. Histogram Processing ❖Histogram Equalization Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). Histogram- equalized images Source images Histogram Histogram- equalized images Source images Histogram
  • 29. 37 3. Histogram Processing ❖Histogram Equalization Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). (a) Image from Phoenix Lander. (b) Result of histogram equalization. (c) Histogram of image (a). (d) Histogram of image (b). (Original image courtesy of NASA.)
  • 30. 39 Chapter 3. Intensity Transformations and Spatial Filtering 1. Background 2. Some Basic Intensity Transformation Functions 3. Histogram Processing 4. Fundamentals of Spatial Filtering 5. Smoothing (Lowpass) Spatial Filters 6. Sharpening (Highpass) Spatial Filters 7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters 8. Combining Spatial Enhancement Methods Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 31. 40 4. Fundamentals of Spatial Filtering ❖The Mechanics of Linear Spatial Filtering ➢Spatial filter kernel: filter kernel, kernel, mask, template, and window ➢Linear spatial filtering Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 32. 41 4. Fundamentals of Spatial Filtering ❖Spatial Correlation and Convolution ➢1-D illustration Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 33. 42 4. Fundamentals of Spatial Filtering ❖Spatial Correlation and Convolution ➢2-D illustration Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). ➢Correlation ➢Convolution
  • 34. 43 4. Fundamentals of Spatial Filtering ❖Spatial Correlation and Convolution Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 35. 44 Chapter 3. Intensity Transformations and Spatial Filtering 1. Background 2. Some Basic Intensity Transformation Functions 3. Histogram Processing 4. Fundamentals of Spatial Filtering 5. Smoothing (Lowpass) Spatial Filters 6. Sharpening (Highpass) Spatial Filters 7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters 8. Combining Spatial Enhancement Methods Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 36. 45 5. Smoothing (Lowpass) Spatial Filters ➢Smoothing (also called averaging) spatial filters are used to reduce sharp transitions in intensity. ➢Application: noise reduction, reduce aliasing, reduce irrelevant detail in an image, smoothing the false contours, … ➢Linear spatial filtering ➢Nonlinear smoothing filters Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 37. 46 5. Smoothing (Lowpass) Spatial Filters ❖Box Filter Kernels Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 38. 47 5. Smoothing (Lowpass) Spatial Filters ❖Box Filter Kernels ➢Example: Lowpass filtering with a box kernel Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). (a) Test pattern of size 1024x1024 pixels. (b)-(d) Results of lowpass filtering with box kernels of sizes 3x3, 11x11, and 21x21 respectively.
  • 39. 48 5. Smoothing (Lowpass) Spatial Filters ❖Lowpass Gaussian Filter Kernels ➢Gaussian kernels of the form Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). Distances from the center for various sizes of square kernels.
  • 40. 49 5. Smoothing (Lowpass) Spatial Filters ❖Lowpass Gaussian Filter Kernels Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). (a) Sampling a Gaussian function to obtain a discrete Gaussian kernel. The values shown are for K = 1 and  = 1. (b) Resulting kernel.
  • 41. 50 5. Smoothing (Lowpass) Spatial Filters ❖Lowpass Gaussian Filter Kernels ➢Example: Lowpass filtering with a Gaussian kernel Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). (a)A test pattern of size 1024x1024. (b) Result of lowpass filtering the pattern with a Gaussian kernel of size 21x21, with standard deviations  = 3.5. (c) Result of using a kernel of size 43x43, with  = 7. We used K = 1 in all cases.
  • 42. 51 5. Smoothing (Lowpass) Spatial Filters ❖Lowpass Gaussian Filter Kernels ➢Example: Lowpass filtering with a Gaussian kernel Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). (a) Result of filtering using a Gaussian kernels of size43x43, with  = 7. (b) Result of using a kernel of 85x85, with the same value of . (c) Difference image.
  • 43. 52 5. Smoothing (Lowpass) Spatial Filters ➢Example: Comparison of Gaussian and box filter smoothing characteristics. Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 44. 53 5. Smoothing (Lowpass) Spatial Filters ➢Example: Using lowpass filtering and thresholding for region extraction. Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 45. 54 5. Smoothing (Lowpass) Spatial Filters ❖Order-Statistic (Nonlinear) Filters ➢Median filter: replaces the value of the center pixel by the median of the intensity values in the neighborhood of that pixel →Effective in the presence of impulse noise (salt-and-pepper noise) →The 50th percentile of a ranked set of numbers ➢Max filter: →Finding the brightest points in an image or for eroding dark areas adjacent to light regions →The 100th percentile filter Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 46. 55 5. Smoothing (Lowpass) Spatial Filters ❖Order-Statistic (Nonlinear) Filters ➢Min filter: →used for the opposite purpose →The 0th percentile filter Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 47. 56 5. Smoothing (Lowpass) Spatial Filters ❖Order-Statistic (Nonlinear) Filters ➢Example: Median filtering Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 48. 57 Chapter 3. Intensity Transformations and Spatial Filtering 1. Background 2. Some Basic Intensity Transformation Functions 3. Histogram Processing 4. Fundamentals of Spatial Filtering 5. Smoothing (Lowpass) Spatial Filters 6. Sharpening (Highpass) Spatial Filters 7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters 8. Combining Spatial Enhancement Methods Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 49. 58 6. Sharpening (Highpass) Spatial Filters ❖Foundation ➢First-order derivative Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). ➢Second-order derivative
  • 50. 59 6. Sharpening (Highpass) Spatial Filters ❖Image Sharpening—the Laplacian ➢Laplacian Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 51. 60 6. Sharpening (Highpass) Spatial Filters ❖Image Sharpening—the Laplacian ➢Laplacian kernel Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 52. 61 6. Sharpening (Highpass) Spatial Filters ❖Image Sharpening—the Laplacian ➢The basic way in which the Laplacian is used for image sharpening: ▪ c = 1 if the center element of the Laplacian kernel is positive ▪ c = -1 if the center element of the Laplacian kernel is negative Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 53. 62 6. Sharpening (Highpass) Spatial Filters ❖Image Sharpening—the Laplacian ➢Example: Image sharpening using the Laplacian Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). a) Blurred image of the North Pole of the moon. (b) Laplacian image obtained using the kernel in Fig. 3.51(a). (c) Image sharpened using Eq. (3-63) with c = -1. (d) Image sharpened using the same procedure, but with the kernel in Fig. 3.51(b). (Original image courtesy of NASA.)
  • 54. 63 6. Sharpening (Highpass) Spatial Filters ❖Unsharp Masking and Highboost Filtering ➢Unsharp masking ▪ Blur the original image ▪ Subtract the blurred image from the original (the resulting difference is called the mask) ▪ Add the mask to the original Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). blurred image ▪ When k = 1 → unsharp masking ▪ When k > 1 → highboost filtering ▪ When 0  k < 1 → reduces the contribution of the unsharp mask
  • 55. 64 6. Sharpening (Highpass) Spatial Filters ❖Unsharp Masking and Highboost Filtering Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 1-D illustration of the mechanics of unsharp masking. (a) Original signal. (b) Blurred signal with original shown dashed for reference. (c) Unsharp mask. (d) Sharpened signal, obtained by adding (c) to (a).
  • 56. 65 6. Sharpening (Highpass) Spatial Filters ❖Unsharp Masking and Highboost Filtering Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). (a) Unretouched “soft-tone” digital image of size 469x600 pixels. (b) Image blurred using a 31x31 Gaussian lowpass filter with  = 5. (c) Mask. (d) Result of unsharp masking using Eq. (3-65) with k = 1. (e) and (f) Results of highboost filtering with k = 2 and k = 3 respectively.
  • 57. 66 6. Sharpening (Highpass) Spatial Filters ❖Image Sharpening—the Gradient ➢The gradient of an image f at coordinates (x, y) Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). ➢The magnitude (length) of vector f
  • 58. 67 6. Sharpening (Highpass) Spatial Filters ❖Image Sharpening—the Gradient ➢Roberts cross-gradient operators Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 59. 68 6. Sharpening (Highpass) Spatial Filters ❖Image Sharpening—the Gradient ➢Sobel operators Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 60. 69 6. Sharpening (Highpass) Spatial Filters ❖Image Sharpening—the Gradient ➢Filter masks Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). (a) A 3x3 region of an image, where the zs are intensity values. (b)–(c) Roberts cross-gradient operators. (d)–(e) Sobel operators. All the kernel coefficients sum to zero, as expected of a derivative operator.
  • 61. 70 6. Sharpening (Highpass) Spatial Filters ❖Image Sharpening—the Gradient ➢Example: Using the gradient for edge enhancement. Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). (a) Image of a contact lens (note defects on the boundary at 4 and 5 o’clock). (b) Sobel gradient. (Original image courtesy of Perceptics Corporation.)
  • 62. 71 Chapter 3. Intensity Transformations and Spatial Filtering 1. Background 2. Some Basic Intensity Transformation Functions 3. Histogram Processing 4. Fundamentals of Spatial Filtering 5. Smoothing (Lowpass) Spatial Filters 6. Sharpening (Highpass) Spatial Filters 7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters 8. Combining Spatial Enhancement Methods Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 63. 72 7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters ❖Transfer functions of ideal 1-D filters Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). Transfer functions of ideal 1-D filters in the frequency domain (u denotes frequency). (a) Lowpass filter. (b) Highpass filter. (c) Bandreject filter. (d) Bandpass filter. (As before, we show only positive frequencies for simplicity.)
  • 64. 73 7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters ❖Transfer functions of ideal 1-D filters Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 65. 74 7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters ❖Transfer functions of ideal 1-D filters Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). A zone plate image of size 597x597 pixels (a) A 1-D spatial lowpass filter function. (b) 2-D kernel obtained by rotating the 1-D profile about its center.
  • 66. 75 7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters ❖Transfer functions of ideal 1-D filters Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). (a) Zone plate image filtered with a separable lowpass kernel. (b) Image filtered with the isotropic lowpass kernel in Fig. 3.60(b).
  • 67. 76 7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters ❖Transfer functions of ideal 1-D filters Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). Spatial filtering of the zone plate image. (a) Lowpass result; this is the same as Fig. 3.61(b) . (b) Highpass result. (c) Image (b) with intensities scaled. (d) Bandreject result. (e) Bandpass result. (f) Image (e) with intensities scaled.
  • 68. 77 Chapter 3. Intensity Transformations and Spatial Filtering 1. Background 2. Some Basic Intensity Transformation Functions 3. Histogram Processing 4. Fundamentals of Spatial Filtering 5. Smoothing (Lowpass) Spatial Filters 6. Sharpening (Highpass) Spatial Filters 7. Highpass, Bandreject, and Bandpass Filters from Lowpass Filters 8. Combining Spatial Enhancement Methods Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018).
  • 69. 78 8. Combining Spatial Enhancement Methods Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). ➢ Laplacian is superior for enhancing fine detail. ➢ The gradient has a stronger response in areas of significant intensity transitions (ramps and steps). (a) Image of whole body bone scan. (b) Laplacian of (a). (c) Sharpened image obtained by adding (a) and (b). (d) Sobel gradient of image (a). (Original image courtesy of G.E. Medical Systems.)
  • 70. 79 8. Combining Spatial Enhancement Methods Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). (e) Sobel image smoothed with a 3x3 box filter. (f) Mask image formed by the product of (b) and (e). (g) Sharpened image obtained by the adding images (a) and (f). (h) Final result obtained by applying a power-law transformation to (g). Compare images (g) and (h) with (a). (Original image courtesy of G.E. Medical Systems.)