## 1 Introduction
reduce background noise from input images, and then the Otsu threshold method was used for segmentation, and finally a Support Vector Machine was used for classification. In the study by [PERSON] et al. [13], a local binary pattern method for adjacency evaluation was proposed, which modified the threshold scheme of the completed local binary pattern by constructing the adjacency evaluation window. [PERSON] et al. [14] proposed a non-subsampled shearlet transform and the kernel locality preserving projection (NSST-KLPP) to identify surface defects of aluminum strips. In this work, 230 scratch defect samples were used and the recognition rate is 95.65%. [PERSON] et al. [15] used a deep learning based YOLO (You Only Look Once) network to detect the different surface defects on steel strips, and achieved a 99% successful detection rate with high speed (83 FPS). [PERSON] et al. [16] used a baseline convolution neural network to generate feature mapping, proposed a multi-level feature fusion network to locate defect details, and then used a regional suggestion network (RPN) to generate regions of interest. [PERSON] et al. [17] developed an automatic system to detect surface scratches on tubes of high curvature. The algorithm was divided into two steps, respectively, designing a two-dimensional directional filter to enhance the contrast between the scratches and background, and using an improved adaptive threshold method to automatically detect the edges of scratches on the filtered image. [PERSON] et al. [18] proposed a semi-supervised learning method combing the convolutional autoencoder and semi-supervised generative adversarial network to detect and classify the defects on the hot rolled plates. [PERSON] et al. [19] utilized attention mechanism and unified detection to address the challenging defects on an aluminum profile surface. Although different kinds of machine vision methods have been proposed to detect defects on material surface as mentioned above, none of them are suited to detect the scratch defects of the aluminum flat tube due to the reasons explained above. In order to address this problem, a new scratch detection and location system based on a cubic Bezier curve fitting using a linear scan camera was proposed in this paper. The novelties of the paper are:  
* A new scratch detection and location system was proposed to find local maximums based on Bezier curvature calculation and curve fitting. By using this technique, the stability and accuracy of curvature peak localization in the complex clutter background was improved significantly. * Monte Carlo sampling was used to find the optimal four control points location of the Bezier curves. By using the Monte Carlo scheme, the optimal control points can be found in a less time-consuming way, which is important in real-time application. * The scratch detection using the proposed method, achieved in real-time processing, based on a linear scan camera. The paper is structured as follows. The next section explains the details of the proposed scratch detection method including image preprocessing, Bezier curve presentation, Monte Carlo sampling and Bezier curve curvature and local maximums extraction. Section 3 introduces the parameters setting, experimental results and analysis. Section 4 outlines the conclusions and future research.