Artigo 3 Porosidade
Artigo 3 Porosidade
57 (2017),
ISIJ International,
No. 6 Vol. 57 (2017), No. 6, pp. 1045–1053
Doo-chul CHOI,1) Yong-Ju JEON,1) Seung Hun KIM,1) Seokbae MOON,1) Jong Pil YUN2) and Sang Woo KIM1,3)*
1) Department of Electrical Engineering, Pohang University of Science and Technology (POSTECH), Pohang, 37673 South
Korea. 2) Aircraft System Technology Group, Korea Institute of Industrial Technology (KITECH), Daegu, 42994 South
Korea. 3) Department of Creative IT Engineering, Pohang University of Science and Technology (POSTECH), Pohang,
37673 South Korea.
(Received on April 6, 2016; accepted on March 9, 2017)
In this paper, an algorithm for detecting pinholes was proposed. Pinholes are very tiny holes generated
in the surfaces of scarfed slabs. To detect various sizes of pinholes, the Gabor filter combination was
applied. A new image segmentation method was proposed in pre-processing. To reduce the number of
pseudo-defects, dual thresholding method was used. We have increased the performance of classification
by adding new morphological features to general texture based features. To evaluate the performance of
proposed algorithm, an images obtained in real production line were used.
KEY WORDS: quality control; machine vision; surface inspection; defect detection; Gabor filter.
been extensively studied in the field of visual inspection. system. To develop an algorithm for detecting defects in
Kumar and Pang13) developed a defect detection algorithm the surface of steel products, it is very important to acquire
for fabric using real Gabor functions. Later, in their study,14) high-quality images of the surface. Therefore, to obtain an
the same authors used Gabor wavelet features to classify image of the surface, four camera/lighting modules were set
fabric defects. They also developed a defect detection sys- up on each side of a slab to capture images of its upper and
tem using only the imaginary part of the Gabor function as lower sides, so that eight images, four per side, are acquired
an edge detector. Bodnarova et al.15) proposed applying a from the frame grabbers. Four dual-core PCs operate the
Fisher cost function to select a subset of Gabor functions detection algorithm for two neighboring images, one image
based on the mean and standard deviation of the template per core. The surface images and detection results are trans-
feature images to perform textile flaw detection. Tsai et mitted to the server/monitoring system. The information of
al.16) used a single Gabor filter for multiple texture seg- the defect’s size and location is displayed on the monitor
mentation using a systematic optimization algorithm. Later in real time, and the images of the steel slabs and detection
Tsai and Lin17) developed a fast defect detection algorithm results are stored on the server.
for textured surfaces using 1D Gabor filters. Further, Tsai It is important to acquire the uniform-quality images of
and Wu18) also used Gabor filter selection so that the filter the slabs surfaces. Because it is difficult to achieve uniform
response energy of the normal texture was close to zero. illumination of the slab surface, a line-scan camera was
Yun et al.9) proposed an algorithm using a Gabor filter for used instead of an area-scan camera, which has disadvan-
detecting cracks in raw steel block. The parameters of the tages, such as blurring, distortion, lighting problems, and
Gabor filter were optimized by using an univariate dynamic the restriction of the inspection range.20) Line-scan cameras
encoding algorithm for searches (uDEAS). scan one line each time the slab is moved 0.25 mm along
In this paper, a new approach using Gabor filters is a direction. Therefore, 40 000–60 000 lines are obtained
introduced. In order to detect various sizes of defects in from a 10–15 m long steel slab. One frame image from the
the surfaces of steel products, filter combination method is frame grabber consists of 1 000 lines and each line consists
developed. Gabor filter combination method combines two of 4 096 pixels. The vertical resolution of one frame image
Gabor filtered-image based on the responses of two single is about 0.25 mm/pixel. Typically, images of a slab are
Gabor filters that are designed to detect various sizes of composed of 40–60 frames with a resolution of 4 096 pix-
defects.19) We have proposed dual thresholding method to els × 1 000 pixels. To obtain an image of the surface, the
reduce the number of defect candidates. To verify the per- lighting is directed such that it illuminates the slab surface
formance of the proposed method, it was evaluated using at an angle of 45 degrees. Moreover, we used a horizontal
artificial pinhole defects. array of LEDs as the lighting source to provide uniform
Using the proposed Gabor filter combination, a defect brightness of one scan line. One frame image of a slab is
detection algorithm for pinholes, which are very fine holes shown in Fig. 2.
in the surfaces of slabs, was developed. A Gabor filter com-
bination method is required because the sizes of the pinholes
vary between 1 mm and 5 mm. The experimental results
show that the Gabor filter is suitable for detecting pinholes.
2. System Configuration and Image Analysis
2.1. System Configuration
We developed an automatic inspection system (Fig. 1)
that consists of four components: camera/lighting modules,
Fig. 2. One frame image of a scarfed slab with an enlarged pin-
frame grabbers, dual-core PCs, and a server/monitoring hole. (Online version in color.)
3. Gabor Function and Filter Combination
3.1. Gabor Function
Fig. 3. Difference sizes of pinholes. The Gabor function has been widely used in image
processing, in particular, for texture analysis and defect
detection, owing to its ability to extract characteristics in a
specific scale and orientation. Since Gabor21) proposed the
2.2. Image Analysis 1-D Gabor function in 1946, many studies in which it was
In this study, the detection targets are pinholes that utilized were reported. The 2-D Gabor function was pro-
exist in the surface of scarfed slabs. As mentioned, steel posed by Daugman, based on our understanding of the scale
slabs are half-finished products from which steel sheets for and orientation-selective properties of neurons in the brain’s
automobiles are produced. These steel sheets should meet visual cortex, and was mathematically completed in.22)
high-quality requirements; otherwise, defects in the surface The 2-D Gabor function is a sinusoidal plane wave of
of slabs degrade the quality of the end products. Steel slabs specific frequency and orientation with a Gaussian enve-
used to produce steel sheets are passed through a scarfing lope. It consists of a complex-valued sinusoidal function
process. Defect detection in steel slabs should be performed and a Gaussian function. The frequency spectrum of the
to guarantee the quality of the steel sheets and to decrease Gabor function is the Gaussian function shifted by a given
manufacturing costs. frequency and orientation.23) The 2-D Gabor function is
A pinhole is a tiny circular defect that exists in the surface
of slabs after the scarfing process. The diameter of a pinhole 1 1 x2 y2
f ( x, y ) = exp − 2 + 2 exp ( 2π juo x ) ... (1)
is typically 1–5 mm. Pinholes are formed in the surface of 2πσ xσ y 2 σ x σ y
slabs because of gas bubbles generated by impurities that
are injected during the steel making process. Because the The 2-D Gabor function is divided into real and imagi-
scarfed slab’s surface is not uniform and pinholes are very nary parts. The real part of the Gabor function is well known
small, it is difficult to detect them. Moreover, many noise as a blob detector, and the imaginary part is well known as
components are also present on a scarfed slab surface; an edge detector.24) In this study, because the intensity char-
hence, it is hard to identify pinholes, even with the naked acteristics of pinholes are similar to those of edge elements,
eye. the imaginary part of the Gabor function is used to detect
The feature of a defect in an image is determined by pinholes in the surface of the steel slab. The general equa-
two elements: its geometrical shape, and the angle between tion of the imaginary part of the Gabor function is given as
the lighting source and the camera. Because the surface is
illuminated by light directed at an angle of 45 degrees, a 1 x ′ 2 y′ 2
1
shaded region appears at the floor of a pinhole, whereas, g ( x, y ) = exp − + sin ( 2π fx ′ )
because the light is projected and reflected at the upper edge 2πσ xσ y 2 σ x σ y
of a pinhole, a bright area appears in that region. Thus, the .......................................... (2)
image of a pinhole has a vertically bright and dark intensity
profile, as shown in Fig. 3. where
As mentioned above, pinholes are very small defects, and
x ′ = xcosθ + ysinθ
many noise components which have similar characteristics
to pinholes exist on the surface of slabs. However, a pinhole
y′ = − xsinθ + ycosθ
has a vertically bright and dark profile and its shape is cir-
cular, and thus, these are the major features that are used to The parameters of the 2-D Gabor function are f, θ, σx and
distinguish pinholes from noise components. We designed σy. Parameter f represents the frequency of the sinusoidal
a Gabor filter using a filter combination method based on function and θ denotes the orientation of the sinusoidal
these characteristics. After Gabor filtering, an adaptive function. σx and σy are the constants of the Gaussian enve-
thresholding method using a vertical standard deviation lopes along the x and y-axis, respectively.
profile is applied. To identify defects among the defect can-
didates, morphological features are extracted and an support 3.2. Filter Combination
vector machine (SVM) is applied for classification. The parameters of the Gabor filter are determined by the
size and direction of a defect. Therefore, a single Gabor
filter cannot guarantee a good performance in the case of
defects with various sizes. In this paper, a Gabor filter
combination method is proposed to detect various sizes of
defects in steel surfaces. In the Gabor filter combination, a defects. Figure 4 shows artificial pinholes of different sizes.
convex combination of two Gabor filtered images is applied We compared a single Gabor filter and the filter combination
as follows. in the case of a pinhole. Different sizes of pinholes can exist
in one frame image, and therefore, a selection method is
G ( x, y ) = α ( x, y ) × G1 ( x, y ) + (1 − α ( x, y ) ) × G2 ( x, y ) ... (3)
ineffective. The resultant images of the single Gabor filters
To evaluate the performance of the proposed method, and the filter combination are shown in Fig. 5. The images
we compared three methods: combination, averaging, and shown in Figs. 5(a) and 5(b) are the responses of two Gabor
selection. First, the combination method is the proposed filters designed to detect small and large pinholes, respec-
method. Second, averaging the responses of Gabor-filtered tively. In Fig. 5(a), it can be seen that the response of a large
images is not expected to yield a good performance as pinhole is as high as that of a small pinhole; however, the
compared to that of a single Gabor filter with appropriate response area of the Gabor filter is small as compared with
parameters. Third, a problem arises selection occurs in case pinhole’s size. For this reason, this Gabor filter is designed
of various sizes defect in one frame image. In this study, to detect small pinholes. On the other hand, the response
we evaluated the Gabor filter combination method using for a small pinhole is low in the case of the second Gabor
pinholes of various sizes. filter, as shown in Fig. 5(b). These results show that the
We tested the proposed algorithm using artificial pinhole Gabor filter combination effectively detects small and large
pinholes, as shown in Fig. 5(c). High responses and proper
response areas are obtained.
To evaluate the performance of the Gabor filter combina-
tion in detail, we obtained the vertical and horizontal pro-
files, marked as dotted lines in Figs. 5(a), 5(b), and 5(c). The
vertical and horizontal profiles are shown in Fig. 6. Gabor
1 and Gabor 2 denote the Gabor filters for small and large
pinholes, respectively. In the profiles of the horizontal direc-
tion, as shown in Fig. 6(a), and vertical profiles, as shown in
Fig. 6(b), the profiles of Gabor 1 and the filter combination
are suitable for detecting pinholes. In the vertical profiles as
shown in Fig. 6(c), however, the filter combination shows a
better performance than Gabor 1 in terms of region detec-
tion. Because the profile width of the filter combination is
wider than that of Gabor 1, the filter combination can detect
a closer size of a defect compared to Gabor 1 when binariz-
ing with same value.
We evaluated the performance of the Gabor filter combi-
Fig. 5. Resultant images of (a) the Gabor filter designed to detect
nation method using pinholes. To evaluate the performance
small pinhole, (b) the Gabor filter designed detect large
pinhole, and (c) the filter combination. of the proposed method, artificial defects were used. The
results verify that the proposed method is effective for
detecting various sizes of pinholes.
4. Proposed Algorithm
4.1. Preposcessing
In this inspection system, four images of each side to the
slab were obtained. In the images of the left and right edge
of a slab, there exists a background region that has no gray-
level information. To reduce unnecessary computational
cost, the background region should be removed by using
a segmentation process. Owing to the lighting condition in
the real field, the gray-values of the background are not near
zero, as shown in the left region in Fig. 7(a). Therefore, the
left part in the vertical projection profile, as shown in the
blue profile (Fig. 7(b)), is not zero. These non-zero gray
values lead to segmentation failure. To solve this problem,
we focused on using line-scan cameras. A line-scan camera
scans one line of a slab’s surface at every movement of the
slab, whereas the background region captured by the cam-
era remains fixed. Therefore, the standard deviation along
the vertical direction should be low, as shown in the red
profile in Fig. 7(b). In the case of uniform surface with low
Fig. 6. Profiles of (a) horizontal, (b) vertical 1, and (c) vertical 2. gray values or when some particles exist in the background
(Online version in color.) region, the standard deviation becomes large. To take
Fig. 7. (a) Slab image with background; (b) vertical projection profile and vertical standard deviation profile; (c) product
of the two profiles. (Online version in color.)
advantage of both profiles, we applied the product form of Table 1. Parameters of the two Gabor filters.
two profiles, as shown in Fig. 7(c). The profile is defined as Filter f θ σx σy
the product of the vertical projection profile M(x) and verti-
g1(x,y) 1/8 π/2 4 8
cal standard deviation profile S(x) as follows.
g 2(x,y) 1/16 π/2 8 16
P ( x ) = M ( x ) S ( x ) .......................... (4)
where
1
M ( x) = ∑ I ( x, y ) ....................... (5)
N
N y =1
1
S ( x) = ∑ I 2 ( x, y ) − M 2 ( x, y ) ............ (6)
N
N y =1
4.2. Gabor Filter Combination
The pinhole has a bright and dark intensity profile along
the vertical direction. Therefore, Gabor sine filters were
used based on the characteristic of a pinhole. As mentioned,
to detect various sizes of pinhole, a combination of two Fig. 8. (a) Response image of Gabor filter combination; (b) a 3-D
Gabor filters is applied. Because various sizes of pinholes profile of (a). (Online version in color.)
can exist in one frame image, a filter selection method is
ineffective, while averaging the responses of Gabor filtered
images provides a low performance. Gabor-filtered output
images were obtained by following a convolution operation. the Gabor-filtered image is determined by four parameters.
Therefore, the parameters should be selected on the basis of
Gi ( x, y ) = I seg ( x, y ) * gi ( x, y ) the diameter and orientation of the pinholes. The parameters
...... (7)
= ∑ m = 0 ∑ n = 0 gi ( x, y ) T ( x − m, y − n )
M −1 N −1 of the Gabor filters are listed in Table 1. Gi(x,y) are the
Gabor-filtered images using gi(x,y), and Iseg(x,y) is an image
after segmentation.
where i = 1, 2, and gi(x,y) are Gabor filters. The response of The response of the Gabor filter combination is obtained
Fig. 9. Pseudo-defects in the surface of the slab (a) powders of Fig. 11. (a) Response image after diving the Sg (x,y); (b) a 3-D
melted steel, (b) stab marks, and (c) white spots. profile of (a). (Online version in color.)
Fig. 10. A vertical standard deviation profile and the profile after smoothing. (Online version in color.)
Fig. 13. (a) Defect candidate; (b) defect model; (c) orientation and
distance.
of a pinhole. Pinholes have intensity profiles that are verti- Table 2. Experimental results using SVM.
cally bright and dark; hence, it is essential to determine the Training Validation
locations of the bright and dark regions. In the gray image
defect pesudo-defect defect pseudo-defect
of a defect candidate, we note five features: the score of the
mask, orientation, relative distance, cohesiveness, and gray- General
120/120 5 408/5 527 42/52 2 306/2 369
features
value distance. To calculate these features, the gray image
should be divided into bright and dark regions. First, a (100.00%) (97.85%) (80.77%) (97.34%)
normalized defect candidate image Cnor(x,y) is calculated as + morpological
120/120 5 461/5 527 50/52 2 338/2 369
features
Cnor ( x, y ) = C ( c, y ) − mean {I seg ( x, y )} ......... (14)
(100.00%) (98.81%) (96.15%) (98.69%)
A bright region is defined as a region where the gray val-
ues of a normalized defect candidate image are greater than
half its maximum value. Likewise, a dark region is defined
as a region where the gray values of a normalized defect
( xhigh − xlow ) + ( yhigh − ylow )
2 2
candidate image are lower than half its minimum value.
dr = ........... (19)
Using Cnor(x,y), the bright and dark regions are obtained as
WH
Cnor ( x, y ) , if Cnor ( x, y ) > 0.5max {Cnor ( x, y )}
Cb ( x, y ) =
4.4.4. Cohesiveness
0, else
Cohesiveness refers to the level of cohesiveness of the
........................................ (15)
bright and dark region.