# «1. INTRODUCTION Image analysis techniques are being increasingly used to automate industrial inspection. For defect inspection in complicated ...»

Defect detection in textured surfaces using

color ring-projection correlation

D. M. Tsai and Y. H. Tsai

Machine Vision Lab.

Department of Industrial Engineering and Management

Yuan-Ze University, Chung-Li, Taiwan, R.O.C.

E-mail: iedmtsai@saturn.yzu.edu.tw

1. INTRODUCTION

Image analysis techniques are being increasingly used to automate industrial

inspection. For defect inspection in complicated material surfaces, color and texture

are two of the most important properties. Detecting an entire class of defects in colored texture images would be impossible with typical gray- level processing techniques. In this paper, we introduce a color ring-projection scheme to tackle the problem of defect detection in colored texture surfaces. The proposed color ring-projection representation reduces computational complexity by transforming 2-D images to 1-D patterns, and is rotation- invariant with respect to oriented structures of textures.

In automatic surface inspection, the task is to detect small surface defects that appear as local anomalies embedded in a homogeneous texture. The class of homogeneous image texture has a repetitive, self-similarity property that distinguishes it from any other class of images. Textures are generally classified into two major types, structural and statistical (Pikaz and Averbuch 1997). Structural textures are those that are composed of repetitions of some basis texture primitives, such as lines, with a deterministic rule of displacement. Statistical textures cannot be described with 1 primitives and displacement rules. The spatial distribution of color in such textured images is rather stochastic. Generally, structural textures such as textile fabrics and machined surfaces are highly oriented. Textural features of such images are orientation-dependent. Statistical textures such as leather and cast surfaces are isotropic, and are rotation- invariant. In this paper, we aim at the surface defect inspection for both structural and statistical textures without alignment requirement or prior knowledge of texture orientation.

For complicated textured-surfaces in gray- level images, spatial gray- level co-occurrence matrix methods (Sum and Wee 1982) in the spatial domain and Fourier transform methods (Liu and Jernigan 1990) in the frequency domain have been commonly used to describe texture features. A survey of co-occurrence matrix methods can be found in Siew and Hogdson (1988). Co-occurrence matrix approaches have been applied for the inspection of wood (Conners et al. 1983; Ojala et al. 1992), carpet wear (Siew and Hogdson 1988) and machined-surface roughness (Ramana and Ramamoorthy 1996).

Fourier-based methods characterize the spatial- frequency distribution of textured images, but they do not consider the information in the spatial domain and may overlook local deviations. In the recent past, Gabor filters (Daugman 1985) are well recognized as a joint spatial/spatial- frequency representation for analyzing textured images containing highly specific frequency and orientation characteristics. Gabor filter-based methods have been successfully applied for texture classification and segmentation (Teuner et al. 1995; Randen and Husoy 1999; Weldon and Higgins 1999) object detection (Jain et al. 1997), and inspection (Escofet et al. 1996). For unknown

require significant amount of computation, and are of limited use because each view of the oriented structures may require a unique filter. In terms of colored texture representation, classical Gabor filters do not exploit chromatic properties of textures and may fail in detecting color flaws.

Traditional texture analysis methods are inappropriate for colored texture images because they ignore chromatic information. In the analysis of color images, the description of image region has been performed mainly based on color histograms (Swain and Ballard 1991; Boukouvalas et al. 1999). However, color histograms lose the spatial information of a texture, and are not sufficient to detect local variation of small defects. More sophisticated color imaging methods have been developed for color texture classification and segmentation. Tan and Kittler (1992) used eight texture features derived from the Discrete Cosine Transform of each of the tree color bands for color texture classification. Liu and Yang (1994), Panjwani and Healey (1995), and Suen and Healey (1999) presented Markov random field models for unsupervised segmentation of colored texture images. The color features are defined by the parameters of Markov models, which are estimated with sophisticated maximum likelihood scheme or relaxation process. Healey and Slater (1994) used illumination invariant descriptors of the 3-D color histogram for colored texture recognition. Healey and Slater (1997) used a Gaussian low-pass filter and a difference of Gaussian high-pass filter to derive a set of moment invariants of distributions in color images for illumination- invariant texture recognition. Thai and Healey (2000) further described a method for selecting texture discrimination filters based on the spatial content of the texture. Color image regions are represented by a

in the sense that it maximizes the distance between vectors of these features. This method is generally developed for classifying a set of known texture classes.

In industrial color texture inspection, Song et al. (1996) studied surface inspection on random macro color textures. They proposed a two-stage chromatic-structural approach. The first stage uses a histogram-based color clustering scheme to segment a color image into different color classes. The second stage then extracts structural features by blob analysis from each chromatic class separated in the first stage. Finally, the Bayes minimum error rule is applied to identify defects. This approach is developed specifically, and works well for highly irregular textures such as granite. It is relatively complicated to implement for highly regular textures found in industry. Boukouvalas et al. (1999) studied the problem of color shade grading for industrial inspection of ceramic tiles. Their grading method is based on the comparison of color histograms. Boukouvalas and Petruo (2000) also presented a method for perceptual color shade grading of randomly textured surfaces. The proposed method first removes the spatial blurring introduced by the input sensor, and then converts the data to a perceptual color space which emulates the spatial blurring of the human visual system. The data are finally converted to a perceptually uniform color space for color grading.

The traditional color imaging methods are more concerned with the problem of image segmentation than by the problem arising in inspecting colored texture surfaces, where local defects exhibit no distinct textural properties. Our work has been motivated by a need to develop an efficient and effective technique to detect and

automatic surface inspection problem, where defect- free samples of the textures of interest must be given a priori. The proposed method aims at detecting defects, rather than classifying types of defects, embedded in homogeneous textures. For solving the problem of arbitrary orientations of structural textures and reducing computational complexity, we propose a rotation- invariant ring-projection representation for colored texture patterns. Color ring-projection transforms a 2-D color image f ( x, y ) with two variables x and y into a 1-D color pattern f (r ) as a function of radius r.

The similarity of a sensed image with respective to the reference pattern is measured by the simple and straightforward normalized correlation. Since the proposed color ring-projection representation is rotation invariant, and reduces computational complexity from O(W 2 ) in a 2-D circular image of radius W to O (W ) in the ring-projection space, the easily- implemented correlation measure is insensitive to rotation changes, and is computationally fast.

This paper is organized as follows: Section 2 first describes the proposed color ring-projection representation of colored texture images, and then discusses the regularity measure of normalized correlation between two color ring-projection patterns. Section 3 presents the experimental results on a number of color textures found in industry. The paper is concluded in Section 4.

In this study, a defect-free pattern defined in a circular window will slide over the entire sensed image on a pixel-by-pixel basis so that the degree of regularity of every pixel in the image can be determined. The normalized correlation is used as the regularity measure between the defect- free reference pattern and each sensed subimage. In order to reduce computational burden in the inspection process, the color ring-projection representation is proposed. It transforms a 2-D color image into a rotation- invariant pattern in the 1-D ring-projection space. The proposed transformation scheme for colored texture patterns is inspired by the ring-projection algorithm (Tang et al. 1991; Tang et al. 1998), which is originally developed for character recognition in binary images.

Color provides powerful information for texture analysis. The color of a pixel in the image is typically represented with the RGB tristimulus values, each corresponding to the red (R), green (G) and blue (B) frequency bands of the visible light spectrum. Let R( x, y), G ( x, y) and B( x, y) denote the R, G and B stimulus values at pixel coordinates ( x, y), respectively. The color ring-projection transformation is carried out separately in each of the three primary-color planes. The pattern of a color texture is contained in a circular window of radius W. The reference pattern can be arbitrarily selected from a non-defective region of colored texture surfaces. The radius W is selected so that the representation of self- similarity of a homogeneous texture pattern is sufficient. Self-similarity means that all

independently of their position.

Let C ( x, y ) represent a color feature at pixel ( x, y) in the Cartesian coordinates.

The polar coordinates of C ( x, y ) is given by C (r cos θ, r sin θ ), where x = r cosθ and y = r sin θ. The origin of polar coordinates is at the center of the circular window.

The color ring-projection of the 2-D image C ( x, y ) at radius r, denoted by p (r ), is defined as the mean value of C (r cos θ, r sin θ ) at the specific ring of radius r.

where n r is the total number of pixels falling on the ring of radius r, r = 0,1,2,...,W. Therefore, a 2-D image with two independent variables x and y in each color plane is now represented by the 1-D ring-projection pattern with one single variable r. Since the projection is constructed along circular rings of increasing radii, the derived 1-D color ring-projection pattern is invariant to rotation changes of its original 2-D image. Figure 1 demonstrates the representation of 1-D ring-projection patterns. Figures 1(a) and 1(b) show the images of an oriented textile fabric in two

function of radius r in color plane R(x, y). It can be seen from the figures that the plots of ring projections are approximately identical, regardless of orientation changes.

An original 2-D RGB image can now be represented by a sequence of RGB ring-projection vectors Γ( r ) = ( p R (r ), pG ( r ), p B ( r )), for r = 0,1,2,...,W. Given a circular window of radius W, data dimensionality of the original 2-D RGB image is reduced from 3(πW 2 ) to 3 ⋅ W in the 1-D color ring-projection space.

In the inspection process, the regularity measure of a sensed subimage with respect to the defect-free reference pattern defined in the circular window of radius W is given by the normalize correlation. Let

ΓM (r ) and ΓS (r ) represent the RGB ring-projection vectors of the defect- free reference pattern and the sensed subimage, respectively, at the ring of radius r. The elements of both vectors ΓM (r ) and ΓS (r ) are obtained from eqs.(2)-(4). The

“• ” and “ ⋅ ” above denote the inner product and the norm, respectively. The normalized correlation δ P obtained from eq.(5) is between –1 and 1. In this study, we take only positive values of δ P such that δ P ∈ [0,1], i.e.,

In the inspection process, the circular window will slide over the entire sensed image on a pixel-by-pixel basis, and then the correlation value of each pixel in the image can be determined. A homogeneous region in the sensed image will have correlation value approximate to unity, and any irregular region with respect to the defect- free reference pattern will have correlation value close to zero. Therefore, we employ the simple statistical process control principle to set up the control limit for distinguishing defects from homogeneous textures in the correlation image. Since the desired correlation value is unity between the reference pattern and each sensed subimage, only the lower control limit is required to detect the deviation of correlation values. The lower control limit (threshold) is given by

δ P ( x, y ) is the correlation value of the circular window with the center at ( x, y). K in eq.(6) is a control constant. A 3-sigma standard has been used normally in the statistical process control for detecting assignable causes. In this study, control constant K =3 is also used to set up the correlation threshold. If the correlation value of a pixel in the sensed image is larger than the control limit (threshold) µ δ − 3σ δ, the pixel is classified as a homogeneous element. Otherwise, it is classified as a defective element.

In this section, we present the experimental results on a number of colored texture surfaces for evaluating the validity of the proposed ring-projection correlation method.