Complex workpiece high-precision defect detection method based on dynamic light source and multi-dimensional detection
By adopting dynamic light source and multi-dimensional detection methods in complex workpiece defect detection, combined with laser scanning and structured light projection technology, the deep learning model is optimized, and the problems of high imaging and detection difficulty, limited data acquisition methods, poor algorithm adaptability and limited model generalization capabilities in complex workpiece detection are solved, and high-precision, high-speed and reliable defect detection are achieved.
Patent Information
- Application Number
- CN202510514016.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-06-27
AI Technical Summary
The prior art has problems such as high-precision defect detection of complex workpieces, limited data acquisition methods, poor algorithm adaptability and limited model generalization capabilities in the detection of high-precision defects, resulting in insufficient detection accuracy, efficiency and adaptability, which is difficult to meet the needs of modern manufacturing.
The high-precision defect detection method of complex workpieces based on dynamic light sources and multi-dimensional detection is adopted. Multi-dimensional data acquisition is collected through high-precision laser scanning equipment, the light source parameters and sensor configuration are dynamically adjusted, and data preprocessing and feature extraction are combined with laser scanning and structured light projection technology, and defect detection is carried out through an optimized deep learning model.
It significantly improves the accuracy and reliability of inspection, reduces the detection rate of error missed, accurately distinguishes qualified and defective products, reduces raw material waste and production costs, and improves the real-time and production efficiency of inspection.
Smart Images

Figure CN120213946A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial automation detection and computer vision, and specifically to a high-precision defect detection method for complex workpieces based on dynamic light sources and multi-dimensional detection. Background Art
[0002] In industrial production, defect detection technology is crucial for ensuring product quality and improving production efficiency. Currently, common defect detection methods include manual inspection, mechanical device contact detection, and machine vision detection. Manual inspection is a traditional detection method, but it has many problems such as low sampling rate, low accuracy, poor real-time performance, low efficiency, high labor intensity, and being greatly affected by manual experience and subjective factors. Especially in the discrimination of micro defects, it is difficult to achieve the required accuracy and speed. Although mechanical device contact detection can ensure the detection quality to a certain extent, it has disadvantages such as high price of detection equipment, poor flexibility, and slow speed, and cannot meet the requirements of modern manufacturing for high-efficiency production. Although the Tomsk Polytechnic University in Russia has developed an automated contact detection method for metal parts to reduce detection costs, its equipment still has certain limitations.
[0003] Machine vision detection technology has been widely applied and developed in recent years. It automatically receives and processes object images through optical devices and non-contact sensors to obtain the required information. This technology adopts a non-contact working mode, is flexibly installed, has high measurement accuracy and speed, and the same device can achieve multi-parameter detection of different products, saving equipment expenses for enterprises. Its basic components include an image acquisition module, an image processing module, an image analysis module, and a data management and human-machine interface module. The image acquisition module collects the surface image of the product through a CCD camera, an optical lens, a light source and its clamping device, etc.; the image processing module involves operations such as image denoising, enhancement, restoration, and target segmentation; the image analysis module is responsible for feature extraction, selection, and image recognition, and distinguishes different types of defects by extracting feature vectors such as texture, geometric shape, and color. In addition, the emergence of deep learning machine vision technology, such as the DLIA industrial defect detection system, uses deep neural network models (such as convolutional neural network CNN, recurrent neural network RNN, etc.) to learn and analyze image data, automatically identify and classify various defects, and improves the intelligent level of detection to a certain extent.
[0004] In the field of high-precision defect detection of complex workpieces, the problems existing in the prior art restrict the detection accuracy, efficiency, and adaptability, and it is difficult to meet the requirements of modern manufacturing, specifically as follows:
[0005] 1) Difficulty in imaging and detection
[0006] The shapes and surfaces of complex workpieces are intricate. Existing imaging technologies are interfered by factors such as the environment, lighting, production processes, and noise. Unstable lighting causes overexposure or underexposure of images. Differences in production processes increase the complexity of imaging. Noise reduces the image quality, making it difficult to detect weak signals and resulting in a low signal-to-noise ratio. Traditional imaging technologies only consider conventional lighting. Traditional light sources are difficult to dynamically regulate, and they are insufficient in dealing with optical phenomena on the surfaces of complex workpieces, leading to poor imaging quality, inability to obtain clear and complete images, and affecting the accuracy of detection.
[0007] 2) Limited data acquisition means
[0008] Traditional data acquisition relies on single image acquisition and cannot meet the multi-dimensional detection requirements of complex workpieces. Since past detections mainly targeted simple workpieces, the research on the detection of complex workpieces started late, and multi-dimensional data acquisition technologies are not yet mature. The multi-dimensional acquisition of complex workpieces requires the integration of advanced technologies such as laser scanning and structured light projection. The difficulty of research and application is high. The technological lag makes it difficult for traditional acquisition methods to obtain comprehensive and accurate workpiece information, restricting the precise detection of defects.
[0009] 3) Poor algorithm adaptability
[0010] In the face of complex three-dimensional models, the traditional two-stage learning paradigm of training - inference has poor algorithm adaptability. During the training stage, the data is preprocessed after simplification, without fully considering the diversity and complexity of the data of complex workpieces, resulting in the model being unable to accurately reflect the actual situation and difficult to identify defects. During the inference stage, traditional algorithms cannot adjust the detection strategy according to real-time data changes. Facing the diversity of complex workpiece features, they have insufficient ability to extract defect information from a large amount of data, with poor real-time performance, affecting production efficiency and product quality.
[0011] 4) Limited model generalization ability
[0012] Existing deep learning models have weak generalization ability for different types of complex workpieces. The training samples are limited and cannot cover all workpiece types. The models do not fully master the features of different workpieces and are prone to false detection and missed detection when encountering new workpieces. The model structure is either too simple to extract deep features or too complex, resulting in overfitting, reducing the generalization ability, and affecting the stability and reliability of the detection results.
[0013] In summary, there are many problems with existing technologies in the high-precision defect detection of complex workpieces. The present invention provides solutions through dynamic light source continuous imaging, new multi-dimensional data acquisition, training - inference integrated active sensing technology, etc. Summary of the Invention
[0014] The purpose of the present invention is to provide a high-precision defect detection method for complex workpieces based on dynamic light sources and multi-dimensional detection to solve the problems raised in the above background technology.
[0015] To solve the above technical problems, the present invention provides the following technical solutions:
[0016] A high-precision defect detection method for complex workpieces based on dynamic light sources and multi-dimensional detection, the method comprising:
[0017] S100. Using a high-precision laser scanning device to collect multi-dimensional data of the complex workpiece;
[0018] S200. Adjusting the working parameters of the workpiece according to the characteristics of the workpiece and environmental changes to optimize the image acquisition process;
[0019] S300. Preprocessing the three-dimensional coordinate data obtained by laser scanning and the texture information obtained by structured light projection;
[0020] S400. Separately extracting the geometric features, texture features, and depth defect features of the workpiece from the preprocessed data;
[0021] S500. Obtaining sample data from the database, selecting a suitable deep learning model and optimizing it, training the model with the sample data, and constructing a defect detection model;
[0022] S600. Inputting the data that has been preprocessed and feature-extracted into the defect detection model to detect the defect degree of the workpiece.
[0023] Preferably, S100 includes:
[0024] S101. Using a high-precision laser scanning device to scan the complex workpiece from different angles;
[0025] The laser scanning device emits a laser beam, which reflects from the surface of the workpiece and returns. The device calculates the three-dimensional coordinates of each point on the surface according to the time difference or phase difference of the reflected light, thereby constructing a preliminary three-dimensional geometric model of the workpiece;
[0026] Setting the time when the laser scanning device emits the laser beam as t1, the time when the reflected light is received as t2, and the propagation speed of the laser in the air as c, then the distance d from a certain point on the surface of the workpiece to the laser scanning device can be expressed as:
[0027]
[0028] Through measurements from multiple angles and combining trigonometric relationships, the three-dimensional coordinates (x, y, z) of this point are calculated;
[0029] S102. Using a structured light projection device to project a specific structured light pattern onto the surface of the workpiece, and using a camera to capture the deformed pattern modulated by the surface of the workpiece;
[0030] Calculate the three-dimensional coordinates and texture information of each point on the workpiece surface through the triangulation principle and image processing algorithms;
[0031] Set the baseline distance between the optical center of the camera and the optical center of the projection device as b, the focal length of the camera as f, and the coordinates of the pixel point in the image as (u, v). Calculate the three-dimensional coordinates (x, y, z) of this point in the world coordinate system through the encoded information of the structured light pattern. The calculation formula is:
[0032]
[0033] Among them, (u0, v0) is the principal point coordinates of the camera image, and Z can be obtained by combining the geometric relationship of triangulation with the deformation of the structured light pattern.
[0034] Preferably, S200 includes:
[0035] S201. Dynamically adjust the intensity, angle, and color parameters of the light source through an intelligent algorithm according to the complex shape, surface reflection characteristics, and environmental factors of the workpiece;
[0036] S202. Real-time monitor the working state of the sensor, and automatically adjust the position, angle, and working mode of the sensor according to the size, complexity, and surface characteristics of the workpiece to minimize the measurement error.
[0037] Preferably, the data preprocessing in S300 includes: data fusion, denoising processing, and normalization processing;
[0038] S301. Data fusion: Integrate the three-dimensional coordinate data obtained by laser scanning, the texture information obtained by structured light projection, and the image data obtained by image acquisition; through establishing a unified coordinate system, integrate data from different sources to form a multi-dimensional data set containing comprehensive information of the workpiece;
[0039] S302. Denoising processing: Perform denoising processing on the fused data, and use wavelet transform and Gaussian filtering algorithms to remove noise interference in the data to improve the quality and accuracy of the data:
[0040] Taking the Gaussian filtering algorithm as a reference: For each pixel point (x, y) in the image, its filtered pixel value I'(x, y) is obtained by weighted summation of the pixel values in the neighborhood centered on this point. The formula is:
[0041]
[0042] Among them, I(x, y) is the original pixel value, G(m, n) is the Gaussian kernel function, and m and n represent the offsets of the pixel points in the neighborhood
[0043] S303. Normalization processing: Perform normalization processing on the data to convert data of different types and magnitudes into a unified numerical range;
[0044] Assume the original range of the data is [a, b], and the range after normalization is [c, d]. Then the normalization formula is:
[0045]
[0046] where x is the original data, and x norm is the data after normalization.
[0047] Preferably, S400 includes: geometric feature extraction, texture feature extraction, and depth defect feature extraction;
[0048] S401. Extract the geometric features of the workpiece from the preprocessed data:
[0049] By calculating the point cloud data in the three-dimensional model, obtain the geometric shape parameters of the workpiece, providing basic information for defect detection; when calculating the curvature of the point cloud data, use the moving least squares method to fit the local surface, and then calculate the curvature through the second derivative of the surface;
[0050] Let a certain point p in the point cloud data i , and the point set within its neighborhood is N i . Through the moving least squares method, fit to obtain the local surface equation z = f(x, y). Then the Gaussian curvature K and mean curvature H of a certain point p i can be calculated through the second derivative of the surface;
[0051] S402. Use image processing algorithms to extract the texture features of the workpiece from the image data:
[0052] Through the analysis of the texture features, identify the subtle defects on the surface of the workpiece;
[0053] Among them, the gray-level co-occurrence matrix is used to extract texture features. It is a probability matrix that statistically shows the occurrence of gray-level pairs in the image. By calculating the statistics of the GLCM, the texture features of the image are obtained;
[0054] S403. Combine laser scanning and structured light projection data to extract the depth defect features of the workpiece, and judge whether there are defects inside the workpiece through the analysis of the depth data.
[0055] Preferably, S500 includes:
[0056] S501. Collect complex workpiece sample data from the sample database, including normal workpieces and workpieces with defects; and label the sample data to clarify the defect type and location of each sample;
[0057] S502. Select a suitable deep learning model and optimize the model:
[0058] By adjusting the model's structure, parameters, and training algorithm, improve the model's ability to identify defects in complex workpieces; during the model training process, use the cross-entropy loss function to measure the difference between the model's prediction results and the actual annotation results. The formula for the cross-entropy loss function is:
[0059]
[0060] where n is the number of samples, y i is the actual label, is the probability value predicted by the model;
[0061] S503. Input the labeled sample data into the optimized deep learning model for training; during the training process, continuously adjust the model's parameters according to the difference between the model's prediction results and the actual annotation results to enable the model to accurately identify the defects of the workpiece.
[0062] Preferably, S600 includes:
[0063] S601. Input the preprocessed and feature-extracted data into the trained defect detection model. The model performs defect detection based on the input data, outputs the detection results, and determines whether there are defects in the workpiece and the type and location of the defects;
[0064] S602. Analyze the detection results, classify and evaluate the workpiece according to the type and severity of the defects; for workpieces with serious defects, mark and process them in a timely manner; for workpieces with minor defects, further detection and analysis can be carried out according to the actual situation.
[0065] A computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the steps in the above-mentioned high-precision defect detection method for complex workpieces based on dynamic light sources and multi-dimensional detection.
[0066] A computer device, including a memory, a processor, and a computer program stored on the memory and running on the processor. When the processor executes the program, it implements the steps in the above-mentioned high-precision defect detection method for complex workpieces based on dynamic light sources and multi-dimensional detection.
[0067] Compared with the prior art, the beneficial effects achieved by the present invention are:
[0068] The high-precision defect detection technology for complex workpieces of the present invention has significant advantages compared with the prior art, making breakthroughs in raw material savings, detection efficiency, and performance optimization, and strongly supporting the development of modern manufacturing.
[0069] By means of continuous imaging with a dynamic light source, multi-dimensional data acquisition, and an optimized deep learning model, the detection accuracy and reliability are significantly improved, the false omission and detection rate is reduced, qualified and defective products are accurately distinguished, raw material waste is reduced, and production costs are lowered.
[0070] Integrating technologies such as laser scanning and structured light projection, workpiece data is acquired from multiple angles and dimensions in an all-round manner, shortening the acquisition time. Each technical module complements each other to form an efficient workflow, significantly enhancing the acquisition efficiency.
[0071] Through the training and inference integrated active perception technology, data can be analyzed in real time, the training and inference processes are automatically adjusted according to data changes, defect information is quickly extracted, the detection real-time performance is improved, the industrial rapid detection requirements are met, production efficiency is increased, and the production cycle is shortened.
[0072] Through the dynamic light source continuous imaging technology, the light source parameters are dynamically adjusted to obtain rich image information, solve the imaging problem, improve the image quality and clarity, enhance the ability to detect weak signals, and improve the detection accuracy and precision. Multi-dimensional data acquisition obtains comprehensive and accurate workpiece information, provides high-quality data for defect detection and analysis, and further improves the detection accuracy and reliability.
[0073] Through the training and inference integrated technology, the detection strategy is adjusted in real time to improve the algorithm adaptability; the deep learning model architecture is optimized, the sample diversity is increased, the structure is reasonably designed, the model generalization ability is enhanced, false omissions and detections are reduced, and the detection results are ensured to be stable and reliable, providing a guarantee for high-precision detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] The drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention, but do not constitute a limitation to the present invention. In the drawings:
[0075] Figure 1 is a flowchart of a high-precision defect detection method for complex workpieces based on a dynamic light source and multi-dimensional detection of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0076] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0077] Please refer to Figure 1 , the present invention provides the following technical solutions:
[0078] Embodiment 1: A high-precision defect detection method for complex workpieces based on dynamic light sources and multi-dimensional detection, the method comprising:
[0079] S100. Use a high-precision laser scanning device to collect multi-dimensional data of the complex workpiece;
[0080] Preferably, S100 includes:
[0081] S101. Use a high-precision laser scanning device to scan the complex workpiece from different angles;
[0082] The laser scanning device emits a laser beam, which reflects from the workpiece surface and returns. The device calculates the three-dimensional coordinates of each point on the surface based on the time difference or phase difference of the reflected light, thereby constructing a preliminary three-dimensional geometric model of the workpiece;
[0083] Set the time when the laser scanning device emits the laser beam as t1, the time when the reflected light is received as t2, and the propagation speed of the laser in the air as c. Then the distance d from a certain point on the workpiece surface to the laser scanning device can be expressed as:
[0084]
[0085] Through measurements from multiple angles and combining trigonometric relationships, calculate the three-dimensional coordinates (x, y, z) of this point;
[0086] During this process, by adjusting parameters such as the scanning angle, spacing, and speed of the laser scanning device, ensure comprehensive and accurate three-dimensional data is obtained and a preliminary three-dimensional geometric model of the workpiece is formed;
[0087] S102. Use a structured light projection device to project a specific structured light pattern (such as sine stripes, Gray code, etc.) onto the workpiece surface, and use a camera to capture the deformed pattern modulated by the workpiece surface;
[0088] Through the principle of triangulation and image processing algorithms, calculate the three-dimensional coordinates and texture information of each point on the workpiece surface;
[0089] Set the baseline distance between the camera optical center and the projection device optical center as b, the camera focal length as f, and the coordinates of the pixel point in the image as (u, v). Through the encoded information of the structured light pattern, calculate the three-dimensional coordinates (x, y, z) of this point in the world coordinate system. The calculation formula is:
[0090]
[0091] Among them, (u0, v0) is the principal point coordinates of the camera image, and Z can be calculated through the geometric relationship of triangulation combined with the deformation of the structured light pattern.
[0092] By projecting and collecting different types of structured light patterns, the data information of the workpiece is further enriched.
[0093] Image acquisition: Using a high-resolution camera and combining dynamic light source continuous imaging technology, image acquisition of the workpiece is carried out from multiple angles and under multiple lighting conditions. Dynamically adjust parameters such as the intensity, angle, and color of the light source to obtain workpiece images under different lighting conditions, so as to enhance the ability to capture surface details of the workpiece.
[0094] Through multi-dimensional data acquisition, the geometric morphology, texture information, and material properties of the workpiece surface and interior can be accurately captured, greatly improving the accuracy and comprehensiveness of the data.
[0095] S200. Adjust the working parameters of the workpiece according to the characteristics of the workpiece and environmental changes, and optimize the image acquisition process;
[0096] Preferably, S200 includes:
[0097] S201. Dynamic light source adjustment: According to the complex shape of the workpiece, surface reflection characteristics, and environmental factors (such as light intensity, background light interference, etc.), dynamically adjust the intensity, angle, and color parameters of the light source through intelligent algorithms. For example, for workpieces with different materials and surface textures, adjust the light source direction or light intensity to ensure maximum capture of surface details;
[0098] S202. Sensor configuration adjustment: The adjustment of the sensor configuration also plays an important role. Real-time monitor the working state of the sensor, and automatically adjust the position, angle, and working mode of the sensor according to the size, complexity, and surface characteristics of the workpiece to minimize measurement errors. For example, when scanning a complex curved surface, the adjustment of the sensor's angle and position can ensure accurate acquisition at the place with a smaller surface curvature; in the processing of texture details, by optimizing the relative position of the sensor and the light source, the ability to capture fine features is improved.
[0099] Through active sensing technology, the system can automatically adjust the working parameters according to the characteristics of the workpiece and environmental changes, and optimize the image acquisition process.
[0100] S300. Perform data preprocessing on the three-dimensional coordinate data obtained by laser scanning and the texture information obtained by structured light projection;
[0101] Preferably, the data preprocessing in S300 includes: data fusion, denoising processing, and normalization processing;
[0102] S301. Data Fusion: Fuse the three-dimensional coordinate data obtained by laser scanning, the texture information obtained by structured light projection, and the image data obtained by image acquisition; by establishing a unified coordinate system, integrate data from different sources to form a multi-dimensional data set containing comprehensive information of the workpiece;
[0103] S302. Denoising Processing: Perform denoising processing on the fused data, and use wavelet transform and Gaussian filtering algorithm to remove noise interference in the data, improving the quality and accuracy of the data:
[0104] Taking the Gaussian filtering algorithm as a reference: For each pixel point (x, y) in the image, its filtered pixel value I'(x, y) is obtained by weighted summation of the pixel values in the neighborhood centered on this point. The formula is:
[0105]
[0106] where I(x, y) is the original pixel value, G(m, n) is the Gaussian kernel function, and m and n represent the offsets of pixel points in the neighborhood
[0107] S303. Normalization Processing: Perform normalization processing on the data, converting data of different types and magnitudes to a unified numerical range for subsequent analysis and processing.
[0108] Assume the original range of the data is [a, b], and the normalized range is [c, d]. Then the normalization formula is:
[0109]
[0110] where x is the original data, and x norm is the normalized data.
[0111] S400. Extract the geometric features, texture features, and depth defect features of the workpiece from the preprocessed data respectively;
[0112] Preferably, S400 includes: geometric feature extraction, texture feature extraction, and depth defect feature extraction;
[0113] S401. Extract the geometric features of the workpiece such as shape, size, curvature, etc. from the preprocessed data.
[0114] By calculating the point cloud data in the three-dimensional model, obtain the geometric shape parameters of the workpiece, providing basic information for defect detection; when calculating the curvature of the point cloud data, use the moving least squares method to fit the local surface, and then calculate the curvature through the second derivative of the surface;
[0115] Let a certain point p in the point cloud data i , and the point set in its neighborhood be Ni By using the moving least squares method to fit and obtain the local surface equation \(z = f(x,y)\), for a certain point \(p\) i the Gaussian curvature \(K\) and the mean curvature \(H\) can be calculated through the second - order derivatives of the surface;
[0116] S402. Use the image - processing algorithm to extract the texture features of the workpiece from the image data, such as roughness, texture direction, etc.:
[0117] By analyzing the texture features, identify the subtle defects on the surface of the workpiece;
[0118] Among them, the gray - level co - occurrence matrix is used to extract texture features. It is a probability matrix of the occurrence of gray - level pairs in the statistical image. By calculating the statistics of the GLCM, such as contrast, correlation, energy, and entropy, etc., the texture features of the image are obtained;
[0119] S403. Combine the laser scanning and structured - light projection data to extract the depth - defect features of the workpiece, such as holes, cracks, etc. By analyzing the depth data, judge whether there are defects inside the workpiece.
[0120] S500. Obtain the sample data from the database, select a suitable deep - learning model and optimize it, and use the sample data to train the model to construct a defect - detection model;
[0121] Preferably, S500 includes:
[0122] S501. Collect the sample data of complex workpieces from the sample database, including normal workpieces and workpieces with defects; and label the sample data to clarify the defect type and location of each sample;
[0123] S502. Select a suitable deep - learning model and optimize the model:
[0124] By adjusting the structure, parameters, and training algorithm of the model, improve the model's ability to identify the defects of complex workpieces; during the model training process, use the cross - entropy loss function to measure the difference between the model prediction result and the actual annotation result. The formula of the cross - entropy loss function is:
[0125]
[0126] where \(n\) is the number of samples, \(y\) i is the actual label, is the probability value predicted by the model;
[0127] S503. Input the labeled sample data into the optimized deep - learning model for training; during the training process, continuously adjust the parameters of the model according to the difference between the model prediction result and the actual annotation result, so that the model can accurately identify the defects of the workpiece.
[0128] S600. Input the preprocessed and feature-extracted data into the defect detection model to detect the defect degree of the workpiece.
[0129] Preferably, S600 includes:
[0130] S601. Input the preprocessed and feature-extracted data into the trained defect detection model. The model performs defect detection based on the input data, outputs the detection result, and determines whether there are defects in the workpiece, as well as the type and location of the defects.
[0131] S602. Analyze the detection result, classify and evaluate the workpiece according to the type and severity of the defect. For workpieces with serious defects, mark and process them in a timely manner. For workpieces with minor defects, further detection and analysis can be carried out according to the actual situation.
[0132] Variant solutions:
[0133] Variant of data acquisition method: In addition to laser scanning, structured light projection, and image acquisition, other advanced data acquisition technologies such as ultrasonic testing and infrared thermal imaging can be used to obtain more information about the workpiece and improve the detection accuracy.
[0134] Variant of feature extraction algorithm: During the feature extraction process, different algorithms and technologies such as deep learning automatic feature extraction and model-based feature extraction can be used to improve the efficiency and accuracy of feature extraction.
[0135] Variant of defect detection model: In addition to deep learning models, other types of models such as support vector machines (SVM) and decision trees can be used for defect detection to adapt to different application scenarios and requirements.
[0136] Through the above specific implementation methods and variant solutions, high-precision defect detection of complex workpieces can be effectively achieved, the protection scope of the patent can be expanded, and strong technical support can be provided for the development of modern manufacturing.
[0137] Key point 1 in the present invention: Dynamic light source continuous imaging technology
[0138] Key point: By controlling the parameters of the light source such as intensity, angle, and color to change dynamically over time, continuous imaging of complex workpieces is performed. During the imaging process, according to the shape, surface features of the complex workpiece and the actual situation of the detection environment, the light source parameters are accurately adjusted to achieve comprehensive acquisition of image information under different lighting conditions.
[0139] Technical effect: It can obtain rich and diverse image information, effectively solve imaging problems caused by factors such as unstable lighting and production process differences, enhance the ability to capture surface details of complex workpieces, improve image quality and clarity, and then improve the signal-to-noise ratio of the detection system, enabling weak signals to be accurately detected and significantly improving the accuracy of detection.
[0140] Key point 2: Multi-dimensional new data acquisition
[0141] Key point: The new multi-dimensional data acquisition method proposed by the present invention innovatively integrates various advanced technologies such as laser scanning and structured light projection to construct a multi-dimensional data acquisition system suitable for complex workpieces. The system is highly integrated and collaborative in design. Its core lies in using the high-precision distance measurement characteristics of laser scanning technology to accurately obtain the three-dimensional coordinate information of each point on the workpiece surface, thereby constructing an accurate three-dimensional geometric model of the workpiece and clearly presenting the complex shape and structural characteristics of the workpiece. At the same time, combined with structured light projection technology, by projecting a specific structured light pattern onto the workpiece surface and using a camera to collect the deformed pattern modulated by the workpiece surface, based on the triangulation principle and image processing algorithms, detailed texture information of the workpiece surface can be obtained, including surface roughness, texture direction, etc. In addition, the system can also analyze the material characteristics of the workpiece. By the signal feature differences obtained through different technical means and combined with the material characteristic database, accurate identification and classification of the workpiece material can be achieved. In the actual application process, the system can perform all-round data acquisition on the workpiece from multiple different angles and dimensions to ensure that the workpiece information collected is comprehensive, accurate and representative. Each technical module cooperates with each other and the data complements each other, overcoming the one-sidedness and limitations of the traditional single image acquisition method, and providing a rich and high-quality data basis for subsequent defect detection and analysis.
[0142] Technical effect: This new multi-dimensional data acquisition method breaks the inherent limitations of the traditional single image acquisition method and greatly enriches the dimension and depth of obtaining workpiece information. By obtaining comprehensive and accurate workpiece information, covering multiple key aspects such as the three-dimensional geometric shape, surface texture, and material characteristics of the workpiece, it provides a richer and more accurate data basis for subsequent defect detection and analysis. During the defect detection process, based on these multi-dimensional data, various defect types on the surface and inside of the workpiece can be more accurately identified, including micro-cracks, holes, deformations, etc., significantly improving the detection accuracy and reliability of defects in complex workpieces. Moreover, the rich data can also provide strong support for the quantitative analysis and evaluation of defects, helping technicians more accurately judge the severity of defects and their impact on the workpiece performance, and providing a more valuable reference basis for product quality control and improvement.
[0143] Key point 3: Training and inference integrated active perception technology
[0144] Key point: Abandon the traditional learning paradigm of separating the training and inference stages, and adopt the active perception technology of integrating training and inference. This technology enables the detection system to analyze the input data in real time, automatically adjust the training strategy and inference process according to the changes in the data, and achieve dynamic adaptation to the complex workpiece data.
[0145] Technical effect: Fully consider the diversity and complexity of complex workpiece data, and improve the ability of the algorithm to extract defect information from massive data. In the inference stage, it can automatically adjust the detection strategy according to the changes in real-time data, significantly improve the real-time performance of detection, meet the requirements of rapid detection in industrial production, and thus improve production efficiency and product quality.
[0146] Key point 4: Optimized deep learning model architecture
[0147] Key point: Optimize the architecture of the deep learning model. On the one hand, increase the diversity and representativeness of training samples to ensure that the model can learn the characteristics of different types of complex workpieces; on the other hand, reasonably design the model structure to avoid the model being too simple or complex, and improve the model's ability to extract and identify the characteristics of different types of complex workpieces.
[0148] Technical effect: Effectively enhance the generalization ability of the model, enable the model to accurately identify various types of complex workpieces, reduce the situation of false detection and missed detection, improve the stability and reliability of the detection results, and provide a reliable technical guarantee for the high-precision defect detection of complex workpieces.
[0149] Embodiment 2: The computer-readable storage medium of this embodiment stores a computer program, and when the program is executed by a processor, it implements the steps in the high-precision defect detection method for complex workpieces based on dynamic light source and multi-dimensional detection in Embodiment 1.
[0150] The computer-readable storage medium of this embodiment can be the internal storage unit of the terminal, such as the hard disk or memory of the terminal; the computer-readable storage medium of this embodiment can also be the external storage device of the terminal, such as the plug-in hard disk, smart memory card, secure digital card, flash memory card, etc. equipped on the terminal; further, the computer-readable storage medium can also include both the internal storage unit and the external storage device of the terminal.
[0151] The computer-readable storage medium of this embodiment is used to store the computer program and other programs and data required by the terminal, and the computer-readable storage medium can also be used to temporarily store the data that has been output or will be output.
[0152] Example 3: The computer device in this example includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the steps in the high-precision defect detection method for complex workpieces based on dynamic light sources and multi-dimensional detection in Example 1.
[0153] In this example, the processor can be a central processing unit, or it can be other general-purpose processors, digital signal processors, application-specific integrated circuits, off-the-shelf programmable gate arrays, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or this processor can also be any conventional processor, etc.; the memory can include a read-only memory and a random access memory, and provide instructions and data to the processor. A part of the memory can also include a non-volatile random access memory. For example, the memory can also store information about the device type.
[0154] Those skilled in the art should understand that the content disclosed in the examples can be provided as a method, a system, or a computer program product. Therefore, this solution can be implemented in the form of a hardware example, a software example, or a form combining software and hardware aspects. Moreover, this solution can be implemented in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories and optical memories, etc.) containing computer-usable program code.
[0155] This solution is described with reference to the flowcharts and / or block diagrams of the method and computer program products according to the embodiments of this solution. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of the flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions; these computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one process or multiple processes and / or block diagrams Figure 1 one block or multiple blocks.
[0156] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means implements the functions specified in Figure 1 one process or multiple processes and / or block diagrams Figure 1 one block or multiple blocks.
[0157] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process or multiple processes and / or block diagrams. Figure 1 One process or multiple processes and / or block diagrams Figure 1 Steps for implementing the functions specified in one block or multiple blocks.
[0158] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium can be a magnetic disk, an optical disc, a read-only memory (ROM), or a random access memory (RAM), etc.
[0159] Finally, it should be noted that the above are only the preferred embodiments of the present invention and are not used to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions recorded in the foregoing embodiments or perform equivalent replacements on some of the technical features. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A high-precision defect detection method for complex workpieces based on dynamic light source and multi-dimensional detection, characterized by: The method comprises: S100, using high-precision laser scanning equipment to collect multi-dimensional data of complex workpieces; S200, adjusting the workpiece working parameters according to the characteristics of the workpiece and environmental changes, and optimizing the image acquisition process; S300, performing data preprocessing on the three-dimensional coordinate data obtained by laser scanning and the texture information obtained by structured light projection; S400, extracting geometric features, texture features and depth defect features of the workpiece from the preprocessed data respectively; S500, obtaining sample data from a database, selecting a suitable deep learning model and optimizing it, training the model using the sample data, and building a defect detection model; S600: Input the preprocessed and feature-extracted data into a defect detection model to detect the degree of defects of the workpiece.
2. The high-precision defect detection method for complex workpieces based on dynamic light source and multi-dimensional detection as claimed in claim 1, characterized in that: The S100 includes: S101, use high-precision laser scanning equipment to scan complex workpieces from different angles; The laser scanning device emits a laser beam, which is reflected by the surface of the workpiece and returns. The device calculates the three-dimensional coordinates of each point on the surface based on the time difference or phase difference of the reflected light, thereby constructing a preliminary three-dimensional geometric model of the workpiece; Assuming that the time when the laser scanning device emits the laser beam is t1, the time when the reflected light is received is t2, and the propagation speed of the laser in the air is c, the distance d from a point on the workpiece surface to the laser scanning device can be expressed as: By measuring multiple angles and combining trigonometric functions, the three-dimensional coordinates (x, y, z) of the point are calculated. S102, projecting a specific structured light pattern onto the surface of the workpiece using a structured light projection device, and capturing the deformation pattern modulated by the surface of the workpiece using a camera; The three-dimensional coordinates and texture information of each point on the workpiece surface are calculated through the triangulation principle and image processing algorithm; Set the baseline distance between the optical center of the camera and the optical center of the projection device to b, the focal length of the camera to f, and the coordinates of the pixel point in the image to (u, v). Calculate the three-dimensional coordinates (x, y, z) of the point in the world coordinate system through the encoded information of the structured light pattern. The calculation formula is: Among them, (u0, v0) is the coordinate of the principal point of the camera image, and Z can be calculated by combining the geometric relationship of triangulation with the deformation of the structured light pattern.
3. The high-precision defect detection method for complex workpieces based on dynamic light source and multi-dimensional detection as claimed in claim 1, characterized in that: The S200 includes: S201. Dynamically adjust the intensity, angle and color parameters of the light source through intelligent algorithms according to the complex shape of the workpiece, surface reflection characteristics and environmental factors; S202, monitor the working status of the sensor in real time, and automatically adjust the position, angle and working mode of the sensor according to the size, complexity and surface characteristics of the workpiece to minimize the measurement error.
4. The high-precision defect detection method for complex workpieces based on dynamic light source and multi-dimensional detection as claimed in claim 1, characterized in that: The data preprocessing in S300 includes: data fusion, denoising and normalization; S301, data fusion: fuse the three-dimensional coordinate data obtained by laser scanning, the texture information obtained by structured light projection, and the image data obtained by image acquisition; by establishing a unified coordinate system, integrate the data from different sources to form a multi-dimensional data set containing comprehensive information of the workpiece; S302, denoising: denoising the fused data, using wavelet transform and Gaussian filtering algorithm to remove noise interference in the data, and improve the quality and accuracy of the data: Taking the Gaussian filtering algorithm as a reference: for each pixel point (x, y) in the image, its filtered pixel value I'(x, y) is obtained by weighted summing of the pixel values in the neighborhood centered on the point, and the formula is: Where I(x,y) is the original pixel value, G(m,n) is the Gaussian kernel function, and m and n represent the offset of the pixel points in the neighborhood. S303, normalization processing: normalizing the data to convert data of different types and magnitudes into a unified numerical range; Assuming the original range of the data is [a, b] and the normalized range is [c, d], the normalization formula is: Where x is the original data, x norm is the normalized data.
5. The high-precision defect detection method for complex workpieces based on dynamic light source and multi-dimensional detection as claimed in claim 1, characterized in that: The S400 includes: geometric feature extraction, texture feature extraction and depth defect feature extraction; S401. Extracting geometric features of the workpiece from the preprocessed data: By calculating the point cloud data in the 3D model, the geometric shape parameters of the workpiece are obtained to provide basic information for defect detection. When calculating the curvature of the point cloud data, the moving least squares method is used to fit the local surface, and then the curvature is calculated by the second-order derivative of the surface. Suppose a point p in the point cloud data i , the point set in its neighborhood is N i , the local surface equation z=f(x,y) is obtained by moving least squares fitting, then a point p i The Gaussian curvature K and mean curvature H can be calculated by the second-order derivative of the surface; S402, using image processing algorithms to extract texture features of the workpiece from the image data: Identify subtle defects on the workpiece surface by analyzing texture features; The gray level co-occurrence matrix is used to extract texture features. It is a probability matrix that counts the occurrence of gray level pairs in an image. The texture features of the image are obtained by calculating the statistics of GLCM. S403, combining laser scanning and structured light projection data to extract the depth defect characteristics of the workpiece, and determining whether there are defects inside the workpiece by analyzing the depth data.
6. The high-precision defect detection method for complex workpieces based on dynamic light source and multi-dimensional detection as claimed in claim 1, characterized in that: The S500 comprises: S501. Collect complex workpiece sample data from a sample database, including normal workpieces and workpieces with defects; and annotate the sample data to clarify the defect type and location of each sample; S502. Select a suitable deep learning model and optimize the model: By adjusting the model structure, parameters and training algorithm, the model's ability to identify complex workpiece defects is improved; during the model training process, the cross entropy loss function is used to measure the difference between the model prediction results and the actual annotation results. The formula of the cross entropy loss function is: Where n is the number of samples, y i is the actual label, is the probability value predicted by the model; S503. Input the labeled sample data into the optimized deep learning model for training. During the training process, according to the difference between the model's prediction results and the actual labeling results, the model parameters are continuously adjusted so that the model can accurately identify the defects of the workpiece.
7. The high-precision defect detection method for complex workpieces based on dynamic light source and multi-dimensional detection as claimed in claim 1, characterized in that: The S600 includes: S601, input the preprocessed and feature-extracted data into the trained defect detection model, the model performs defect detection based on the input data, outputs the detection results, and determines whether the workpiece has defects and the type and location of the defects; S602. Analyze the test results, classify and evaluate the workpieces according to the type and severity of the defects; mark and process the workpieces with serious defects in a timely manner; and conduct further testing and analysis on the workpieces with minor defects according to the actual situation.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in the method for high-precision defect detection of complex workpieces based on dynamic light source and multi-dimensional detection as described in any one of claims 1 to 7 are implemented.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the program, the steps in the method for high-precision defect detection of complex workpieces based on dynamic light source and multi-dimensional detection as described in any one of claims 1-7 are implemented.
Citation Information
Cited By
Defect visual classification detection method and system oriented to numerical control system
CN121095686A
Induction cooker production line part defect detection method based on image recognition
CN121304548A
Detection method and system for surface precision grinding of special-shaped workpiece
CN121458629A
A detection method and system for precision grinding of a special-shaped workpiece surface
CN121458629B
Box girder defect identification method and system based on structured light and deep reinforcement learning
CN121563988A