Textures and structural defects - Semantic Scholar

Report 3 Downloads 101 Views
Textures and structural defects Dmitry Chetverikov and Krisztian Gede Computer and Automation Research Institute 1111 Budapest, Kende u.13-17, Hungary email: [email protected]

Abstract. Detection of structural defects in textures is addressed as a

speci c problem of visual texture analysis. A new approach to texture defect detection is proposed. A pilot experimental study shows that the method presented can detect structural imperfections in texture patterns of diverse origin. 1

1 Introduction A broad class of automated visual inspection tasks involves texture inspection with the purpose of detecting, localizing and classifying defects on surfaces of materials. In their recent survey on visual inspection [13], Newman and Jain treat texture inspection as a distinct class of tasks that includes, among others, inspections of textiles, fabrics and carpets, ceramics and ceramic tiles, banknotes, hardwood, metal and painted surfaces, leather and paper. At the same time, few attempts have been made to understand the common nature of diverse texture inspection problems and propose a unifying approach to defect detection in textures. The capability of the existing texture analysis techniques to detect di erent texture imperfections has not been investigated. Designing a machine vision system for texture inspection often needs time-consuming and subjective selection of the suitable texture features. Many of the existing systems are highly specialized, with a large number of parameters to be set in a particular application environment. The di erence between texture defect detection and texture segmentation was pointed out in [5] where an initial taxonomy of texture imperfections was introduced. Texture imperfections, or defects, are regions that locally break the homogeneity of texture. The defects themselves do not have textural properties. Texture features computed for defect patches do not have stable values, while feature values of the background texture form a cluster in the feature space. Defects are then detected as outliers. In traditional texture segmentation, feature values of each segment form a cluster and the segments are searched as distinct clusters. Chetverikov [6] designed a rotationally exible lter aimed at adaptive defect detection in textures with gradual spatial variation of directionality. Brzakovic 1

Appeared in: Computer Analysis of Images and Patterns, Lecture Notes in Computer Science vol.1296, eds. G.Sommer, K.Daniilidis and J.Pauli, Springer Verlag, 1997, pp.167-174.

et. al. [4] described TEXIS, a system for defect detection in materials characterized by complex textures. TEXIS is introduced as a general texture defect detection system, but it contains many application-speci c features and parameters that make it a customized tool for hardwood inspection. Amelung and Vogel [1] addressed the problem of automatic window size selection for texture defect detection operators. Recently, Sinclair [14] proposed a cluster-based approach to texture analysis and demonstrated its capability to indicate a structural imperfection in a single texture pattern selected from the album [3]. Branca et.al. [2] considered textures composed of oriented structural elements on textural background and de ne a measure of local directional coherence of the texture ow eld in order to detect defects as directional incoherencies. The algorithm was tested on leather patterns. Song et.al. [16] presented a Wigner based approach to detection of synthetic cracks in random and regular textures. The same authors published a survey on defect detection in textures [15] where more references to previous work, mostly applications, can be found. In section 2, we brie y describe the feature based interaction map (FBIM) approach to texture analysis. Section 3 presents the methodology of defect detection in textures using the structural FBIM lter. Experimental results demonstrating the capability of the FBIM approach to detect defects in di erent textures are shown in section 4. Finally, the conclusions are drawn.

2 The FBIM approach The feature based interaction map approach was proposed in [7,10]. This approach uses the EGLDH, the extended graylevel di erence histogram that shows the frequencies of the absolute graylevel di erences between pixels separated by a spacing vector. In the EGLDH, the magnitude and the angle of the spacing vector are independent, arbitrary parameters while in the conventional graylevel di erence histogram (GLDH, see [12]) these parameters are interrelated because of the image raster. Principles, functions and previous applications of the FBIM method are described elsewhere [7,10,9,8,11]. A sketch of the approach is given below. The polar interaction map Mpl (i; j ) is the basic entity of the FBIM method. Mpl (i; j ) is an intensity-coded polar representation of an EGLDH feature, with the rows enumerating the angle i , the columns the magnitude (displacement) dj of the varying spacing vector. Mpl (i; j ) is computed for a range of angles and magnitudes. The XY interaction map Mxy (k; l) is the Cartesian version of Mpl (i; j ). The computation of an EGLDH feature and the layout of Mpl (i; j ) are illustrated in gure 1. In gure 1a, (m; n) scans the pixels of the image, while (x; y) points at a non-integer location speci ed by the spacing vector. The intensity I (x; y) is obtained by interpolation of the four neighboring pixels. The absolute graylevel di erence jI (m; n) ? I (x; y)j is used to address and increment a bin of

the EGLDH. The standard GLDH features [12] can be used with the EGLDH as well. In this study, the EGLDH feature F is the mean of jI (m; n) ? I (x; y)j. Examples of interaction maps are shown in gure 2. Mxy (k; l) re ects the structure of a texture pattern in the spatial domain preserving the geometry of the structure. When a pattern is rotated, Mxy (k; l) rotates around its center. In Mpl (i; j ), this means the cyclical shift of the rows. Similarly, scaling the pattern amounts to stretching Mpl (i; j ) in X direction. Both rotation and scaling are easily implemented with the polar map making Mpl (i; j ) suitable for orientationand size-adaptive structural ltering [8]. 0 F

αi

(x,y) dj αi



(m,n)

(a)

1

dj

dmax

(b)

Fig. 1. (a) Computing the EGLDH. (b) The layout of the polar interaction map. F is an intensity-coded EGLDH feature.

(a)

(b)

(c)

(d)

(e)

(f)

(g)

Fig. 2. Examples of interaction maps. (a) A regular texture. (b) The polar map of (a).

(c) The XY map of (a). (d) The structure (blobs) of (c). (e) A linear texture. (f) The polar map of (e). (g) The XY map of (e).

3 Using the FBIM lter to detect texture defects Structural imperfections are detected in a texture image by matching the polar interaction map of an `ideal' (reference) texture patch against the map computed in a sliding window. In each position of the window, a measure of dissimilarity between the reference and the current map is obtained and written into the output dissimilarity image. The normalized sum of the pointwise absolute di erences between the corresponding pixels of the two maps (the city-block distance) was selected as the dissimilarity measure. Many natural textures contain gradual variations of orientation and size that may be treated as tolerable or intolerable depending on the application. The FBIM lter can cope with both types of variations by specifying the degrees of variations that should be tolerated. This means that the lter becomes adaptive in orientation or/and size. Mpl (i; j ) is locally tuned to nd the best matching orientation and scale. Technically, a bank of reference maps scaled within the size tolerance range is computed from the reference patch prior to ltering. During the ltering, each of the reference maps is matched against the current map. The best matching scale and orientation are found as those that give the least dissimilarity value, and this value is output. The FBIM ltered image is negated so that the locations of high dissimilarity are dark blobs. (See gure 3a.) These blobs are enhanced and detected using a simple blob detector that indicates dark blob in a window if the mean intensity in this window is less than that in any of the surrounding windows. The size of the window is the expected blob size. The contrast of the blob is the average di erence between the means in the surrounding windows and the mean in the current window. An example of a blob contrast image is demonstrated in gure 3b where darker points indicate stronger response of the blob detector.

(a)

(b)

(c)

(d)

Fig. 3. Operation of the defect detection algorithm. (a) Result of FBIM ltering of

texture 4 of gure 4. (b) Blob contrast image of (a). (c) Result of thresholding of (b) at 55%. (d) Result of thresholding of (b) at 75%.

In this study, we only consider compact defects. Elongated defects will also stand out in the FBIM ltered image, but they should be post-processed in a di erent way. Texture defects are detected in the blob contrast image by thresholding this image at a certain percent of the maximum contrast. Figure 3c shows a result of thresholding at the level of 55%. At this level, some pixels are erroneously labeled as defects. At a higher level of 75% ( gure 3d), the false detections are discarded as the most contrast blob is the defect. Only the correctly detected pixels remain. The lower the level that separates the two classes of pixels the better the detectability of the signal. The rest of this paper is devoted to an experimental study aimed at detection of structural texture defects using the FBIM lter.

4 Experimental study 4.1 Experimental protocol Figure 4 shows the four 256  256 pixel size grayscale test images used in the

defect detection experiments, with sample detection results overlaid. The polar and the Cartesian interaction maps of the test textures are shown in gure 5.

(a) Texture 1

(b) Texture 2

(c) Texture 3

(d) Texture 4

Fig. 4. The test textures with sample detection results overlaid. The test images were selected selected from the album [3]. Each of them contains a single structural imperfection. Texture 1 is a hexagonal cellular structure with a gradual spatial variation in both size and orientation. The defect is perceived as a dark blob on textured background. The size of the defect is comparable to the average size of the cell. Texture 2 is a rectangular cellular structure with limited spatial variations. The hardly visible defect is a local structural distortion. The size of the defect is twice the size of the cell. Texture 3 is a regular rectangular structure. The defect is a local structural distortion whose size is less than the cell size. Finally, texture 4 is a hexagonal structure with very regular

Fig. 5. The interaction maps of the test textures (scaled). Each pair of maps describes the respective texture in gure 4. arrangement and some variation in the intensity of the elements. The defect is perceived as two elements merged into a bigger one. The goal of the experimental study is to evaluate the detectability of di erent texture defects with the FBIM lter. A rectangular mask was manually drawn for each of the four defects. Each mask is set slightly larger than the defect to account for the nite sizes of defects and windows. The merit of detection Q is measured by the ratio, in percent, of the pixels detected within the mask to the overall number of the pixels detected in the image. This measure re ects both the signal-to-noise ratio and the localization of the defect. 100% detection means that defect pixels are only indicated. Q < 100% shows that false positive classi cations occurred. False negative classi cations are not accounted for since the contours of defects cannot be precisely speci ed. In most applications, the precise shape of defect is of no particular interest. A threshold can be set in an inspection task to specify the acceptable level of false detections. The merit of detection depends on the blob contrast threshold T . This threshold is relative to the maximum contrast value and is also measured in percents. Other variable parameters of the tests are the angular resolution  and the maximum displacement dmax of the interaction map. The window size W and the size of the blob detector were set to 30. An additional test for W = 40 was also run yielding similar results. To allow for a limited directional variation of the structures, the 15 degree angular adaptivity was set in all cases. The scaling adaptivity was only used in the control experiment with test pattern 1 where the size variation is considerable.

4.2 Results The main experimental results are condensed in gure 6. The boxes of gure 6 refer to di erent textures and angular resolutions  . Each of the boxes shows the intensity-coded merit of detection with white being 100%. In each box, the rows enumerate the growing maximum displacement dmax = 10; 12; :::; 20, the columns the growing threshold T . The interaction maps were computed for d = 1; 2; :::; dmax and = 0;  ; :::; 360. The 100% detection merit can be achieved for all the test images. A reasonably wide 100% detectability range of thresholds T was obtained for all test textures except the reptile skin where this range is less satisfactory. The reason

is the large cell size variation in this texture. When in the control experiment a

30% scaling adaptivity is used for this texture the results improve signi cantly,

as shown in gure 7 where the white area grows when the adaptivity is switched on. Texture 1

∆α=5

Texture 1

∆α=15

Texture 2

∆α=5

Texture 2

∆α=15

Texture 1

∆α=30

Texture 1

∆α=45

Texture 2

∆α=30

Texture 2

∆α=45

Texture 3

∆α=5

Texture 3

∆α=15

Texture 4

∆α=5

Texture 4

∆α=15

Texture 3

∆α=30

Texture 3

∆α=45

Texture 4

∆α=30

Texture 4

∆α=45

d max

detection merit Q threshold T

Fig. 6. The detection merits and their layout.

Fig. 7. Selected detection merits for texture 1 with the scaling adaptivity 0 (left) and 30% (right), enlarged.

5 Conclusion It has been demonstrated that structural texture imperfections of diverse origin can be detected in the framework of a novel approach based on the FBIM structural ltering. For systematic performance evaluation of the approach a large ground truthed image database of texture defects is needed. The initial experiments of this study indicate that adaptivity to variations in directionality and size is strongly desirable. This adaptivity is incorporated in a controllable way in the FBIM lter. The FBIM approach is especially suitable for detection of structural defects in more or less regular textures. It is less ecient when applied to irregular patterns. Intensity defects like the one in the test pattern 1 are more easily defected as blobs using an appropriate blob detector. The power of the FBIM lter is in its applicability to di erent tasks by adjustment of the few natural parameters it utilizes. In setting the lter parameters, the following considerations should be taken into account. The window size W should account for both defect size S and minimum patch size D, i.e., the smallest patch that still represents the background

texture. When S ' D, it is safe to set W  S . (See [1] for a related discussion.) In the case of multiple defects of di erent sizes, the usage of resolution pyramids can be a solution. For the interaction map to re ect the structure of the background texture, the maximum spacing dmax should extend beyond the texture period. The experimental results indicate that the best angular resolution  also depends on the background texture. In addition, this parameter can be a ected by the trade-o between the detection merit and the speed.

6 Acknowledgment This work was supported in part by the grants OTKA T14520 and EU INCO COPERNICUS IC15 CT94 0742.

References 1. J. Amelung and K. Vogel. Automated window size determination for texture defect detection. In Proc. British Machine Vision Conference, pages 105{114, 1994. 2. A. Branca, M. Tafuri, G. Attolico, and A. Distante. Directionality detection in compositional textures. In Proc. International Conf. on Pattern Recognition, pages 830{834. Vol.II, 1996. 3. P. Brodatz. Textures: a photographic album for artists and designers. Dover, New York, 1966. 4. D. Brzakovic, H. Beck, and N. Su . An approach to defect detection in materials characterized by complex textures. Pattern Recognition, 23:99{107, 1990. 5. D. Chetverikov. Texture imperfections. Pattern Recognition, 6:45{50, 1987. 6. D. Chetverikov. Detecting defects in texture. In Proc. International Conf. on Pattern Recognition, pages 61{63, 1988. 7. D. Chetverikov. Pattern orientation and texture symmetry. In Computer Analysis of Images and Patterns, pages 222{229. Springer Lecture Notes in Computer Science vol.970, 1995. 8. D. Chetverikov. Structural ltering with texture feature based interaction maps: Fast algorithm and applications. In Proc. International Conf. on Pattern Recognition, pages 795{799. Vol.II, 1996. 9. D. Chetverikov. Texture feature based interaction maps and structural ltering. In Proc. 20th Workshop of the Austrian Pattern Recognition Group, pages 143{157. Oldenbourg Verlag, 1996. 10. D. Chetverikov and R.M. Haralick. Texture anisotropy, symmetry, regularity: Recovering structure from interaction maps. In Proc. British Machine Vision Conference, pages 57{66, 1995. 11. D. Chetverikov, J. Liang, J. K}om}uves, and R.M. Haralick. Zone classi cation using texture features. In Proc. International Conf. on Pattern Recognition, pages 676{680. Vol.III, 1996. 12. R. M. Haralick and L. G. Shapiro. Computer and Robot Vision, volume I. AddisonWesley, 1992. 13. T.S. Newman and A.K. Jain. A survey of automated visual inspection. Computer Vision and Image Understanding, 67:231{262, 1995. 14. D. Sinclair. Cluster-based texture analysis. In Proc. International Conf. on Pattern Recognition, pages 825{829. Vol.II, 1996.

15. K. Y. Song, M. Petrou, and J. Kittler. Texture defect detection: A review. In SPIE Applications of Arti cial Intelligence X: Machine Vision and Robotics, volume 1708, pages 99{106, 1992. 16. K. Y. Song, M. Petrou, and J. Kittler. Wigner based crack detection in texture images. In Fourth IEE International Conference on Image Processing and its Applications, pages 315{318, 1992.