# Image-Based Scratch Detection by Fuzzy Clustering and Morphological Features
## 1 Introduction  
Detection 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]. Good 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]. [PERSON] 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 beinginsensitive 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]. A 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]. Morphological 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].