Graphics Reference
In-Depth Information
3
Defect Detection
The process of defect detection is divided into training phase and detection phase.
3.1
Training Phase
Select a defect-free image whose texture is as same as the sample detected. At first the
entire defect-free image is disposed by LBP operator, and a P +2 dimensional feature
vector M can be got. In other words, M is the probability of 0-P+1 occurring in the LBP
value of the entire defect-free image. Then the image is divided into several
non-overlapping windows of the size W d ×W d pixel, which are called the detection
windows. Moving step of detection windows is two pixels. The detection windows are
processed with LBP operator ( LBP mask). Thus, the feature vectors of each window
can be obtained. In order to make the results more accurate, it should ensure that the
calculated times of LBP mask in each detection window are not less than 100 times.
Suppose the size of the LBP mask is wm× wm, Wd , the size of the detection window
should satisfy the following conditions:
2
(
W
w
+
1
100
d
m
. (7)
LBP masks used in the experiments are LBP 8, 1 , LBP 16, 2 , LBP 24, 3 . The maximum of P
is 24, accordingly the maximum of w m is 7. As a result, W d should be more than 16,
namely
W .
For the next step, the similarity of S k and M is calculated with Chi-square function.
The formula is as follows:
16
d
+
=
P
1
(
S
M
)
2
L
(
S
,
M
)
=
ki
i
k
=
1
2
,...,
N
(8)
k
k
S
+
M
i
0
ki
i
Where, S ki represents the probability of i occurring in the LBP values of the k-th
detection window. M i represents the probability of i occurring in the LBP values of the
whole image. N is the number of the detection windows. L k describes the similarity of
the k-th detection window and the whole image, and the smaller the L k is, the more
similar between the k-th detection window and the whole image. Select the maximum
during the L k as the threshold used to determine the defect windows:
T
=
max(
L
),
k
=
1
2
,...,
N
. (9)
k
3.2
Detection Phase
The entire process of defect detection is expressed as follows:
 
Search WWH ::




Custom Search