Optimization algorithm based on laser detection
Through laser-based detection methods and support vector machine algorithms, automated detection of surface defects in metal products is realized, solving the problems of subjectivity and low efficiency of manual detection, providing efficient and accurate surface defect identification capabilities, and is suitable for hazardous environments .
Patent Information
- Application Number
- CN202410518078.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-28
- Publication Date
- 2024-08-23
AI Technical Summary
Existing technologies have problems with surface defect detection of metal products, such as subjectivity, low efficiency, and difficulty in identifying small defects in hazardous environments. In particular, manual detection is susceptible to fatigue and physical limitations, and is difficult to perform accurately without contact. detection.
Using a laser-based detection method, the support vector machine (SVM) algorithm is used to classify and analyze object surface images, and scattered light is captured through laser projection, filters, polarizers and charge-coupled device (CCD) cameras for image processing and Feature extraction to achieve automated detection.
It improves the accuracy and efficiency of detection, can identify surface defects without contact, reduces labor costs, is suitable for hazardous environments, and appropriately reduces image resolution to increase calculation speed while maintaining high accuracy.
Smart Images

Figure CN118537620A
Abstract
Description
Technical Field Background Art
[0001] Metal materials, such as steel and aluminum, have been widely used in the aerospace industry, automobile manufacturing and construction industries. However, in the actual production process, the product may be damaged by the machine, thus reducing the quality of the product. On the other hand, customers not only pay attention to the function of the product, but also care about the appearance of the product. Therefore, in order to ensure the quality of the product, it is necessary to capture surface defects, which are defined as physical or chemical unevenness on the surface of the product. Typical surface defects are irregular scratches, spots, dents on the surface of metal objects or damage, stains on non-metallic surfaces. These can greatly reduce the aesthetics and performance of the product, which shows its importance in the manufacturing process and has attracted the attention of engineers.
[0002] At present, manual inspection is still the most commonly used surface inspection method for industrial products. However, this method is susceptible to subjective factors, work experience and physical limitations. For example, workers are easily fatigued during repeated inspections of products, which reduces efficiency. In addition, due to the physical limitations of the human eye, it is difficult for workers to identify small defects even with a magnifying glass. However, these problems can be alleviated or even solved by automatic inspection technology. Advanced algorithms and fast calculations guarantee its accuracy and efficiency. These technologies are applied to machines, which can run for a long time, reducing labor costs and increasing working time. In addition, automatic inspection technology can identify defects without contact. It captures digital images through equipment and processes these images through a pre-trained system. Finally, the system outputs a classification result. Due to zero contact, this technology can be applied to dangerous production environments. Compared with automatic inspection technology, manual inspection requires close inspection of products, which may not be allowed in dangerous environments. Summary of the invention
[0003] In order to overcome the above-mentioned defects, the object of the present invention is to provide an optimization algorithm based on the laser detection method.
[0004] To achieve the above object, the optimization algorithm based on the laser detection method of the present invention comprises the following steps:
[0005] Collecting images of the surface of the object being irradiated by laser;
[0006] Classify images;
[0007] Adjusting the resolution of the classified image to a predetermined size;
[0008] Perform detection on the adjusted image.
[0009] Furthermore, the step of classifying the images adopts a traditional support vector machine (SVM) algorithm as a classifier to classify the images.
[0010] Furthermore, the predetermined size is a resolution of each image of 25*25-10*10.
[0011] Furthermore, the predetermined size is a resolution of each image of 15*15-10*10.
[0012] Furthermore, the step of collecting images includes: using a camera to take a picture of the surface of the object after the laser projection.
[0013] Furthermore, the step of classifying the image is to use a traditional support vector machine (SVM) algorithm as a classifier, and the classifier is pre-trained using a standardized reference data set to predict defective images.
[0014] Furthermore, the step of collecting images includes: the test sample is mounted on a rotating platform; the laser is projected onto the surface of the test sample through a filter and a polarizer and is reflected by a mirror; the scattered light is projected onto the screen of the detector and the scattered pattern is captured by a camera; and the obtained pattern is processed by a computer.
[0015] The present invention is based on the working principle and basic structure of a machine vision surface defect detection system; a traditional support vector machine (SVM) algorithm is used as a classifier to classify and analyze images, and it is found that when the resolution of the image is reduced from 25×25 pixels to 15×15 pixels, the prediction accuracy can be maintained at 1. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a flow chart of the method of the present invention.
[0017] Figure 2 It is a system structure diagram of the present invention.
[0018] Figure 3 It is a schematic diagram of the image sampling process in the present invention. DETAILED DESCRIPTION
[0019] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0020] In the description of the present invention, it should be understood that the terms "center", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0021] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "plurality" means two or more.
[0022] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0023] like Figure 1 As shown, when the laser is projected onto the object, it is scattered by the surface of the object and captured by the camera. The camera converts the light into a digital signal and outputs it to the classifier (SVM) to predict the result. The classifier is pre-trained using a standardized reference dataset and is able to predict defective images. Support Vector Machine (SVM) is an algorithm applied to classification and regression tasks. Generally, SVM is a linear classifier that can be trained using a dataset to identify decision boundaries. However, it can also perform well on non-linear classification tasks by using a kernel, which can map the input to a high-dimensional space. The algorithm of the classifier used in this project is a One-Class SVM, which is trained by a dataset with only a single class. Therefore, the model is expected to identify such data in order to distinguish novelty by comparing the features between the training data and the test data.
[0024] One-class SVM is a variation compared to SVM, which is an unsupervised learning algorithm as it is trained using only a single-class dataset which does not require labeling. This variation of SVM was developed to address the maximum margin between positive and negative samples.
[0025] The object surface detection system of the present invention comprises a human-machine interface module, an image acquisition module, a processing module, an analysis module, a data management module and an analysis module. A light source, an optical lens, a charge coupled device (CCD) camera and a clamping mechanism are used to take pictures of the surface of an object. Figure 2 This is the equipment used in the experiment. The laser is projected onto the surface of the test sample through a filter and a polarizer. The test sample is mounted on a rotating platform to study the effect of the laser incident angle on the test sample. Then it is reflected by a mirror. The scattered light is projected onto the screen of the detector, and the scattered pattern is captured by a camera. Afterwards, the obtained pattern is processed by a computer.
[0026] Optical lenses can be used to project objects onto sensors, which then convert optical signals into electrical signals and finally into digital signals. Currently, charge-coupled devices (CCDs) are image sensors, and CCD-based industrial cameras are the most common type.
[0027] The light source affects the image quality and is configured to overcome the interference of ambient light in the experiment so that the image can be generated stably and a very high contrast image can be obtained. Due to changes in the surrounding environment, the photoelectric conversion of the CCD image, transmission circuit and electronic components may produce noise in the image; and this noise may hinder the processing and analysis of the image, so the image can be pre-processed to remove the noise. Image enhancement of the entire image or a specific part of the image is the process of improving the image quality to make the original image clear or to draw attention to specific features. This helps to expand the distinction between various types of objects, thereby improving the recognition ability of the image and the recognition effect it produces.
[0028] The image analysis module includes parts such as feature extraction, feature selection and image recognition. The goal of feature extraction is to extract expressions from pixels that identify target features and map the differences between multiple targets into a low-dimensional feature space. This allows the amount of data to be compressed and the recognition rate to be improved. The extraction of features such as texture features, geometric features, color features and transform coefficient features are standard features for identifying surface defects. There is often redundant information between these features, which means that it is not certain that the feature set is optimal. These fused feature vectors are used to accurately distinguish between multiple different types of faults. Therefore, in order to produce a high-precision classification, more features must be selected from the feature set. This process is called feature selection. The remaining feature set is used to train the classifier so that it can correctly identify and classify the type of surface defects. The human-machine interface module immediately displays the results such as the fault type, location, shape and size.
[0029] The reference object is mounted on a rotating platform, e.g. Figure 2 The target is rotated at an angle interval of 10° to obtain 36 scattered images. The image processing process is as follows: Figure 3 The reference object is mounted on a rotating platform, as shown in Figure 2 As shown. The object is rotated at an angle interval of 10° to obtain 36 scattered images. Since the resolution of each image is 6000×4000 pixels, it is downsampled and 25 sub-images with a resolution of 3800×3800 pixels are extracted from the original image. The test pattern is obtained after circular masking, rotation and other operations are performed on the 25 sub-images; the pixels of the test pattern are adjusted to a predetermined size; the present invention aims to use machine vision to determine whether there are defects on the outside of the product. The experimental results show that when the image resolution is 25*25, the classifier is able to predict the defective surface of the object with 100% accuracy. In this way, the original 25*25 resolution photo is reduced to 20*20, 15*15, 10*10 and 5*5, and then fed to the classifier for prediction. The optimal plane can be determined by this method because the plane with resolution problems can be found, because the main goal is to ensure the accuracy of the classifier prediction.
[0030] The results show that when the resolution is reduced from 25×25 pixels to 15×15 pixels, the accuracy can be maintained at 1. However, as the resolution is reduced to 10×10 pixels, the accuracy begins to decrease from 1 to 0.77. This may be due to the distortion of the features of the defects and the inability of the SVM algorithm to extract features from low-resolution images. Therefore, this result shows that the resolution of the image can be appropriately reduced in the classification task, which can increase the calculation speed. This is useful in actual production lines that require high efficiency. This is also a hint that the SOTA (state of the art) model pays attention to low-resolution images and improves efficiency.
[0031] Table 1: AUC index and time
[0032]
[0033] The area under the curve (AUC) is used to determine the accuracy of the prediction results. The higher the AUC value, the more accurate the result. The time line represents the time the computer spent in the prediction process. Under the condition of AUC value of 1, the calculation time can be reduced to 1.279 milliseconds with an image resolution of 13×13. The results show that the highest accuracy of the identified plane is achieved when the image resolution is between 15×15 and 10×10.
[0034] The present invention is described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of ordinary technicians in the field without departing from the purpose of the present invention. Many other changes and modifications that do not depart from the concept and scope of the present invention should be regarded as the protection scope of the present invention.
[0035] In the description of this specification, specific features, structures, materials or characteristics may be combined in an appropriate manner in any one or more embodiments or examples.
[0036] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. An optimization algorithm based on a laser detection method, characterized in that: The method comprises the following steps: Collecting images of the surface of the object being irradiated by laser; Classify images; Adjusting the resolution of the classified image to a predetermined size; Perform detection on the adjusted image.
2. The optimization algorithm based on the laser detection method as claimed in claim 1, characterized in that: The step of classifying the images adopts the traditional support vector machine (SVM) algorithm as a classifier to classify the images.
3. The optimization algorithm based on the laser detection method as claimed in claim 1, characterized in that: The predetermined size is that the resolution of each image is 25*25-10*10.
4. The optimization algorithm based on the laser detection method according to claim 1, characterized in that: The predetermined size is that the resolution of each image is 15*15-10*10.
5. The optimization algorithm based on the laser detection method as claimed in claim 1, characterized in that: The step of collecting images includes: using a camera to take pictures of the surface of the object after the laser is projected.
6. The optimization algorithm based on the laser detection method according to claim 1, characterized in that: The step of classifying the image is to use a traditional support vector machine (SVM) algorithm as a classifier, and the classifier is pre-trained using a standardized reference data set to predict defective images.
7. The optimization algorithm based on the laser detection method according to claim 1, characterized in that: The steps of collecting images include: the test sample is installed on a rotating platform; the laser is projected onto the surface of the test sample through a filter and a polarizer and reflected by a mirror; the scattered light is projected onto the screen of the detector and the scattered pattern is captured by a camera; and the obtained pattern is processed by a computer.
