数字图像处理第八章
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
17 of 59
Line Detection
R w1 z1 w2 z2 ... w9 z9 wi zi
i 1 9
18 of 59
Line Detection
19 of 59
Line Detection (cont…)
Binary image of a wire bond mask
– The segmentation problem – Points detection – Lines detection – Edges detection
3 of 59
Segmentation
The purpose of image segmentation is to partition an image into meaningful regions with respect to a particular application Segmentation should stop when the objects of interest in an application have been isolated The segmentation is based on measurements taken from the image and might be grey level, colour, texture, depth or motion
10 of 59
Detection Of Discontinuities
There are three basic types of grey level discontinuities that we tend to look for in digital images:
– Points – Lines – Edges
6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 10 11 12
0 -0.5 -1 -1.5 1 2 3 4 5 6 7 8 9 10 11 12
0 0 0 0 1 2 3 4 5 5 5 5
0 0 0 1 0 0 0 0 -1 0 0
27 of 59
Edge Detection
Conclusion: The first derivative can be used to detect the presence of an edge at a point in an image. (i.e. to determine if a point is on a ramp) Similarly, the sign of the second derivative can be used to determine whether an edge pixel lies on the dark or light side of an edge.
12 of 59
Point Detection
Point detection can be achieved simply using the mask below:
R w1 z1 w2 z2 ... w9 z9 wi zi
i 1
9
Basically, this formulation measures the weighted differences between the center point and its neighbors.
Edge Detection
21 of 59
Edge Detection
Edge and Region boundary:
22 of 59
Edge Detection
An edge is a set of connected pixels that lie on the boundary between two regions
Result of point detection
Result of thresholding
Homework: bad points detection of your LCD
16 of 59
Line Detection
The next level of complexity is to try to detect lines The masks below will extract lines that are one pixel thick and running in a particular direction
13 of 59
Point Detection (cont…)
R w1 z1 w2 z2 ... w9 z9 wi zi
i 1 9
14 of 59
Point Detection (cont…)
R w1 z1 w2 z2 ... w9 z9 wi zi
25 of 59
Spatial Differentiation
f f ( x 1) f ( x) x
1st derivative of a function:
6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 10 11 12
1.2 1 0.8 0.6 0.4 0.2 0
Digital Image Processing
Image Segmentation
Luguangm@gmail.com
2 of 59
Contents
So far we have been considering image processing techniques used to transform images for human interpretation Today we will begin looking at automated image analysis by image segmentation:
Not one pixel thick
Linedetection.m
Can be deleted by point detection
After processing with -45° line detector
Result of thresholding filtering result
20 of 59
9 of 59
Segmentation
Segmentation algorithms generally are based on of 2 basis properties of intensity values:
– Discontinuity: to partition an image based on abrupt changes in intensity (such as edges) – Similarity: to partition an image into regions that are similar according to a set of predefined criteria. Today, we will look at segmentation based on Discontinuity.
We can see how derivatives are used to find discontinuities 1st derivative tells us where an edge is 2nd derivative can be used to show edge direction
4 of 59
Segmentation
Typically it is the first step in any automated computer vision application Applications of image segmentation include
– Identifying objects in a scene for object-based measurements such as size and shape – Identifying objects in a moving scene for object-based video compression (MPEG4) – Path planning for a mobile robots
5 of 59
Segmentation
6 of 59
Segmentation
7 of 59
Segmentation
8 of 59
Segmentation
most difficult tasks in image processing.
Image segmentation is one of the
Leabharlann Baidu
Environment controllable: such as the industrial inspection applications
Sensor controllable: such as
autonomous target acquisition, or near infrared imaging Algorithm controllable
28 of 59
Edge Detection
29 of 59
Edge Detection
30 of 59
Derivatives & Noise
Derivative based edge detectors are extremely sensitive to noise
31 of 59
Derivatives & Noise
0 0 0 0 1 2 3 4 5 5 5 5
0 0 0 1 1 1 1 1 0 0 0
1
2
3
4
5
6
7
8
9
10 11 12
26 of 59
2nd Derivative
2 f f ( x 1) f ( x 1) 2 f ( x) 2 x
1.5 1 0.5
The formula for the 2nd derivative of a function is as follows:
32 of 59
Derivatives & Noise
Firstly, we discuss Gradient operators and Laplacian operators
33 of 59
Gradient Operator
The gradient vector points in the direction of maximum rate of change of f at (x,y).
i 1
9
Note: the mask response will be zero in areas of constant gray level.
15 of 59
Point Detection (cont…)
dotdetection.m
X-ray image of a turbine blade
We typically find discontinuities using masks and correlation
11 of 59
Point Detection
Isolated point: a point whose gray level is significantly different from its background and which is located in a homogeneous or nearly homogeneous area. An isolated point will be quite different from its surroundings and thus be easily detectable by using a specially mask
The reasons for blur: Optics sampling illumination conditions
23 of 59
Edge Detection (more than one pixel width)
(more than one pixel width)
24 of 59
Edges & Derivatives