Image-Based Scratch Detection by Fuzzy Clustering and Morphological Features
필름·전자재료 · (13) 프리즘 필름
기본 정보
- 저자
- DOI
- 10.3390/app10186490
- 저널
- Applied Sciences
- 발행년도
- 2020
- 발행기관
- Multidisciplinary Digital Publishing Institute
- 피인용수
- 5
- 라이선스
- cc-by
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.3390/app10186490
- 토픽
- Surface Roughness and Optical Measurements
- OpenAlex ID
- W3087089863
평가 내용
- 관련도
- 사업분야
- 필름·전자재료 · (13) 프리즘 필름
- 부 분야
- –
- R&D 측면
- –
- 확신도
- –
- 근거 용어
- –
- 판단 근거
- 임베딩 유사도 기반 평가로 '필름·전자재료 > 프리즘 필름' 분야에 선정된 논문입니다.
- R&D 활용 포인트
- –
- 평가 입력
- –
초록
본문 22,587자
본문 펼치기
섹션 본문 32문단 · 21,852자
(제목 없음)
1Detection of scratch defects on randomly textured surfaces remains challenging due to their unnoticeable visual features. In this paper, an algorithm for piezoelectric ceramic plate surface scratch defects based on the combination of fuzzy c-means clustering and morphological features is proposed. Foreground membership of each gray value is calculated firstly on a reference set of training images by fuzzy c-means clustering and the interpolation method, then an enhanced image is obtained by multiplying the foreground membership function and gray image. The location relationship between regions and the gradient direction of regions is extracted from the binary image of the enhanced image. Based on the morphological features, isolated non-scratched defects are filtered out and the intermittent scratches are merged. Experiments show that the algorithm can be used to detect scratch defects on the surface of a piezoelectric ceramics plate with randomly textured surfaces.
Introduction
2Detection of piezoelectric ceramic plate surface defects is essential to maintain performance in a range of applications. Scratching is a common surface defect, which takes a lot of manpower to repeatedly detect by the naked eye [1]. Scratches are small in scale and can be different in shape. The detection process is easily affected by illumination and background [2]. It is very difficult to extract features. Therefore, scratch defect detection has always been a difficult problem in product surface quality detection [3]. In order to solve this problem, researchers have done a lot of work [4][5][6]. In machine vision technology, scratch detection has been addressed mainly in the field of image processing by utilizing an optical microscope under good lighting conditions [7][8][9][10][11][12][13], Convolutional Neural Networks (CNN) [14][15][16], and mathematical morphology [17][18][19][20][21][22].
3Good and uniform illumination from an external light source is essential for machine vision applications to function. The optimal position of the light source is the lighting incident angle [7,8]. Puntous et al. proposed two thresholds that characterize the visualization of scratches: a visibility threshold as well as an acceptability threshold. The total optical contrast is a combination of the size of the scratch and the contrast in specular and off-specular scattering. A lighting transform method based on a low pass Butterworth filter was first developed to convert the non-uniform intensity distribution on spherical oranges into a uniform intensity distribution over the whole fruit surface [9]. Another dedicated optical system technology is designed for the measurement of surface states by the method of variation of focus. A comparative analysis of the merits and lack of diffractive optics and refractive optics in the problems of the formation of nonparaxial Bessel beams has shown the superior ability of diffractive optics applications in crystal optics [10]. A method with the advantage of being insensitive to both object rotations and pattern orientation has been put forward for solving anomaly detection problems by using reflectance transformation imaging data based on a local assessment of the reflectance across the inspected surface [11].
4A deep learning algorithm for surface scratch detection has also been proposed. A SpiralNet framework of a deep learning and optimization method to train the network was proposed for the task of automatic crack detection on highly imbalanced training samples [12]. The algorithm, which automatically detects defects on randomly textured surfaces, was designed by employing three different architectures of convolutional neural networks [13]. A fully connected convolutional encoder-decoder for defect detection in archived video was presented. The proposed method handles the detection of two of the most common archived video-related defects, namely blotches and scratches [14].
5Morphological operators are widely used in binary image processing for several purposes, such as removing noise, detecting contours or particular structures, and regularizing shapes [15]. A method with high detection accuracy with extremely fast speed detecting tiny surface defects was proposed based on normal maps of metal parts [16]. The proposed edge detection method based on a two-dimensional (2D)-direction filter and a modified adaptive threshold method was used to automatically detect the edge of the scratches on a filtered image [17]. A multi-scale line detection method was used to efficiently extract shallow scratches [18]. Morphological operations with arc-shaped SEs were proposed without polar transformation, which can achieve high detection accuracy for various small defects, including scratches, bumps, and edge bursts [19]. The method, based on the adaptive sector scanning algorithm (ASC) and cascading mean variance threshold algorithm (MVTH), was designed to detect intermittent scratches on a polished surface [20].
6In this paper, the light-field surface detection system is shown in Figure 1. The hardware part is composed of two strip light sources, a lens with little distortion, an industrial camera, and the piezoelectric ceramic plates on a conveyor belt. The industrial camera and lens are mounted directly above the conveyor belt. In order to enhance the quality of images of surface scratch defects, the length of the strip light source is twice as long as that of the ceramic chip, and the strip light source irradiates the ceramic plate at a low angle. A new detection method utilizing the fuzzy c-means (FCM) algorithm and morphological characteristics is presented to extract piezoelectric ceramic plate surface scratches. The method aims to enable automated recognition and a simple offline learning process. The research is focused on detecting surface scratches on a piezoelectric ceramic plate.
7pl. Sci. 2020, 10, x FOR PEER REVIEW 3 of 1 Figure 1. Low-angle strip light illumination light-field surface imaging system schematic diagram.
. The FCM Algorithm
8The fuzzy c-means (FCM) algorithm proposed by Dunn [21] and Bezdek [22] is the best know d most used detection method. It is a method for finding groups within data with the mos ilarity in the same cluster and the most dissimilarity between different clusters [23]. The piezoelectric ceramic plate image I is an ( , ) 2D matrix. Let = ( , , ⋯ , )′ be th In the preparation process of a piezoelectric ceramic plate, when there are improper processing methods, scratches will form on its surface, which degrade the piezoelectric, dielectric, and elastic properties. When working under high voltage, it is easy to crack, which affects the service life and utilization value of the product. In the method proposed in this paper, FCM was used to cluster the foreground and background of the ceramic image offline, and the foreground membership degree of the gray value was calculated. Online, the membership degree and a normalization operation were used to enhance the ceramic image, then the scratch was segmented according to the morphological analysis method. This provides a new method for surface scratch detection on piezoelectric ceramics.
9The structure of this paper is as follows. In Section 2, the FCM algorithm and its application in image enhancement are briefly reviewed. Section 3 is devoted to the analysis and extraction of morphological features for binary enhanced images. In Section 4, the outline of the scratch detection working steps and experimental results are presented. Finally, this article ends with a conclusion in Section 5.
The FCM Algorithm
10The fuzzy c-means (FCM) algorithm proposed by Dunn [21] and Bezdek [22] is the best known and most used detection method. It is a method for finding groups within data with the most similarity in the same cluster and the most dissimilarity between different clusters [23].
11The piezoelectric ceramic plate image I is an (M, N) 2D matrix. Let x = (x 1 , x 2 , · · · , x n ) be the dataset constituted by gray values of image I, with n = M × N. The FCM objective function is defined as follows:
12where the weighting exponent 1 < m < +∞ presents the degree of fuzziness, and u ik and v = (v 1 , v 2 ) are the fuzzy membership of the value x i in the kth cluster and the cluster center vector, respectively. The optimum solution for minimizing J(u, v) can be calculated by updating the equations as follows:
13In industrial visual defect detection, the illumination environment is relatively stable. This means that the spatial distribution of the gray value of the same kind of piezoelectric ceramic plate image is relatively fixed, as in Figure 1. Therefore, a dataset composed of gray images can be collected to analyze the foreground membership of the gray value in the image when the light environment and camera are fixed. This process can be completed offline. Figure 2 shows the scratch images under the imaging system shown in Figure Define the scratch area as the foreground and the non-scratch area as the background. Then, the background and foreground membership of each pixel in the image can be obtained from Formulas (3) and (4). In Figure 3, the FCM algorithm was used to cluster the foreground and background images with scratches in Figure 2. Figure 3a shows the changes in the clustering centers of foreground and background gray values with the number of iterations. It can be found that the clustering centers are basically stable after two iterations. Figure 3b shows the foreground membership of different gray values in the clustering results. It can be found that the membership degree is about 0.5 when the gray value is 117-118. Define the scratch area as the foreground and the non-scratch area as the background. Then, the background and foreground membership of each pixel in the image can be obtained from formulas (3) and (4). In Figure 3, the FCM algorithm was used to cluster the foreground and background images with scratches in Figure 2. Figure 3a shows the changes in the clustering centers of foreground and background gray values with the number of iterations. It can be found that the clustering centers are basically stable after two iterations. Figure 3b shows the foreground membership of different gray values in the clustering results. It can be found that the membership degree is about 0.5 when the gray value is 117-118.
14Let the foreground membership vector of the gray value calculated by the FCM be ∈ , ∈ 0, 1 , = 1, ⋯ , 256. A new image , obtained by preprocessing, was composed of the product of the gray value of each pixel of the image and its corresponding foreground membership coefficient (2 − 1), such as in Figure 3b. In order to further enhance the foreground gray value in the image, we replaced the product of the gray value and the corresponding foreground membership value by formula (5), as follows:
15In Figure 4, the enhanced results for images in Figure 2 were obtained by FCM clustering results and formulas (4)-(5). Let the foreground membership vector of the gray value calculated by the FCM be f ∈ R 256 , f i ∈ [0, 1], i = 1, · · · , 256. A new image IF, obtained by preprocessing, was composed of the product of the gray value of each pixel of the image and its corresponding foreground membership coefficient (2 f i − 1), such as in Figure 3b. In order to further enhance the foreground gray value in the image, we replaced the product of the gray value and the corresponding foreground membership value by Formula (5), as follows:
16where i = 1, · · · , M, j = 1, · · · , N. We standardized image IF by
17In Figure 4, the enhanced results for images in Figure 2 were obtained by FCM clustering results and Formulas (4)-(5).
Scratch Region Segmentation
18Binary image IFB came from the image IF with a threshold segmentation parameter of 0.6. The experimental results show that segmentation parameters with 0.5-0.7 had little effect on the later detection results. We then removed all connected components that had fewer than P pixels from the binary image IFB. The threshold P was selected according to the actual detection target and accuracy requirements. In the detection of scratches on the surface of piezoelectric ceramic plates, P = 30 was selected.
Scratch Area Growth Based on Multiple Features
19In binary image IFB, some connected regions are isolated and are non-scratched, which need to be further distinguished. In addition, some shallow scratches are not segmented because of the small gray value. In fact, because scratches are usually caused by cutting tools or other sharp objects passing through the surface of mechanical parts, their shapes show obvious strips and maintain strong directional consistency. The direction gradient can be approximated by the mean slope of two pairs of connected domains and the orientation angle of the long axis of each region. The scratch depth varies with the magnitude of the force applied. Therefore, scratches in the image will appear intermittently and have a non-linked morphology. Some isolated areas may be part of the scratch, while discontinuous areas may be missed.
20In order to improve the accuracy of scratch detection, it was necessary to extract the location relationship between regions, the gradient direction of regions, and the local gray distribution around regions [24]. These features will be used to further determine whether the segmentation area is scratched or not.
21First, calculate the minimum distance between regions and constitute distance matrix D, D ∈ R s×s , where s is the number of regions in binary image IFB, merging the two regions into one if the distance between them is less than distance threshold DT (D(i, j) < DT, i = 1, · · · , s, j = 1, · · · , s, i j).
22Second, when the scratches on the surface of the piezoelectric ceramic plate are discontinuous and the discontinuous distance is large, it is not enough to merge the regions depending only on the Euclidean distance. According to the linear characteristics of scratches, the discontinuous scratches are approximately distributed on a line as shown in Figure 5a. In Figure 5a, k represents the slope and b represents the intercept. The line coefficients (k i , b i ), i = 1, 2, · · · , N can be calculated by the least square method on every region. Then, some isolated non-scratched regions are excluded by the critical distance clustering method on the set of regional linear parameters. The clustering results are shown in Figure 5b, where the blue part represents the area reserved and the red part represents the area eliminated.
23If a region is far away from all other regions, it is judged as an isolated region. Isolated regions may be part of the background or scratch, which needs to be further judged by the gray value and membership distribution in the extended area of its outer rectangle. The extended area is a sector-shaped area along the long and short axis of the outer rectangle, with the center point as the circle point, as shown in Figure 5c. In Figure 5c, R represents the major axis of the circumscribed rectangle, and d represents the minor axis of the circumscribed rectangle. To further determine whether the isolated area is part of the scratch, the search area is expanded. The enlarged area is parallel to the outer rectangular long axis, and the spacing is twice as long as the outer rectangular short axis. If there are isolated areas in the enlarged area, and the statistical expectations and variances of the combined regions exceed the prescribed range, they will be regarded as scratches [25].
24To further confirm whether the area is part of the scratch, extract the size of each area, fitting line, mean, skewness, kurtosis, etc. In this study, the length and width of the smallest outer rectangle in the region were chosen as the sizes, and the long axis straight line of the smallest outer rectangle was chosen as the fitting line. Appl. Sci. 2020, 10 If a region is far away from all other regions, it is judged as an isolated region. Isolated regions may be part of the background or scratch, which needs to be further judged by the gray value and membership distribution in the extended area of its outer rectangle. The extended area is a sectorshaped area along the long and short axis of the outer rectangle, with the center point as the circle point, as shown in Figure 5c. In Figure 5c, R represents the major axis of the circumscribed rectangle, and d represents the minor axis of the circumscribed rectangle. To further determine whether the isolated area is part of the scratch, the search area is expanded. The enlarged area is parallel to the outer rectangular long axis, and the spacing is twice as long as the outer rectangular short axis. If there are isolated areas in the enlarged area, and the statistical expectations and variances of the combined regions exceed the prescribed range, they will be regarded as scratches [25].
25To further confirm whether the area is part of the scratch, extract the size of each area, fitting line, mean, skewness, kurtosis, etc. In this study, the length and width of the smallest outer rectangle in the region were chosen as the sizes, and the long axis straight line of the smallest outer rectangle was chosen as the fitting line.
Experiments
26The algorithm consists of three steps: image enhancement utilizing FCM, detection of abnormal regions based on the morphological features, and judging scratch defects, as in Figure 6. Image enhancement was realized by a membership table lookup and normalization. The membership table was composed of the foreground membership degree and interpolation method of offline FCM
27The algorithm consists of three steps: image enhancement utilizing FCM, detection of abnormal regions based on the morphological features, and judging scratch defects, as in Figure 6. Image enhancement was realized by a membership table lookup and normalization. The membership table was composed of the foreground membership degree and interpolation method of offline FCM clustering. Abnormal region detection was obtained for the enhanced image by the threshold technique, eliminating small areas, and merging and deleting regions based on the mathematical morphology. The area size, average value, and skewness were used as criteria to judge whether the abnormal area was a scratch defect.
28In the experiments, the images were gray scale images employing 400 × 800 pixels. The enhanced image was converted to binary by the threshold 179. Then, the area less than 16 in the binary image was deleted. Some regions were merged by the morphological method. Some non-scratched areas needed to be further excluded, as shown in Figure 7. It can be found that the region with scratches can be distinguished by two parameters: the size and the ratio of mean to skewness, as in Figures 8 and 9. According to the application requirements of piezoelectric ceramic plate surface scratch detection, the size and ratio of mean to skewness thresholds were set to 100. According to the size, regions 1, 6, and 8 were scratch areas. According to the skewness, regions 2, 9, 10, and 11 were scratch areas. Figure 10 shows the scratch detection results of the piezoelectric ceramic chip by the method proposed in this paper.
29can be distinguished by two parameters: the size and the ratio of mean to skewness, as in Figures 8 and 9. According to the application requirements of piezoelectric ceramic plate surface scratch detection, the size and ratio of mean to skewness thresholds were set to 100. According to the size, regions 1, 6, and 8 were scratch areas. According to the skewness, regions 2, 9, 10, and 11 were scratch areas. Figure 10 shows the scratch detection results of the piezoelectric ceramic chip by the method proposed in this paper. can be distinguished by two parameters: the size and the ratio of mean to skewness, as in Figures 8 and 9. According to the application requirements of piezoelectric ceramic plate surface scratch detection, the size and ratio of mean to skewness thresholds were set to 100. According to the size, regions 1, 6, and 8 were scratch areas. According to the skewness, regions 2, 9, 10, and 11 were scratch areas. Figure 10 shows the scratch detection results of the piezoelectric ceramic chip by the method proposed in this paper.
Conclusions
30In this paper, an algorithm is proposed for the detection of scratch defects on a piezoelectric ceramic plate surface based on a combination of the FCM method and morphological characteristics. The method proposed in this paper has invariance of rotation and translation for the detection results. Through collecting 20 images from different angles and positions of the same ceramic chip and processing them, it was found that the scratch detection results were consistent. The surface of the piezoelectric ceramic chip has the characteristics of an uneven texture and a random gray value, which affected the accuracy of scratch detection. Experiments show that the algorithm can accurately detect the scratch defects from images with an uneven texture and a random gray value. In order to verify the accuracy of the proposed method for scratch detection, image acquisition and processing were carried out on 30 piezoelectric ceramic slices in 10 positions and directions, respectively. The results show that the proposed method achieves a 100% detection rate and a false alarm rate of 5.63%. Future directions of this work could lead to the development of more types of defect detection. Furthermore, the efficiency of the algorithm will be improved by parallel processing of morphological features extraction.
31Author Contributions: Methodology, Z.T.; software, Y.J.; validation, Z.F., X.X. and B.Z.; investigation, Z.T. and X.X.; resources, Z.T.; data curation, Y.J.; writing-original draft preparation, Z.T. and Y.J.; writing-review and editing, Z.F. and X.X.; visualization, B.Z. All authors have read and agreed to the published version of the manuscript.
32Funding: This research received no external funding.
참고문헌 22건
- Hybrid Defect Detection Method Based on the Shape Measurement and Feature Extraction for Complex Patterns IEICE Transactions on Information and Systems · Institute of Electronics, Information and Communication Engineers · 2000
- Lighting design for machine vision application Image and Vision Computing · Elsevier BV · 2006 10.1016/j.imavis.2005.12.016
- A Fuzzy Relative of the ISODATA Process and Its Use in Detecting Compact Well-Separated Clusters Journal of Cybernetics · Taylor & Francis · 1973 10.1080/01969727308546046
- Ability of quality controllers to detect standard scratches on polished surfaces Precision Engineering · Elsevier BV · 2013 10.1016/j.precisioneng.2013.03.001
- Automatic detection of common surface defects on oranges using combined lighting transform and image ratio methods Postharvest Biology and Technology · Elsevier BV · 2013 10.1016/j.postharvbio.2013.02.016
- Random Texture Defect Detection Using 1-D Hidden Markov Models Based on Local Binary Patterns IEICE Transactions on Information and Systems · Institute of Electronics, Information and Communication Engineers · 2008 10.1093/ietisy/e91-d.7.1937
- A Review of Recent Advances in Surface Defect Detection using Texture analysis Techniques ELCVIA Electronic Letters on Computer Vision and Image Analysis · Computer Vision Center Press · 2008 10.5565/rev/elcvia.268
- Scratch visibility of polymers measured using optical imaging Polymer Engineering and Science · Wiley · 2003 10.1002/pen.10062
- Real-time vision-based defect inspection for high-speed steel products Optical Engineering · SPIE · 2008 10.1117/1.2957958
- Implementation of ordinary and extraordinary beams interference by application of diffractive optical elements Journal of Modern Optics · Taylor & Francis · 2016 10.1080/09500340.2015.1137368
- Detecting Morphological Filtering of Binary Images IEEE Transactions on Information Forensics and Security · Institute of Electrical and Electronics Engineers · 2017 10.1109/tifs.2017.2656472
- A Feature-Reduction Fuzzy Clustering Algorithm Based on Feature-Weighted Entropy IEEE Transactions on Fuzzy Systems · Institute of Electrical and Electronics Engineers · 2017 10.1109/tfuzz.2017.2692203
- Robust Anomaly Detection Using Reflectance Transformation Imaging for Surface Quality Inspection Lecture notes in computer science · Springer Science+Business Media · 2017 10.1007/978-3-319-59126-1_46
- A comparison of quality control methods for scratch detection on polished metal surfaces Measurement · Elsevier BV · 2017 10.1016/j.measurement.2017.12.022
- A novel automatic surface scratch defect detection for fluid-conveying tube of Coriolis mass flow-meter based on 2D-direction filter Measurement · Elsevier BV · 2018 10.1016/j.measurement.2018.05.060
- Segmentation of shallow scratches image using an improved multi-scale line detection approach Multimedia Tools and Applications · Springer Science+Business Media · 2018 10.1007/s11042-018-6222-z
- Defect Detection on Randomly Textured Surfaces by Convolutional Neural Networks 2022 IEEE/ASME International Conference on Advanced Intelligent Mechatronics (AIM) · 2018 10.1109/aim.2018.8452361
- Tiny Surface Defects on Small Ring Parts Using Normal Maps Lecture notes in computer science · Springer Science+Business Media · 2018 10.1007/978-3-030-00776-8_37
- Morphology-based defect detection in machined surfaces with circular tool-mark patterns Measurement · Elsevier BV · 2018 10.1016/j.measurement.2018.10.079
- CNN-based method for blotches and scratches detection in archived videos Journal of Visual Communication and Image Representation · Elsevier BV · 2019 10.1016/j.jvcir.2019.02.005
- Complicated intermittent scratches detection research on surface of optical components based on adaptive sector scanning algorithm cascading mean variance threshold algorithm Tenth International Symposium on Precision Engineering Measurements and Instrumentation · 2019 10.1117/12.2511381
- Spiral-Net with F1-Based Optimization for Image-Based Crack Detection Lecture notes in computer science · Springer Science+Business Media · 2019 10.1007/978-3-030-20887-5_6