EFFECTIVE IMAGE MODELS FOR INSPECTING PROFILE FLAWS OF CAR MIRRORS WITH APPLICATIONS

Since car mirrors are standard accessories with cars, the demand for car mirrors is growing and manufacturers also pay more emphasis on the increase of product quality. Common appearance fl aws of car mirrors include: scratches, bubbles, pinholes causing surface fl aw type and burrs,damaged edges causing profi le fl aw type. Currently, the inspection tasks are conducted by human inspectors. Since the profi le fl aws will cause structural damages of car mirrors and reduce ability to withstand stress, the level of damage suffered even more than the surface fl aws. In addition, the angle diversity of capturing images makes it hard to implement automatic optical inspection. Therefore, this study develops an automated profi le fl aw detection system for car mirrors to replace visual inspection personnel. This study proposes a self-contrast defect detection method for the profi le fl aw inspection of car mirrors. It is not required to provide a standard fl awless sample in detection process and derive information compared with testing samples. The proposed method fi rst extracts the contour information of the testing image by Fourier descriptors. Then, after some middle and high-frequency coeffi cients were fi ltered out, an approximated contour image can be rebuilt from the Fourier domain for comparing with the testing image. Finally, the fl aw districts are easily separated by image subtraction. Experimental results demonstrate that the fl aw inspection rate reaches 85.05%, and the incorrect alert rate is smaller than 0.07%, and the correct classifi cation rate is up to 97.47%.


INTRODUCTION
Glass-related goods have turned into essential things in our daily routine and main materials for architecture and manufacturing industries. There are some typical applications of glass and mirrors in our daily life, such as car mirrors, building windows, artifacts, LCD panels, etc. Because appearance defects infl uence the qualityof the mirrors, the detection of appearance defects is very vital. In the manufacturing process of mirror-related goods, a metal is coated on the rear of see-through glass. Manual inspection is easy to be disturbed by the outer object images refl ected on the surfaces of mirrors and leads to wrong decisions. Furthermore, the exterior of a mirror is easily fastened to dust, dirt, water,etc. and make the fl aw inspection harder. Figure 1 shows a common car mirror set including two side-view mirrors and one rearview mirror. Since car mirrors are made of curve glass with the aluminum-or chromium-coated materials, this makes mirrors have high refl ectance. Common appearance defects of car mirrors include: scratches, bubbles, pinholes causing surface defect type; and damaged edges, burrs causing profi le defect type. After proceeding the grinding operation, the burr defects almost do not exist. The damaged edges are the primary fl aws in the profi le defect type. The defect sizes of car mirror need to be inspected out are at least 0.20 mm for the surface fl aw type and 0.26 mm for the profi le fl aw type. Figure 2 shows a work-inprocess (WIP) mirror with two types of surface fl aw and profi le fl aw. Appearance fl aws on the curved surfaces are diffi cult to be examined for technical inspectors due  to light refl ection on mirror surfaces. Figure 3 displays four regular defect kinds of car mirrors: (a) scratch, (b) bubble, (c) pinhole, and (d) damaged edge. Appearance fl aws can be classifi ed into two categories, surface fl aw and profi le fl aw. Comparing the properties of surface defects and profi le defects, the theories of detection methods are signifi cantly different. The methods detecting surface defects are based on the changes of gray levels and the others detecting profi le defects are based on the shape matching of an object contour. Table 1 lists a comparison table of the two defect types of car mirrors. Since the profi le defects will cause structural damages of car mirrors and reduce the ability to withstand stress, the degree of harm even more than the surface defects for car mirrors. Car mirrors are being manufactured in curve shapesfor obtaining wider fi eld of views, which increases diffi culties of inspecting the products. The most usual inspection scheme for surface fl aws on car mirrors is manual inspection by human eyes. Mirror inspection needs particular working environment, specifi cally with respect to lighting. In the practical application, every testingmirror is carried into the assessor's fi eld of view. A car mirror has a rectangle shape with round corners and curved surface andthe profi le fl aws to be examined could be found on the outer edges of the mirror. The curved mirror has the appearance of higher refl ectance and wider fi eld of view which is more complex than that of the plane mirror. It is harder to recognize profi le fl aws embedded on the curved surfaces. The majority of fl aws have many kinds and can suppose different forms. Figure 4 demonstrates the inspection procedure of car mirrors in production site. Manual visual inspection is tedious, laborious and extremely relied upon the examiners' skills. Mistaken judgements are simply made since examiners' eye tiredness and subjectivity. Since the car mirror has the appearance of high refl ection, those refl ected lightings make the fl aw detection task more diffi cult when profi le fl aws are inlaid on the curved surfaces of car mirrors. High refl ection on curved mirrors increases the diffi culty of distinguishing the profi le fl aws on car mirrors. In this study, the trial WIP mirrors with length 18.1 cm, width 10.71 cm, and thickness 0.2 cm, were arbitrarily chosen from the production line of car mirrors. Figure 5 shows the scale of a trial WIP mirror ( Fig. 5(a)) and a partial of the WIP with a fl aw of damaged edge ( Fig. 5(b)). The angle diversity of capturing images makes it hard to implement automated defect inspection. Consequently, this study establishes an automated profi le defect inspection system of car mirrors to replace visual inspection personnel from car mirror inspection tasks. We suggest a Fourier descriptors based scheme to examine profi le fl aws on curved mirrors of vehicles. The rest of the paper is composed as follows: Firstly, the articles on existing techniques of image processing for blemish inspection are reviewed. Secondly, the suggested image models for detecting fl aws on car mirrors are described. Thirdly, the trials are conducted and the manifestation of the suggested models with traditional techniquesare evaluated. Finally, the contributions are summarized and the further workis indicated.

LITERATURE REVIEW
Automatic detection of appearance fl aws has turned into a crucial work for producers striving to upgrade goods quality and manufacturing effi ciency [1][2]. Lin and Chiu [3] developed a cosine transform based image rebuilt scheme for automatic inspection of little surface variations on capacitor chips of passive components. Lin et al. [4] applied the convolutional neural network with deep learning to conduct automatic inspection of light-emitting diode chips. Park et al. [5] constructed and examined many kinds of deep networks of various depths and layer nodes to choose suitable architecture for automatic detection of dirt, scratches, burrs, and wears on textured and non-textured surface parts. Numerous research examined the visual fl aw detection of glass-related goods. Li et al. [6] applied the principal components analysis approach to inspect surface defects on the mobile phone cover glass. Lin and Tsai [7] presented a Fourier transform-based method to inspect linear fl aws on surfaces of capacitive touch displays. Chiu and Lin [8] developed a defect detection system with wavelet transformation based fi ltering scheme for automated inspection of area fl aws on appearances of capacitive touch panels. Lin and Chiu [9] combined block cosine transform, Hotelling's distance measure, and grey theory to detect appearance fl aws on clear LED lenses. Lin and Chen [10] combined the wavelet packet transform and the partial least squares technique to detect appearance fl aws on textured LED lenses. Some studies further focused on investigating the visual blemish inspection of car mirror products. Chiu et al. [11] addressed a Hough transform method for visual distortion blemish inspection on transparent glass of car mirrors. Lin and Hsieh [12] developed an optical inspection system based on small deviation control skills to fi nd appearance variations on curved car mirrors. From the above reviews of literatures, almost all of the current researches focus on industrial inspections of LED lenses, transparent glass, and mirrors. These visual inspection systems concentrate mainly on the surface and distortion fl aw detection. Since the profi le defects will cause structural damages of products and reduce ability to with stand stress, the level of damage suffered even more than the surface fl aws. These researches do not inspect profi le fl aws with properties of little fl aws on curved surfaces of car mirrors. Accordingly, this study applies Fourier descriptors to profi le fl aw inspection on curved surfaces of car mirrors with high refl ection. Information of shape is conveyed through changes in the slopes of an object's boundary. The greatest change of the slopes is also called the largest curvature. Corner detection is identical to fi nd the high curvature points on planar curve. Corners play an important role in shape perception by human and object description by computer vision system. Many corner detection methods calculated curvature maximal points using k-cosines as corners [13]. They are applied to damage detection in civil engineering [14,15] and defect detection in manufacturing industry [16]. Shapes of objects are depicted by their schematic curves. Matching typically involves fi nding a mapping from one curve to the other that minimizes allowable deviations.The curvature-based methods generally suffer from shortage of rotation, translation, and scaling invariance, sensitivity to object deformations, and need referential images for template matching. Fourier descriptors are one of the highly employed shape expression schemes. The Fourier descriptors indicate the shape of an object in a frequency domain. The primary thought of a Fourier descriptor is to utilize the Fourier transformed borders as the shape features. Khoje and Bodhe [17] compared classifi cation performance of the Fourier transform based shape descriptors and its derivatives for fruit quality grading of mangoes. Burla et al. [18] developed two modifi ed Fourier descriptors methods for fast detection of surface defects on microlens arrays, one kind of micro-optical elements. Zheng et al. [19] introduced a revised Fourier descriptors based on multiscale centroid contour distance to recognize objects in remote sensing images. The theory of this approach is straightforward and computational effi ciency. The Fourier descriptors method supplies a computationally effi cient option with suffi cient frequency resolu-tion. In the Fourier transform, the fi ltering operations are used to the low-frequency coeffi cients. Thus, the Fourier descriptors have excellent compressibility to provide the function by using a few low-frequency components from the input shape information to describe and rebuild the approximate shape boundary [20]. In addition, the Fourier descriptors are simple to normalize data and are invariant to shape's rotation, scaling, translation, and changes of different starting points of boundary [21,22]. This Fourier descriptors scheme can achieve self-comparison between the testing image and the rebuilt one and do not need referential images and template matching processes [23]. Derivatives of the Fourier descriptors as shape descriptors improved the shape classifi cation and retrival performance through combining with wavelet transform and multiple resolutions [24].

MATERIALS AND METHODS
This study proposes a self-contrast fl aw detection approach for the profi le defect inspection of car mirrors. The self-comparison means it is not required to provide a standard fl awless sample in detection process and derive information compared with the testing images. The inspection task of this research comprises discovering profi le fl aws on curved surfaces of car mirrors. Many of these unforeseen fl aws are diverse with various forms and cannot be depicted by clear measures, thereby making automatic fl aw inspection hard. Five stages are developed to accomplish the procedure of the profi le fl aw inspection. First, image preprocessing is carried out to eliminate background district and generate a binary edge image of objects by applying the Otsu method [25] for object separation from background and Sobel edge detector [13] for edge detection to obtain the edge information of the objects. Second, the binary edge image is converted to Fourier domain and the contour information of the testing image are extracted by Fourier descriptors. Third, by selecting the proper retaining rate in frequency domain, the low-frequency components are recovered and the others are assigned to zero for rebuilding the object contour. There is essential information in the retained low-frequency parts than those in the high-frequency parts. Fourth, the fi ltered frequency components are conducted by the reverse 1-D Fourier transform to produce a rebuilt image. Then, an approximated contour image can be rebuilt from the Fourier domain for comparing with the original image as a reference pattern. Fifth, the rebuilt image deducts with primitive testing image to obtain the difference image where the profi le fl aws have been detected. Therefore, the profi le fl aws on the car mirrors with curved surfaces will be correctly detected and recognized by the suggested approach. Figure 6 describes the research procedure of the proposed approach. It represents that the Fourier descriptors have the merits of being fi ne enough to extract required information from the retained components and indicating the abstraction of object shapes.

IMAGE MODELING& ANALYSIS
For obtaining better image quality and defect detection performance, a testing sample is divided into 6 parts for image acquisition. Thus, an entire testing sample is equally captured into 6 testing images to clearly display the details of object contours on each image (Figure 7). This study uses Otsu method to binarize the testing images for separating the objects from the background and then apply Sobel edge detector to the binary images for obtaining the edge information of the objects. Figure 8 shows the results in process of image binarization and edge detection: (a) primitive image, (b) binary image, (c) edge image. The edge information of objects on each image are clearly recorded. Shape is a main measure for comparing objects based on their contours and physical structures. Fourier descriptors (FDs) offer a means of depicting the pattern of a 2-D closed form by conducting the Fourier transform of the border, where every (x, y) point on the border is mapped to a complex number x+yi. The primitive shape can be rebuilt by taking the reverse Fourier transform. The low-frequency coeffi cients in Fourier domain are usually the most signifi cant and are applied to obtain shape descriptors. Shape descriptors utilizing Fourier transformed components are invariant to variations of shape borders. A conventional method to deal with FDs is to let the descriptors correlated to values higher than a given frequency to zero and then reconstruct the shape. The infl uence of this operation is to smoothen the object's border, that is a low-pass fi ltering of the shape. Because the mirror shapes can be estimated by a little number of frequencies, FDs are used to rebuild the shapes of normal mirrors and further identify the defectives. Let x(z) and y(z) be the coordinates of the z-th pixel on the border of a specifi ed 2-D object having N pixels (xi, yi) where i = 0, 1, 2, ..., N-1, the complex numbers can be formed as s(z) = x(z) + j y(z): where j = √(-1). The FDs of this object are defi ned as the 1-D discrete Fourier transform of s(z): ( Since the discrete Fourier transform is reversible, all the details regarding the object is included in the FDs. The primitive shape can be restored from the reverse Fourier transform: If merely some coeffi cients of the reverse are utilized, the border turns into simple. We can adopt P<N FDs correlated to the low-frequency coeffi cients of the border to depict the 2-D object. The rebuilt shape on the basis of these FDs approximates the object without the high-frequency coeffi cients: It seems that the rebuilt images utilizing a few percentage of the low-frequency coeffi cients are highly close to the primitive image, which can be rebuilt utilizing a full percentage of the FDs. This is because the low-frequency coeffi cients offer almost all of the messages regarding a shape. High-frequency coeffi cients are simply infl uenced by noise and merely stand for trivial details, often with little value to shape recognition. After the edge coordinates of a shape is transformed to 1-D Fourier descriptor domain, the low-frequency coeffi cients are located in the middle of the series and the neighborhood is the recovery interval to be retained. After retaining the portion of P low-frequency coeffi cients in the middle and assign the other coeffi cients to zero, we take reverse Fourier transform to obtain the approximated coordinates of the primitive shape. The selected recovery points are denoted as: (5) where K is the total edge points, P is the number of recovery points, a is the index of 1-D Fourier descriptors. Figure 9 shows how the recovery points are selected in the Fourier descriptors. The lower-frequency FDs have information regarding the widespread shape, and the higher-frequency FDs have information regarding the trivial details. Since the Fourier transform has a complex-valued transform, the frequency domain has negative-frequency coeffi cients, posi- Figure 9: The selection of recovery points in 1-D Fourier descriptors tive-frequency coeffi cients, and the DC coeffi cients in the middle. Consequently, the reverse Fourier transform with P < N coeffi cients requires to include both positive and negative components. When an object has protruding or dent parts, the FD can rebuild an approximated shape of the object without a bumpy surface by selecting the proper recovery parameters to retain low-frequency components.
By recovering a few low-frequency coeffi cients, the Fourier descriptor can reconstruct a resemble shape of the object boundary. Since the edge point number of testing objects are distinct in applications of industrial inspection, we select a fi xed percentage of the total number of edge points as the recovery points. The fi xed percentage is called retaining rate Pr and the number of recovery points is determined as: (6) In general, the Pr values within 5% ~ 10% can rebuild an approximated shape of a boundary [23]. If an object with a large indentation needs to be recovered, a less retaining rate will be selected. Only a few low-frequency coeffi cients are adequate to depict and rebuild the contour of boundary nearly. However, if these high-frequency coeffi cients are straight eliminated for boundary compression, the rebuilt segment will tend to be closed and result in extreme distortions. In the ordinary use of FDs, the discrete Fourier transform is directly conduct on the entire border sequence, whereas under small retaining rates, contents such as corners and acute angles will be removed. The object boundaries in the rebuilt image are easy to be over-smoothed or under-smoothed if an inadequate retaining rate is chosen in the Fourier descriptors method. Thus, it is vital to determine how many low-frequency coeffi cients need to be chosen and applied in the rebuilt process. With more coeffi cients, the object resembles the primitive. With fewer coeffi cients, the object turns smoother and rounder. Figure 10 shows the rebuilt effects of object contours for different retaining rates Pr. Apparently, the rebuilt shapes utilizing a few percentage of the low-frequency coeffi cients are quite close to the real shape, which can be perfectly rebuilt utilizing all of the FDs. However, if too little low-frequency coeffi cients of the reverse transform are utilized, the border turns into simple. After an enough portion of the low-frequency coeffi cients are utilized to rebuild the object, we obtain a fi gure very close to the real shape of the object. Figure 11 shows the rebuilt process of an object contour image. We apply Sobel edge detector to the binary image for obtaining the edge information of the object and extract the contour information of the edge image by Fourier descriptors. By choosing a suitable retaining rate, the low-frequency components are recovered to rebuild the object edge and obtain the rebuilt contour image for further comparison of image differences. For comparing the differences between the binary contour image (im(x, y)) and the rebuilt contour image (rim(x, y)), we use image subtraction to obtain the resulting difference image (R(x, y)) expressed as, After the two images are subtracted, the remaining parts in the difference image are the inspected profi le fl aws. Figure 12 displays the comparison of image differences.

EXPERIMENTS AND DISCUSSION
To strengthen the visibility of object edges on surfaces of car mirrors in the stage of image acquisition, we make use of the following equipment in the developed vision system: a white LED backlight plate with size of 300 x 300 mm, a 500M-pixels color CCD, a lens with focal length 12 mm, and a three-axis XYZ electronic controlled table. To clearly acquire the damaged edges on each mirror, six images are equally captured for a testing sample. Figure 13 shows the schematic diagrams (top view and side view) of image acquisition for a testing mirror. Experiments are conducted on 80 real car mirrors (30 normal mirrors and 50 defective mirrors) to assess the manifestation of the suggested scheme. Each image of a partial car mirror has a dimension of 256 by 256 pix Figure 13: Schematic diagrams of image acquisition for a testing mirror els with an intensity of 8 bits. This profi le fl aw inspection arithmetic is implemented in C++ programming language and conducted on the 6th edition of C++ Builder compiler on a desktop computer (Intel Core i5-4210M CPU @ 2.60GHz 2.60 GHz). To quantitatively confi rm the capability of the recommended approach, we compare the outcomes of these assessments against those provided by technical assessors (i.e. ground truth). The manifestation evaluation measures, (1-α) and (1-β), are adopted to stand for exact inspection decisions; the larger the two measures, the more exact the inspection results. Incorrect alert rate (α, regarding normal districts as fl aws), divide the area of regular district inspected as fl aws by the area of real regular district to get the mistake. Absent alert rate (β, failing to alert real fl aws), divide the area of undetected real fl aws by the area of real fl aws to get the mistake. For the two measures, the smaller the measure value, the better the inspection outcome [26]. Figure 14 shows a user interface layout of the implemented profi le fl aw inspection system. The interface layout depicts the results and differences conducted by the recommended method of Fourier descriptors in various stages for detecting profi le fl aws in appearances of car mirrors. The image (1) is a captured image from a portion of a testing sample. The image (2) is a binary image of applying the Otsu method to the testing image and the image (3) addresses the mirror profi le after the Sobel edge detectors are executed. The image (4) is a reconstructed profi le image after some low-frequency coefficients specifi ed by the assigned retaining rate were recovered in Fourier domain and then the reverse Fourier transform was taken. The image (5) is the corresponding reconstructed binary image of image (4). The image (6) reveals that the profi le fl aws in the mirror appearance are exactly identifi ed in a binary image, no matter of thecurved surfaces and high refl ection. Selection of the key parameter Pr, retaining rate, in the FDs method will signifi cantly infl uence the inspection results of the damaged edges. To assess the infl uence of changing various retaining rates after the procedure of reverse Fourier transform, experiments present the performance indices of detection results by Pr from the range 3.3 to 3.8. Figure 15 shows locations of the two paired indices (α, 1-β) on the ROC (Receiver Operating Curve) plane [27]. The size of retaining rate 3.5 is more appropriate to stress fl aws inspected in this rebuilt image. The tests on a diversity of original images have verifi ed that retaining rate 3.5 achieves good satisfactory points on the ROC plane for this profi le defect inspection application. Figure 16 depicts the outcomes of fl aw inspection by setting the retaining rate Pr=3.5. One known scheme regularly applied to shape description is compared with the proposed approach to contrastthe effects of profi le fl aw inspection. To demonstrate the fl aw inspection outcomes of a whole testing sample, Figure 17 demonstrates fractional outcomes of inspecting profi le fl aws by the curvature method [13], the proposed approach, and the manual inspection, separately. The curvature method makes lots of wrong decisions (absent alerts) on profi le fl aw inspection. The suggested method inspects almost all of the profi le fl aws and make less wrong decisions. Therefore, the suggested technique excels the curvature method in the profi le fl aw inspection of car mirrors with high refl ection and curved surfaces.  than does the curvature scheme, 88.56%, applied to profi le fl aw detection of car mirrors. More specifi cally, the recommended approach not only has a larger fl aw inspection rate but also has a smaller incorrect alert rate utilized to inspect the profi le fl aws on car mirror images. The means of execution time for dealing with an image of size 256 by 256 pixels are as following: 0.18 seconds by the curvature method and 0.32 seconds by the suggested approach. The mean execution time of the suggested approach is almost two times longer than that of the curvature method, but it is acceptable for practical implementation of an automated visual inspection system. The proposed approach surmounts the troubles of inspecting profi le fl aws on curved surfaces of car mirrors with high refl ection and overbears in its ability of exactly distinguishing profi le fl aws from normal districts.

CONCLUSION
This research applies Fourier transform based shape descriptor technique to the automatic inspection of profi le defects in uneven contours of car mirrors. This Fourier descriptors scheme achieves self-comparison between the testing image and the rebuilt one and does not require feature extraction and shape matching procedures. The suggested approach does not rely on any standard pattern for comparison and it is without the part positioning problem. Experimental results demonstrate that the proposed method reaches a large 85.05% probability of exactly distinguishing profi le defects from rough boundaries and a small 0.07% probability of wrongly inspecting normal districts as profi le fl aws on uneven contours of car mirrors. Two limitations of the current method need to be conquered in the further study, it will make lots of absent alerts if the profi le defects are clustering in a narrow range, and it is not sensitive to distinguish the profi le defects with gradual change in shapes.