Lesson "Machine Vision" Chapter 6 - Image Segmentation, compiled including the following main contents: Fundamentals; Point, Line, and Edge Detection; Thresholding; Image Segmentation Using Deep Learning.
AMBIENT/
Chủ đề:
Nội dung Text: Lesson Machine Vision: Chapter 6 - TS. Nguyen Thanh Hung
- TRƯỜNG ĐẠI HỌC BÁCH KHOA HÀ NỘI
XỬ LÝ ẢNH TRONG CƠ ĐIỆN TỬ
Machine Vision
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 1
- Chapter 6. Image Segmentation
1. Fundamentals
2. Point, Line, and Edge Detection
3. Thresholding
4. Image Segmentation Using Deep Learning
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 2
- 1. Fundamentals
➢ Let R represent the entire spatial region occupied by an image. We may view
image segmentation as a process that partitions R into n subregions, R1, R2, …,
Rn, such that:
where Q(Rk) is a logical predicate defined over the points in set Rk and is the null
set.
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 3
- 1. Fundamentals
➢ Two regions Ri and Rj are said to be adjacent if their union forms a connected
set.
➢ The regions are said to disjoint If the set formed by the union of two regions is
not connected.
➢ The fundamental problem in segmentation is to partition an image into regions
that satisfy the preceding conditions.
➢ Segmentation algorithms for monochrome images generally are based on one
of two basic categories dealing with properties of intensity values: discontinuity
and similarity.
▪ Edge-based segmentation
▪ Region-base segmentation
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 4
- 1. Fundamentals
(a) Image of a constant intensity region. (b) Boundary based on intensity discontinuities. (c) Result of
segmentation. (d) Image of a texture region. (e) Result of intensity discontinuity computations (note
the large number of small edges). (f) Result of segmentation based on region properties.
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 5
- 1. Fundamentals
❖ Traditional Image Segmentation techniques
6
- Chapter 6. Image Segmentation
1. Fundamentals
2. Point, Line, and Edge Detection
3. Thresholding
4. Image Segmentation Using Deep Learning
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 7
- 2. Point, Line, and Edge Detection
➢ Detecting sharp, local changes in intensity
➢ The three types of image characteristics: isolated points, lines, and edges
➢ Edge pixels: the intensity of an image changes abruptly
➢ Edges (or edge segments): sets of connected edge pixels
➢ Edge detectors: local image processing tools designed to detect edge pixels
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 8
- 2. Point, Line, and Edge Detection
➢ A line:
▪ a (typically) thin edge segment
▪ the intensity of the background on either side of the line is either much higher
or much lower than the intensity of the line pixels.
▪ “roof edges”
➢ Isolated point: a foreground (background) pixel surrounded by background
(foreground) pixels.
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 9
- 2. Point, Line, and Edge Detection
❖ Background
➢ an approximation to the first-order derivative at an arbitrary point x of a one-
dimensional function f(x)
x = 1 for the sample preceding x and x = -1 for the sample following x.
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 10
- 2. Point, Line, and Edge Detection
❖ Background
➢ an approximation to the first-order derivative at an arbitrary point x of a one-
dimensional function f(x)
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 11
- 2. Point, Line, and Edge Detection
❖ Background
➢ The forward difference
➢ The backward difference
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 12
- 2. Point, Line, and Edge Detection
❖ Background
➢ The central difference
➢ The second order derivative based on a central difference
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 13
- 2. Point, Line, and Edge Detection
❖ Background
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 14
- 2. Point, Line, and Edge Detection
❖ Background
➢ For two variables
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 15
- 2. Point, Line, and Edge Detection
❖ Background
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 16
- 2. Point, Line, and Edge Detection
❖ Background
➢ Spatial filter kernel
Where zk is the intensity of the pixel whose spatial location
corresponds to the location of the kth kernel coefficient.
A general 3x3 spatial filter kernel. The
w’s are the kernel coefficients (weights).
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 17
- 2. Point, Line, and Edge Detection
❖ Detection of Isolated Points
➢ Laplacian
➢ Detected points
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 18
- 2. Point, Line, and Edge Detection
❖ Detection of Isolated Points
➢ Example
(a) Laplacian kernel used for point detection. (b) X-ray image of a turbine blade with a porosity manifested
by a single black pixel. (c) Result of convolving the kernel with the image. (d) Result of using Eq. (10-15)
was a single point (shown enlarged at the tip of the arrow).
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 19
- 2. Point, Line, and Edge Detection
❖ Line Detection
➢ EXAMPLE: Using the Laplacian for line detection.
(a) Original image. (b) Laplacian image; the magnified section shows the positive/negative double-line effect
characteristic of the Laplacian. (c) Absolute value of the Laplacian. (d) Positive values of the Laplacian.
Rafael C. Gonzalez, Richard E. Woods, “Digital image processing,” Pearson (2018). 20