Mery CrossingLineProfiles
Mery CrossingLineProfiles
Domingo Mery
1 Introduction
Shrinkage as molten metal cools during the manufacture of die castings, can
cause defect regions within the work piece. These are manifested, for example,
by bubble-shaped voids, cracks, slag formations or inclusions (see an example
in Fig. 1a). Light-alloy castings produced for the automotive industry, such as
wheel rims, steering knuckles and steering gear boxes are considered important
components for overall roadworthiness. To ensure the safety of construction, it
is necessary to check every part thoroughly. Radioscopy rapidly became the ac-
cepted way for controlling the quality of die cast pieces through computer-aided
J. Bigun and T. Gustavsson (Eds.): SCIA 2003, LNCS 2749, pp. 725−732, 2003.
Springer-Verlag Berlin Heidelberg 2003
2
726 D. Mery
analysis of X-ray images [1]. The purpose of this non-destructive testing (NDT)
method is to identify casting defects, which may be located within the piece
and thus are undetectable to the naked eye. The automated visual inspection of
castings is a quality control task to determine automatically whether a casting
complies with a given set of product and product safety specifications.
Two classes of regions are possible in a digital X-ray image of an aluminium
casting: regions belonging to regular structures of the specimen, and those re-
lating to defects. The automatic process used in fault detection in aluminium
castings consists of five steps: a) Image formation, in which an X-ray image of the
casting under test is taken and stored in the computer. b) Image pre-processing,
where the quality of the X-ray image is improved in order to enhance the details
of the X-ray image. c) Image segmentation, in which each potential flaw of the
X-ray image is found and isolated from the rest of the scene. d) Feature extrac-
tion, where the potential flaws are measured and some significant characteristics
are quantified. e) Classification, where the extracted features of each potential
flaw are analysed and assigned to one of the classes (regular structure or defect).
In an X-ray image we can see that the defects, such as voids, cracks and
bubbles (or inclusions and slags), show up as bright (or dark) features. The
reason is that the X-ray attenuation in these areas is shorter (or higher). Since
the contrast in the X-ray image between a flaw and a defect-free neighbourhood
of the specimen is distinctive, the detection is usually performed by analysing
this feature. There are several definitions of contrast, they generally give a com-
parison between the grey level of a region (potential flaw) and the grey level
of its corresponding neighbourhood (see for example [2]). Nevertheless, the last
measurement suffers from accuracy error when the neighbourhood is not ho-
a b c
d e f
Fig. 1. Detection of flaws: a) radioscopic image with a small flaw at an edge of a regular
structure, b) Laplacian-filtered image with σ = 1.25 pixels (kernel size = 11 × 11), c)
zero crossing image, d) gradient image, e) edge detection after adding high gradient
pixels, and f) detected flaw using feature F1 extracted from a crossing line profile.
Crossing Line Profile 3
727
Fig. 2. Crossing line profiles for the window shown in Fig. 1a.
4 Performance Analysis
First, we will mention the features that are extracted and analysed in this work.
The features are divided into two groups: geometric and gray value features.
Although most of the extracted features do not give any information about the
contrast, they were analysed in order to investigate if they are relevant to defect
detection.
6
730 D. Mery
The geometric features provide information about the size and the shape
of the segmented potential flaw. The extracted geometric features are: area,
perimeter, height, width, roundness [6], Hu invariant moments, Flusser and Suk
invariant moments, Fourier descriptors, and Gupta and Srinath moments [7],
semi-minor and semi-major axis of ellipse fitted to the contour of the potential
flaw [6], and Danielsson shape factor [8].
The grey value features provide information on the brightness of the seg-
mented potential flaw. In this group, the extracted features are: mean grey
value, mean gradient in the boundary, mean second derivate in the region [2],
radiographic contrasts, contrasts K and Kσ based on P0 and Pπ/2 [2], invariant
moments with grey value information [7], local variance [9], mean and range
of the 14 Haralick textural features based on the co-occurrence matrix in four
different directions taken neighbouring pixels separated by a distance of 1, 2, 3,
4, and 5 pixels [10], and finally the first 64 components of the discrete Fourier
transform, the Karhunen Loève transform and the discrete cosine transform [6]
taken from a normalised image window of 32 × 32 pixels including potential flaw
and neighbourhood.
Each feature is analysed independently using a threshold classifier. Thus, a
potential flaw is classified as regular structure if the feature is bellow a threshold,
otherwise it will be assigned to the defect class. In order to obtain the feature that
yields the best detection performance, the Receiver Operation Characteristic
(ROC) [11] curve is analysed, which is a plot of the ‘sensitivity’ (Sn) against the
‘1-specificity’ (1 − Sp) defined as:
TP FP
Sn = , 1 − Sp = , (1)
TP + FN TN + FP
where T P is the number of true positives (flaws correctly classified); T N the
number of true negatives (regular structures correctly classified); F P is the num-
ber of false positives (false alarms, i.e., regular structures classified as defects);
and F N is the number of false negatives (flaws classified as regular structures).
Ideally, Sn = 1 and 1 − Sp = 0, i.e., all flaws are detected without flagging false
alarms. The ROC curve permits to assess the detection performance at vari-
ous operating points (e.g., thresholds in the classification). The area under the
ROC curve (Az ) is normally used as performance measure because it indicates
how reliable the detection can be performed. A value of Az = 1 gives perfect
classification, whereas Az = 0.5 corresponds to random guessing.
In our experiments, 50 X-ray images of aluminium wheels were analysed.
In the segmentation 22.936 potential flaws were obtained, in which there were
60 real flaws. Some of them were existing blow holes. The other defects were
produced by drilling small holes in positions of the casting which were known to
be difficult to detect. In the performance analysis, the best result was achieved
by our feature F1 (see definition in Section 3), yielding an area Az = 0.9944. The
ROC curve of this feature and the distribution of samples for the two classes
are illustrated in Fig. 3. A detection example is shown in Fig. 1f. The results
of the top eight features are summarised in Table 1, in which the areas Az
and the specificities obtained at sensitivity levels of 100% and 95% are given.
Crossing Line Profile 7731
0 0.05
00 200 400 600
0 0.2 0.4 0.6 0.8 1
5 Concluding remarks
In this paper, a new approach to detecting defects in castings without a-priori
knowledge of the design structure is proposed. The approach is based on fea-
tures extracted from crossing line profiles, i.e., grey level profiles along lines
crossing segmented potential flaws in the middle. Several features obtained from
the crossing line profiles were suggested. The detection performance of our fea-
tures and more than 350 other features are assessed by computing the area Az
under the ROC curve. The best performance (Az = 0.9944) was achieved using
the suggested feature F1 calculated as the amplitude of the first harmonic of a
normalised crossing line profile. This means, that only 6.4 false alarms per image
are obtained in the identification of potential flaws (at Sn = 95%). By combining
more than one non-correlated a better classification can be carried out [12]. It is
known that false alarms flagged in this step can be eliminated using a posterior
analysis based on image sequence analysis without eliminating the real flaws [5].
References
1. Mery, D., Filbert, D., Jaeger, T.: Image processing for fault detection in alu-
minum castings. In MacKenzie, D., Totten, G., eds.: Analytical Characterization
of Aluminum and Its Alloys, New York, Marcel Dekker (2003) (In Press).
2. Mery, D., Filbert, D.: Classification of potential defects in automated inspection
of aluminium castings using statistical pattern recognition. In: 8th European Con-
ference on Non-Destructive Testing (ECNDT 2002), Barcelona (2002)
3. Filbert, D., Klatte, R., Heinrich, W., Purschke, M.: Computer aided inspection of
castings. In: IEEE-IAS Annual Meeting, Atlanta, USA (1987) 1087–1095
4. Schulenburg, H., Purschke, M.: Advances in the automatic evaluation of radioscopic
images. In: International Conference on Computerized Tomography for Industrial
Applications and Image Processing in Radiology, March 15-17, Berlin (1999) 241–
243
5. Mery, D., Filbert, D.: Automated flaw detection in aluminum castings based on
the tracking of potential defects in a radioscopic image sequence. IEEE Trans.
Robotics and Automation 18 (2002) 890–901
6. Castleman, K.: Digital Image Processing. Prentice-Hall, Englewood Cliffs, New
Jersey (1996)
7. Sonka, M., Hlavac, V., Boyle, R.: Image Processing, Analysis, and Machine Vision.
2 edn. PWS Publishing, Pacific Grove, CA (1998)
8. Danielsson, P.E.: A new shape factor. Computer Graphics and Image Processing
7 (1978) 292–299
9. Jähne, B.: Digitale Bildverarbeitung. 2 edn. Springer, Berlin, Heidelberg (1995)
10. Haralick, R., Shanmugam, K., Dinstein, I.: Textural features for image classifica-
tion. IEEE Trans. on Systems, Man, and Cybernetics SMC-3 (1973) 610–621
11. Egan, J.: Signal detection theory and ROC analysis. Academic Press, New York
(1975)
12. Mery, D., da Silva, R., Caloba, L., Rebello, J.: Pattern recognition in the automatic
inspection of aluminium castings. In: International Conference on Computerized
Tomography for Industrial Applications and Image Processing in Radiology, June
23-25, Berlin (2003) (accepted).