Part surface defect detection and process optimization method and system
By integrating multi-source data and using deep learning models, the problems of accuracy and process optimization in surface defect detection of parts were solved, achieving efficient defect detection and improved production quality.
Patent Information
- Application Number
- CN202511206970.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-08-27
AI Technical Summary
Existing surface defect detection technologies for parts suffer from insufficient data processing and feature fusion, making it difficult to accurately identify various defects. Furthermore, subsequent process optimization lacks a scientific basis, thus limiting the improvement of production quality.
By employing multi-source data fusion and deep learning models, multi-source data is aligned through timestamp calibration, three-dimensional and two-dimensional features are extracted, and key parameters are dynamically adjusted to optimize production processes by combining attention mechanisms and association rule mining.
It enables precise detection of surface defects in parts and rapid location of root causes, improving detection efficiency and repair accuracy, reducing defect rates, and optimizing the production process.
Smart Images

Figure CN120747065B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of parts inspection technology, and in particular to a method and system for detecting surface defects in parts and optimizing processes. Background Technology
[0002] In modern manufacturing, the surface quality of parts directly determines product performance, safety, and service life. Especially in high-precision fields such as aerospace and automobile manufacturing, surface defects may trigger a chain of failures. Therefore, accurate detection of surface defects and targeted optimization of production processes have become core requirements for improving manufacturing quality and production efficiency.
[0003] Currently, surface defect detection technologies for parts are developing in a diversified manner. In the inspection process, two-dimensional optical images are often acquired using optical cameras, and then combined with algorithms such as edge detection and texture analysis to identify surface defects such as scratches and dents. At the same time, three-dimensional scanning technology is being gradually applied, which can obtain surface height information of parts to detect three-dimensional defects such as tiny protrusions and deep pits.
[0004] Regarding the aforementioned technologies, the inventors have discovered the following shortcomings: On the one hand, defect detection itself is inadequate. Due to the lack of data processing and feature fusion, it is difficult to accurately and comprehensively identify various surface defects, which can easily lead to missed detections and misjudgments. On the other hand, even if defects are detected, subsequent process improvements face significant challenges. It requires relying on manual experience to identify possible root causes from numerous production processes and then subjectively conceiving improvement plans to reduce defects. This process is not only time-consuming and labor-intensive but also lacks scientific basis, often making it difficult to formulate accurate and effective optimization strategies. As a result, part defects recur, severely restricting the improvement of production quality. Summary of the Invention
[0005] In order to accurately detect defects in parts, trace the source of the process, dynamically adjust parameters, form a closed-loop optimization, and improve the quality of parts, this application provides a method and system for detecting surface defects in parts and optimizing processes.
[0006] In a first aspect, this application provides a method for detecting surface defects in parts and optimizing processes, employing the following technical solution:
[0007] A method for detecting surface defects in parts and optimizing processes includes:
[0008] Obtain the surface height map and optical map of the part to be inspected, as well as the key parameters, process identifiers and environmental parameters of the corresponding production process;
[0009] By calibrating the timestamps triggered by process nodes, multi-source data is aligned with the process switching time as the benchmark to ensure consistency.
[0010] Denoise the height map and extract three-dimensional features, optimize the reflection of the optical map and extract two-dimensional features, calculate process parameter features, and fuse the above features through an attention mechanism to form a defect analysis feature set;
[0011] The feature set is input into a dual-branch fusion deep learning model. The first branch identifies the defect type and quantification parameters by fusing three-dimensional and two-dimensional features. The second branch calculates the correlation between defect features and each process by using association rule mining and random forest algorithm.
[0012] When both the three-dimensional and two-dimensional features meet the preset defect threshold and the correlation of a certain process exceeds the preset threshold, the process is determined to be the root cause process.
[0013] Analyze the deviation between the key parameters of the root cause process and the defect quantification parameters, and correct the parameters through a dynamic adjustment mechanism according to the degree of deviation;
[0014] Re-inspect the surface features of the parts to verify whether the defects have been eliminated. If not, repeat the adjustment until the standard is met.
[0015] By adopting the above technical solution, this method accurately detects surface defects of parts through multi-source data fusion and deep learning models, quickly locates the root cause process and dynamically optimizes parameters, effectively improving detection efficiency and repair accuracy, reducing the defect rate, ensuring production quality, and optimizing the production process.
[0016] Secondly, this application provides a system for detecting surface defects in parts and optimizing processes, which adopts the following technical solution:
[0017] A part surface defect detection and process optimization system includes a memory, a processor, and a program stored in the memory and executable on the processor. When the program is loaded and executed by the processor, it implements the part surface defect detection and process optimization method as described in the first aspect. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating a method for detecting surface defects in parts and optimizing processes according to an embodiment of this application.
[0019] Figure 2 This is a flowchart illustrating the process of denoising a height map and extracting three-dimensional features according to another embodiment of this application. Detailed Implementation
[0020] The present application will be further described in detail below with reference to the accompanying drawings.
[0021] Reference Figure 1 This application discloses a method for detecting surface defects in parts and optimizing processes, comprising:
[0022] Step S100: Obtain the surface height map and optical map of the part to be inspected, as well as the key parameters, process identifiers and environmental parameters of the corresponding production process.
[0023] Among them, the surface height map is obtained through 3D scanning equipment (such as a laser scanner), reflecting the microscopic geometry of the part's surface and used to detect surface defects such as unevenness. The optical image is obtained through optical imaging equipment (such as an industrial camera), reflecting information such as the part's color and texture, and used to detect surface defects such as scratches and stains. Key parameters are important parameters affecting part quality during the production process, such as processing temperature, pressure, and speed. Process identifiers are unique identifiers used to distinguish different production processes, facilitating traceability and analysis. Environmental parameters are relevant parameters in the production environment, such as temperature, humidity, and light intensity, which may indirectly affect part quality.
[0024] Key parameters, process identifiers, and environmental parameters are acquired in the following ways: 1. Key parameters are collected in real time through the production control system (such as PLC). For example, processing temperature is measured by a thermocouple sensor, and pressure is measured by a pressure sensor. 2. Process identifiers are assigned through the production management system (such as MES), and each process has a unique identifier. 3. Environmental parameters are collected in real time through environmental monitoring equipment (such as temperature and humidity sensors). For example, temperature is measured by a thermistor, and humidity is measured by a humidity sensor.
[0025] The necessary processes are described below: 1. Equipment Connection and Calibration: Connect and calibrate equipment such as laser scanners, industrial cameras, and sensors to the production control system to ensure data accuracy. For example, laser scanners require optical path calibration, and industrial cameras require white balance calibration. 2. Data Acquisition and Synchronization: During part processing, synchronously acquire surface height maps, optical maps, key parameters, process identifiers, and environmental parameters. For example, use timestamp synchronization to ensure all data is acquired at the same point in time, facilitating subsequent analysis. 3. Data Preprocessing: Perform preliminary processing on the acquired data, such as noise removal and normalization.
[0026] Step S200: Through timestamp calibration triggered by process nodes, align multi-source data with the process switching time as the benchmark to ensure consistency of association.
[0027] Among them, process nodes are: key moments at the start or end of a process in the production process, used to mark the switching points between processes. Timestamps are precise time information recorded during data acquisition, used for data synchronization and alignment. Multi-source data refers to data from different sensors or devices, such as surface height maps, optical maps, and key parameters. Correlation consistency ensures that different data sources are aligned in time and logically related for subsequent analysis.
[0028] The necessary process is described below:
[0029] 1. Timestamp Calibration: Due to potential clock discrepancies between different devices, timestamp calibration is necessary. A master-slave clock synchronization algorithm is employed, using the production control system's time as the master clock and the times of other devices as slave clocks. Calibration is performed via Network Time Protocol (NTP) or hardware synchronization signals. For example, calibrating device clocks using the NTP protocol: Calibration Formula: ;
[0030] in, It's based on the device's time. It is the time of the main device. It's a clock skew.
[0031] 2. Data Alignment: Align the timestamps of multi-source data based on the process changeover time. For example, assume the process changeover time is... The alignment process is as follows: 2.1 Find the timestamp that is closest among the surface height map, optical map, key parameters, and environmental parameters. 2.2 If the timestamp of the data point is... If the deviation exceeds a preset threshold (e.g., 10 milliseconds), then interpolation is performed on the data point. The specific interpolation formula is as follows: .
[0032] in, and They are timestamps at Data points before and after, and That is the corresponding timestamp.
[0033] 3. Consistency Verification: The aligned data needs to be verified for consistency to ensure logical coherence. For example, check if the surface height map and optical map correspond in spatial location and if key parameters conform to process logic. If inconsistencies are found, data needs to be re-collected or equipment parameters adjusted.
[0034] Step S300: Denoise the height map and extract three-dimensional features, optimize the reflection of the optical map and extract two-dimensional features, calculate process parameter features, and fuse the above features through an attention mechanism to form a defect analysis feature set.
[0035] The features include: 3D features: features reflecting the geometry of the part's surface extracted from the surface height map, such as curvature and roughness. 2D features: features reflecting the texture and color of the part's surface extracted from the optical map, such as edges and texture direction. Process parameter features: parameter features related to the production process, such as processing speed and temperature. Attention mechanism: an algorithm that simulates human visual attention to highlight important features and suppress unimportant features.
[0036] The necessary processes are described below: 1. Height Map Denoising: Apply Gaussian filtering to the height map to remove noise and smooth the image. 2. 3D Feature Extraction: Calculate the curvature features of the height map to reflect the geometric changes of the part surface. 3. Optical Image Reflection Optimization: Apply histogram equalization to optimize the reflection effect of the optical image and enhance image contrast. 4. 2D Feature Extraction: Use the Canny algorithm to extract edge features from the optical image to reflect the texture and defects of the part surface. 5. Process Parameter Feature Calculation: Obtain process parameters from the production control system and calculate their statistical characteristics as a reference for defect analysis. For example, obtain process parameters (such as processing speed and temperature) from the production control system and calculate their statistical characteristics (such as mean and variance). 6. Attention Mechanism Fusion: Use the Softmax attention mechanism to highlight important features and suppress unimportant features to form a defect analysis feature set.
[0037] Step S400: Input the feature set into the dual-branch fusion deep learning model. The first branch identifies the defect type and quantification parameters by fusing three-dimensional and two-dimensional features. The second branch calculates the correlation between defect features and each process by using association rule mining and random forest algorithm.
[0038] Among them, the dual-branch fusion deep learning model is a deep learning model that includes two branches, each processing different types of data, and the results are ultimately fused to improve performance. Association rule mining is a data mining technique used to discover associations between different features in a dataset. Random forest algorithm is an ensemble learning algorithm based on decision trees used for classification and regression tasks.
[0039] The necessary processes are described as follows: 1. Feature Input and Preprocessing: Input 3D features, 2D features, and process parameter features into the model and perform normalization processing to improve the training efficiency of the model. 2. The first branch uses a residual network, specifically as follows: 2.1. Extract features through convolutional layers and residual connections to enhance the model's ability to learn complex patterns. 2.2. Use the ReLU activation function for nonlinear mapping to avoid the gradient vanishing problem. 2.3. Finally, output the defect type and quantization parameters for subsequent defect determination. 3. The second branch uses association rule mining and random forest, specifically as follows: 3.1. Use association rule mining algorithms to find association rules between defect features and process parameters. 3.2. Apply the random forest algorithm to evaluate the association rules and calculate the correlation degree between each defect feature and each process. 3.3. Output the correlation degree results for subsequent root cause process determination.
[0040] Step S500: When both the three-dimensional features and the two-dimensional features meet the preset defect threshold and the correlation of a certain process exceeds the preset threshold, the process is determined to be the root cause process.
[0041] Among them, the defect threshold is a pre-defined range of feature values used to determine the existence of a defect. When a feature value exceeds this range, a defect is considered to exist. Defect thresholds for 3D and 2D features are set based on historical data and experience. For example, the curvature threshold for 3D features might be set to a specific range (e.g., 0.1 to 0.5), and the edge strength threshold for 2D features might be set to a specific value (e.g., 100). Correlation degree is the strength of the correlation between the defect features calculated through the second branch and each process. The higher the correlation degree, the greater the impact of that process on the defect. The correlation degree threshold is set based on the output of the random forest algorithm. For example, the correlation degree threshold might be set to 0.7, indicating that when the correlation degree exceeds 0.7, the process is considered highly correlated with the defect. The root cause process is the main process that leads to the defect and requires optimization and adjustment.
[0042] The necessary procedures are described as follows: 1. Feature Value Judgment: Check whether the three-dimensional and two-dimensional features meet the preset defect thresholds. If both the three-dimensional and two-dimensional features exceed the thresholds, a defect is considered to exist. 2. Correlation Degree Judgment: Check whether the correlation degree of each process exceeds the preset correlation degree threshold. If the correlation degree of a certain process exceeds the threshold, that process is considered the root cause of the defect. 3. Root Cause Process Determination: Based on the combined results of the feature value and correlation degree judgments, determine the root cause process. For example, if the correlation degree of process P3 is 0.8, exceeding the threshold of 0.7, and both the three-dimensional and two-dimensional features meet the defect thresholds, then process P3 is determined to be the root cause process.
[0043] Step S600: Analyze the deviation between the key parameters of the root cause process and the defect quantification parameters, and correct the parameters through a dynamic adjustment mechanism according to the degree of deviation.
[0044] Key parameters are those that significantly impact part quality during the production process, such as processing temperature, pressure, and speed. Defect quantification parameters are specific quantitative indicators of defects identified through the model, such as defect area, depth, and intensity. Deviation values are the differences between the key parameters of the root cause process and the defect quantification parameters, used to assess whether parameter adjustments are necessary. The dynamic adjustment mechanism is a mechanism that adjusts key parameters in real time based on the magnitude of the deviation value to optimize the production process.
[0045] The necessary processes are described below: 1. Deviation Analysis: Analyze the deviation between the key parameters of the root cause process and the defect quantification parameters to determine the degree of deviation. For example, if the deviation of the processing temperature exceeds a preset threshold (e.g., 5°C), it is considered that the temperature parameter needs to be adjusted. 2. Dynamic Adjustment Mechanism: Based on the magnitude of the deviation, adjust the key parameters in real time through a dynamic adjustment mechanism. For example, use a PID controller (proportional-integral-derivative controller) to adjust the processing temperature, with the specific formula as follows:
[0046] ;
[0047] in, It is a control signal. It is the deviation value. These are parameters of a PID controller.
[0048] 3. Parameter Correction: Based on the output of the dynamic adjustment mechanism, key parameters are corrected to optimize the production process. For example, if the deviation of the processing temperature is 10°C, and the control signal calculated by the PID controller is to increase the temperature by 5°C, then the processing temperature is adjusted to the current temperature plus 5°C.
[0049] Step S700: Re-inspect the surface features of the part to verify whether the defect has been eliminated. If not, repeat the adjustment until the standard is met.
[0050] The process involves several steps: Re-inspection: The surface features of the part are re-inspected after parameter adjustments to verify whether defects have been repaired. Acceptance: The surface features of the part meet quality standards, and defects are completely eliminated or reduced to an acceptable range. Repeated adjustment: If defects are not eliminated or do not meet standards, the key parameters are readjusted based on the new inspection results.
[0051] The necessary processes are described below: 1. Re-inspection and Feature Extraction: The surface of the part is re-inspected after parameter adjustment to obtain new height and optical maps. Preprocessing operations such as denoising and feature extraction are performed on the new image data to obtain a new feature set. 2. Defect Verification: The new feature set is input into a deep learning model to identify defect types and quantification parameters. The defect quantification parameters are checked to see if they meet preset quality standards (e.g., whether defect area and depth are within allowable ranges). 3. Judgment and Repeated Adjustment: If the defect is not eliminated or does not meet the standards, the deviation between the new defect quantification parameters and the key parameters is analyzed. Based on the deviation, the key parameters are adjusted again through a dynamic adjustment mechanism. The above process is repeated until the defect is eliminated or the quality standards are met.
[0052] Reference Figure 2 Denoising the height map and extracting 3D features includes:
[0053] Step S310: Import the part CAD model and design parameters, establish a height map and part coordinate mapping through positioning fixtures, divide the structure into plane, curved surface, deep hole and micro protrusion sub-regions according to structural form, and clarify the structural characteristics and material characteristics of each sub-region.
[0054] The components include: CAD Model: Computer-Aided Design (CAD) model, containing the part's geometry, dimensions, and design parameters. Design Parameters: Key parameters used in part design, such as dimensions, tolerances, and material properties. Positioning Fixture: A device used to fix the part and ensure its accurate positioning during inspection. Coordinate Mapping: Establishing a correspondence between pixel coordinates in the heightmap and the part's actual physical coordinates. Sub-regions: Different regions divided according to the part's structural form, such as planes, curved surfaces, deep holes, and small protrusions. Structural Characteristics: The geometric shape and dimensional features of the sub-regions. Material Characteristics: The material properties of the sub-regions, such as hardness and reflectivity.
[0055] The necessary process is described as follows: 1. Import CAD model and design parameters: Import the CAD model and design parameters of the part using CAD software to ensure the integrity and accuracy of the model. For example, load the CAD model file of the part using the file import function. 2. Establish coordinate mapping: Fix the part on the inspection platform using positioning fixtures, and establish the coordinate mapping between the height map and the part using a laser tracker or optical positioning system. For example, use a laser tracker to measure the feature points of the part and establish the coordinate mapping relationship: Mapping(x,y)=Transform(x′,y′), where (x,y) are the pixel coordinates of the height map, and (x′,y′) are the physical coordinates of the part. 3. Sub-region division: Divide the part into sub-regions such as planes, curved surfaces, deep holes, and small protrusions according to the geometry of the CAD model. For example, use the geometric analysis tool of the CAD software to divide the sub-regions according to the structural shape: Region(i)=Segment(i,CAD Model), where Region(i) is the i-th sub-region, and Segment is the division function. 4. Define structural and material properties: Extract the structural properties (such as size and shape) and material properties (such as hardness and reflectivity) of each sub-region from the CAD model.
[0056] Step S320: Based on the structural and material characteristics of the sub-region, select a suitable 3D scanning device and adopt corresponding scanning methods for different material characteristics to ensure the quality of the height map data of each sub-region.
[0057] Among them, 3D scanning equipment refers to devices used to acquire height maps of part surfaces, such as laser scanners and white light interferometers. Scanning method refers to the scanning mode selected based on material characteristics, such as laser scanning or structured light scanning. Data quality refers to the accuracy and reliability of the height map, including indicators such as resolution and signal-to-noise ratio.
[0058] The necessary process is described below: 1. Select a suitable 3D scanning device: Choose the scanning device based on the structural characteristics of the sub-region. For example, for planar areas, choose a high-resolution laser scanner; for deep hole areas, choose a probe-type scanner that can penetrate deep into the hole. For example, for planar areas made of aluminum alloy, choose a laser scanner, whose scanning resolution can reach 0.01mm. 2. Determine the scanning method: Select the scanning mode based on the material characteristics. For example, for high-reflectivity metal surfaces, use laser scanning; for low-reflectivity plastic surfaces, use structured light scanning. For example, for curved areas made of stainless steel, use structured light scanning to improve scanning accuracy. 3. Ensure data quality: Improve data quality through multiple scans and data fusion. For example, use multi-angle scanning and data fusion to reduce shadow and reflection interference. For example, for deep hole areas, use multiple scans and data fusion to ensure the integrity of the surface data inside the hole.
[0059] Step S330: For the height map obtained by scanning, perform layered denoising by combining the structural characteristics of the sub-regions and the noise type.
[0060] Layered denoising involves dividing the image into multiple layers based on different features or noise intensity, and then performing denoising processing on each layer separately. Noise types include: types of image noise such as Gaussian noise, salt-and-pepper noise, and impact noise; and structural characteristics such as the geometric features of sub-regions, including planes, curved surfaces, deep holes, and minute protrusions.
[0061] The necessary steps are as follows: 1. Noise type identification: Perform wavelet transform on the height map obtained from the scan to obtain high-frequency coefficients. Analyze the histogram and curve fitting integral of the high-frequency coefficients to determine the noise type. For example, if the histogram signal-to-noise ratio R < 0.2 and the curve fitting integral A < 60, it is judged as Gaussian noise. 2. Layered denoising: Based on the noise type and the structural characteristics of the sub-regions, the height map is layered. For example, for planar regions, the noise intensity is low, so it can be divided into finer layers; for deep hole regions, the noise intensity is high, so it can be divided into coarser layers. Denoising is performed on each layer separately. For example, for Gaussian noise, wavelet thresholding is used for denoising; for salt-and-pepper noise, median filtering is used.
[0062] The denoising results are updated layer by layer to generate intermediate denoised images, and noise detection and denoising continue until all noise points are processed. The selection of layered denoising algorithms is based on the noise type and structural characteristics of the sub-regions. For example, wavelet thresholding can be used for Gaussian noise, and median filtering can be used for salt-and-pepper noise. 3. Denoising effect verification: The denoising effect is verified by comparing the image quality before and after denoising. For example, the signal-to-noise ratio (SNR) and peak signal-to-noise ratio (PSNR) of the denoised image are calculated to evaluate the denoising effect.
[0063] Step S340: Based on the denoised height map, the design features and abnormal regions are separated by feature matching and comparison with the CAD model, and the preset volatile features are subjected to preset enhancement processing.
[0064] Feature matching involves matching feature points in the denoised heightmap with design feature points in the CAD model to determine the correspondence between the actual shape and the designed shape of the part. Design features are the geometric features of the part defined in the CAD model, such as edges, curvature, and holes. Abnormal areas are regions that do not match the design features, potentially indicating surface defects or processing errors. Pre-defined volatile features are key features pre-defined based on the part's structural characteristics, material properties, and scanning process characteristics. These features are prone to data loss, distortion, or misjudgment during 3D inspection due to equipment limitations, environmental interference, or inherent structural fragility. They include thin-walled features and micro-protrusions. Thin-walled features are areas with thin walls in the part, which are prone to deformation or feature loss during processing or inspection. Micro-protrusions are small protrusions on the part's surface, which are easily misjudged or missed during inspection. Pre-defined enhancement processing refers to targeted optimization methods pre-set for volatile features such as thin walls and micro-protrusions.
[0065] The necessary processes are described below: 1. Feature Extraction: Apply edge detection algorithms (such as the Canny operator) to the denoised heightmap to extract edge features. Use point feature detection algorithms (such as SIFT or ORB) to extract key points in the heightmap. 2. Feature Matching: Match the extracted feature points with design feature points in the CAD model. For example, use the minimum cost K-flow algorithm or GMS algorithm for feature matching. Calculate the similarity metric between feature points (such as Euclidean distance or Hamming distance) to determine matching point pairs. 3. Separation of Design Features and Abnormal Regions: Based on the matching results, compare the feature points in the heightmap with the design feature points in the CAD model to separate design features and abnormal regions. Mark the abnormal regions for subsequent analysis and processing. 4. Enhancement Processing: Enhance volatile features such as thin-walled features and small protrusions. Enhancement processing can be as follows: For thin walls, use multi-frame heightmap fusion to complete the edges; for protrusions, enhance the boundaries by increasing the scanning resolution (to 0.003mm) combined with top-hat transformation to ensure the integrity and accuracy of feature data. Then, methods such as finite element analysis can be used to verify the strengthened features to ensure that they meet the design requirements.
[0066] Step S350: Extract the three-dimensional feature parameters of each sub-region.
[0067] Among them, three-dimensional feature parameters are quantitative indicators describing the surface geometry and structure of a part, such as curvature, roughness, hole diameter, and protrusion height. Sub-regions are different regions divided according to the structural form of the part, such as planes, curved surfaces, deep holes, and micro-protrusions. Feature extraction algorithms are algorithms used to extract specific geometric features from the height map, such as curvature calculation and edge detection.
[0068] The necessary processes are described below: 1. Curvature Calculation: Apply the Gaussian curvature formula to the denoised height map to calculate the curvature of each point. For example, for sub-region 1 (plane), calculate its curvature distribution and identify areas with large curvature variations. 2. Roughness Calculation: Calculate surface roughness using the root mean square roughness formula. For example, for sub-region 2 (curved surface), calculate its surface roughness to evaluate processing quality. 3. Aperture and Protrusion Height Calculation: Identify hole and protrusion regions using image segmentation algorithms. For example, for sub-region 3 (deep hole), identify the hole boundary through threshold segmentation and calculate the hole diameter. 4. For sub-region 4 (micro-protrusion), identify the protrusion region through edge detection and calculate the protrusion height. 5. Feature Parameter Summarization: Summarize the extracted 3D feature parameters to form a feature parameter table. For example, the feature parameter table includes curvature, roughness, aperture, protrusion height, etc.
[0069] Based on the structural and material characteristics of the sub-regions, suitable 3D scanning equipment is selected, and corresponding scanning methods are adopted for different material characteristics to ensure the quality of the height map data for each sub-region, including:
[0070] Step S321: Based on the divided sub-regions, determine the scanning accuracy and anti-interference requirements by combining their structural and material characteristics.
[0071] Among them, structural characteristics refer to the geometric features of the sub-region, such as planes, curved surfaces, deep holes, and micro-protrusions. Material characteristics refer to the material properties of the sub-region, such as reflectivity, absorbance, and hardness. Scanning accuracy refers to the smallest unit of measurement that a 3D scanning device can achieve, usually expressed in millimeters (mm) or micrometers (μm). Interference resistance requirements refer to external interference factors that need to be considered to ensure the quality of scanned data, such as light reflection and absorption.
[0072] The necessary process is described as follows: 1. Analyze the structural characteristics of sub-regions: Based on the CAD model and design parameters, analyze the geometric features of each sub-region. For example, use the geometric analysis tools of the CAD software to determine the type of sub-region (planar, curved, deep hole, micro-protrusion, etc.). 2. Analyze the material properties of sub-regions: Based on the material properties of the CAD model, analyze the material properties of each sub-region (reflectivity, absorbance, etc.). For example, read the material information from the properties of the CAD model to determine the material properties. 3. Determine the scanning accuracy requirements: Based on the structural characteristics of the sub-regions, determine the required scanning accuracy. For example, for planar regions, the required scanning accuracy is 0.05mm; for micro-protrusion regions, the required scanning accuracy is 0.01mm. 4. Determine the anti-interference requirements: Based on the material properties, determine the anti-interference requirements. For example, for highly reflective materials, use polarizing filters; for strongly absorbent materials, increase the light source intensity.
[0073] Step S322: Match the corresponding 3D scanning equipment according to the determined accuracy requirements.
[0074] Among them, accuracy requirements refer to the scanning accuracy requirements determined based on the structural characteristics of the sub-region, usually expressed in millimeters (mm) or micrometers (μm). 3D scanning equipment refers to the equipment used to acquire the surface height map of the part, such as laser scanners, white light interferometers, and structured light scanners. Matching rules are the rules for selecting appropriate 3D scanning equipment based on accuracy requirements and equipment characteristics.
[0075] The necessary process is described below: 1. Determine accuracy requirements: Based on the structural characteristics of each sub-region, determine the required scanning accuracy. For example, the accuracy requirement for a planar region is 0.05mm, and for a region with minute protrusions, it is 0.01mm. 2. Select equipment: Select scanning equipment that meets the accuracy requirements from the equipment database. For example, for a region with high accuracy requirements such as minute protrusions, a laser scanner and a white light interferometer are selected. 3. Consider material characteristics: Further select equipment based on material characteristics to ensure that the equipment can adapt to the reflectivity and absorbance of different materials. For example, for highly reflective materials, a laser scanner is preferred; for highly absorbent materials, a white light interferometer is preferred. 4. Match equipment: Using a matching algorithm, combining the accuracy requirements and material characteristics, select the most suitable scanning equipment. For example, for highly reflective planar regions, a laser scanner is selected; for low-reflectivity curved surfaces, a structured light scanner is selected.
[0076] Step S323: Dynamically adjust the scanning parameters according to the material characteristics, and use corresponding laser sources and parameters for sub-regions with high reflectivity, strong light absorption and conventional materials respectively.
[0077] Dynamic adjustment involves modifying scanning parameters in real-time based on detected material characteristics to optimize scanning results. Laser source parameters refer to the characteristic parameters of the laser in the laser scanner, such as wavelength, power, and pulse frequency. Highly reflective materials are those with high light reflectivity, such as metal surfaces (aluminum alloys, stainless steel, etc.). Highly absorbent materials are those with high light absorption, such as dark-colored plastics or rubber. Conventional materials are those with moderate reflectivity and absorption, such as ordinary plastics or wood.
[0078] The necessary procedures are described below: 1. Detect material characteristics: Use a spectrometer or reflectance meter to detect the material characteristics of each sub-region. For example, the reflectance of an aluminum alloy surface is measured to be 80%, while that of black plastic is 10%. 2. Determine laser source parameters: Determine the laser source parameters based on the material characteristics. For example, for highly reflective materials (such as aluminum alloy), select a laser source with a wavelength of 1064nm and a power of 5W; for strongly absorbent materials (such as black plastic), select a laser source with a wavelength of 532nm and a power of 10W. 3. Dynamically adjust scanning parameters: Dynamically adjust the scanning parameters based on the material characteristics detected in real time. For example, if a sudden change in material reflectance is detected, automatically adjust the laser power or wavelength. 4. Verify the adjustment effect: Verify the effectiveness of the adjusted parameters through real-time scanning data. For example, check the signal-to-noise ratio (SNR) and contrast of the scanned image to ensure data quality.
[0079] Step S324: Analyze the structural disturbance risk based on the structural characteristics of the sub-region, and activate preset auxiliary measures according to the analyzed structural disturbance risk.
[0080] Structural interference risk refers to interference that may occur during scanning due to the geometry or structural features of the parts, such as occlusion, reflection, and shadows. Pre-set auxiliary measures are pre-designed auxiliary methods to address structural interference risks, such as adjusting the scanning angle, using auxiliary light sources, and applying obstructions.
[0081] For details on the specific process, please refer to steps S3241 to S3245, which will not be elaborated here.
[0082] Structural disturbance risk is analyzed based on the structural characteristics of sub-regions, and pre-defined auxiliary measures are activated according to the analyzed structural disturbance risk, including:
[0083] Step S3241: Extract key structural parameters of the sub-region, including the diameter-to-depth ratio of the deep hole, the wall thickness, and the spacing between the micro protrusions.
[0084] Key structural parameters are crucial values describing the geometric features of sub-regions, such as the aperture-to-depth ratio, thin-wall thickness, and micro-protrusion spacing. Aperture-to-depth ratio: The ratio of the diameter to the depth of a deep hole, used to assess the scanning difficulty of deep holes. Thin-wall thickness: The wall thickness of thin-walled regions, used to assess the scanning stability of thin-walled regions. Micro-protrusion spacing: The distance between micro-protrusions, used to assess the scanning complexity of micro-protrusion regions.
[0085] The necessary steps are described below: 1. Extract the diameter-to-depth ratio of the deep hole: Use the geometric analysis tools in the CAD software to extract the diameter and depth of the deep hole. Calculate the diameter-to-depth ratio to assess the scanning difficulty of the deep hole. 2. Extract the thin-wall thickness: Use the geometric analysis tools in the CAD software to extract the wall thickness of the thin-walled region. For example, the thin-wall thickness can be extracted as 0.5 mm through cross-sectional analysis. 3. Extract the spacing between minute protrusions: Use the geometric analysis tools in the CAD software to extract the distance between minute protrusions. For example, the spacing between minute protrusions can be extracted as 1 mm through point cloud analysis.
[0086] Step S3242: Determine the risk type based on key structural parameters and preset thresholds. When the diameter-to-depth ratio of deep holes and grooves reaches the preset occlusion threshold, it is determined that there is a risk of scanning occlusion. When the thickness and spacing of adjacent areas of thin walls and micro protrusions reach the preset vibration threshold, it is determined that there is a risk of vibration sensitivity.
[0087] Key structural parameters include: geometric feature parameters of the sub-region, such as the aperture-to-depth ratio of deep holes, thin-wall thickness, and spacing of micro-protrusions. Preset thresholds are reference values used to determine risk types, such as the occlusion threshold for the aperture-to-depth ratio and the vibration threshold for thin walls and micro-protrusions. Risk types are potential scanning risks determined based on the key structural parameters and preset thresholds, such as scanning occlusion risk and vibration sensitivity risk.
[0088] The necessary process is described as follows: 1. Extract key structural parameters: Use the geometric analysis tools of CAD software to extract key structural parameters of the sub-region. For example, extract the aperture-to-depth ratio of a deep hole to be 0.2, the thin wall thickness to be 0.5mm, and the spacing between micro-protrusions to be 1mm. 2. Determine the risk type: Compare the extracted key structural parameters with preset thresholds to determine the risk type. For example, if the aperture-to-depth ratio reaches a preset occlusion threshold (e.g., 0.3), it is determined that there is a risk of scan occlusion; if the thickness and spacing of the thin wall and micro-protrusions reach a preset vibration threshold (e.g., 0.5mm), it is determined that there is a risk of vibration sensitivity. 3. Record the risk type: Record the determined risk type in the system so that corresponding auxiliary measures can be implemented later.
[0089] Step S3243: To address the risk of scanning occlusion, a preset side-mounted scanning lens is activated, and a rotating fixture is used to perform multi-angle scanning at preset steps.
[0090] Among these, the risks include: Scan occlusion risk: the risk that the scanning device cannot directly acquire complete data due to the geometry of the part (such as deep holes, grooves, etc.). Side-mounted scanning lens: a lens mounted on the side of the scanning device to acquire data from the sides of the part or areas difficult to scan directly. Rotary fixture: a device used to fix the part and allow it to rotate in preset steps for scanning from multiple angles. Preset step size: the angle of each rotation of the rotary fixture, used to control the accuracy of multi-angle scanning.
[0091] The necessary procedures are described below: 1. Assess scan occlusion risk: Assess scan occlusion risk based on the structural characteristics of the sub-region (e.g., deep holes, grooves, etc.). If the aperture-to-depth ratio reaches a preset occlusion threshold, scan occlusion risk is identified. 2. Activate side-mounted scanning lens: Activate the preset side-mounted scanning lens to ensure the lens can acquire data from the side. Adjust the position and angle of the side-mounted scanning lens to cover the occluded area. 3. Configure rotating fixture: Fix the part on the rotating fixture and set the preset step size of the rotating fixture. The preset step size is determined based on the geometry of the part and the scanning accuracy requirements, typically between 1° and 10°. 4. Multi-angle scanning: Rotate the part using the rotating fixture at the preset step size, and the side-mounted scanning lens scans from multiple angles. After each rotation, the scanning device acquires new angle data until all angles have been scanned. 5. Data stitching and processing: The scanned data is stitched and processed by software to obtain complete part surface data. Check the coverage of the stitched data to ensure data integrity and accuracy.
[0092] If the deep holes in the parts pose a risk that the scanning equipment cannot directly acquire complete data, then to address the risk of scanning obstruction, a preset side-positioned scanning lens is used, along with a rotating fixture to perform multi-angle scanning at preset steps, as follows:
[0093] Step 1: Import the part's CAD model and design parameters. Use the structure recognition module to locate the deep hole area and extract structural parameters such as hole diameter, depth, and hole axis coordinates. Combine this with spatial geometry algorithms to calculate the critical occlusion angles corresponding to different hole depths and generate scanning requirement instructions.
[0094] The structure recognition module uses image processing or geometric analysis-based algorithms to identify deep hole regions. For example, it extracts the edges of the hole using edge detection algorithms (such as the Canny algorithm) and combines this with a region filling algorithm to identify the internal region of the hole. Geometric analysis tools are used to extract the hole diameter, depth, and hole axis coordinates. For example, the geometric parameters of the hole are extracted using the geometric analysis functions of CAD software.
[0095] Aperture, Depth, and Hole Axis Coordinates: Geometric parameters of a deep hole. The aperture represents the diameter of the hole, the depth represents the length of the hole, and the hole axis coordinates represent the position of the hole's centerline in space. Critical Occlusion Angle: The minimum angle at which the scanning equipment can avoid occlusion from the hole wall when scanning the deep hole from a certain angle. Scanning Requirement Command: Generated based on the deep hole's geometric parameters and the critical occlusion angle, used to guide the operation of the scanning equipment and rotating fixture.
[0096] The spatial geometry algorithm is as follows: Based on the geometric parameters of the deep hole, the spatial geometry algorithm calculates the critical shading angle corresponding to different hole depths. For example, trigonometric functions are used to calculate the critical shading angle:
[0097] .
[0098] The scanning requirement command is generated as follows: Based on the geometric parameters of the deep hole and the critical occlusion angle, the scanning requirement command is generated. For example: Scanning angle: from 0° to 360°, with a step size of 10°. Focal length: dynamically adjusted according to the hole depth and diameter. Rotation step size: a conventional step size is used in the hole opening area, and a fine step size is used in the hole bottom area.
[0099] Step 2: Based on the deep hole structure parameters, the servo control system of the rotating fixture receives the dynamic step length signal. The hole opening area adopts the preset conventional transmission step length, and the hole bottom area triggers the fine indexing mode. At the same time, according to the geometric relationship between the current rotation angle and the hole depth, the zoom module of the side-mounted lens is driven to adjust the focal length in real time so that the density of the collected hole wall point cloud meets the preset coverage threshold.
[0100] The deep hole structure parameters include the geometric parameters of the deep hole, such as diameter, depth, and hole axis coordinates. The servo control system precisely controls the movement of the rotating fixture, receiving dynamic step length signals and executing corresponding actions. The dynamic step length signal is a step length adjustment signal generated in real time based on the deep hole structure parameters and scanning requirements, used to control the movement of the rotating fixture. The zoom module is a device used to adjust the lens focal length in real time, ensuring high-quality images are acquired at different scanning positions. The preset coverage threshold is the minimum point cloud density of the hole wall set to ensure the integrity of the scanned data.
[0101] The necessary process is described as follows: 1. Receiving deep hole structure parameters: The servo control system receives the deep hole structure parameters extracted from the CAD model and structure recognition module. 2. Calculating dynamic step size signal: Based on the deep hole structure parameters and the critical occlusion angle, the step size corresponding to different hole depths is calculated. A preset conventional transmission step size is used in the hole opening area, while a fine indexing mode is triggered in the hole bottom area. 3. Driving the rotating fixture: The servo control system drives the rotating fixture according to the dynamic step size signal. A larger step size is used in the hole opening area to improve scanning efficiency, while a smaller step size is used in the hole bottom area to ensure scanning accuracy. 4. Real-time focal length adjustment: Based on the geometric relationship between the current rotation angle and the hole depth, the zoom module of the side-mounted lens is driven to adjust the focal length in real time. This ensures that high-quality images can be acquired at different scanning positions, and that the collected hole wall point cloud density meets the preset coverage threshold. 5. Verifying point cloud density: The collected hole wall point cloud density is monitored in real time to ensure that it meets the preset coverage threshold. If the point cloud density is insufficient, the step size or focal length is adjusted until the requirements are met.
[0102] Step 3: The light intensity inside the hole is collected in real time by a preset light sensor and fed back. When the intensity exceeds the preset threshold, the polarization mirror switching motor is triggered to adjust the lens angle, and the laser power adjustment module is linked to reduce the power according to the preset ratio. At the same time, the Gaussian filtering algorithm is started to eliminate noise.
[0103] The necessary processes are as follows: 1. Real-time acquisition of light intensity: The light sensor monitors the light intensity inside the aperture in real time and feeds the data back to the control system. For example, the sensor acquires light intensity data once per second. 2. Determining if the light intensity exceeds a preset threshold: The control system receives the light intensity data and compares it with a preset threshold. If the light intensity exceeds the preset threshold (e.g., 1000 lux), subsequent adjustment actions are triggered. 3. Adjusting the polarizer angle: The polarizer switching motor is triggered to adjust the angle of the polarizer to reduce the intensity of reflected light. For example, the polarizer angle is adjusted from 0° to 45°. 4. Reducing laser power: The laser power adjustment module is activated to reduce the laser power by a preset ratio. For example, the laser power is reduced from 100% to 80%. 5. Activating the Gaussian filter algorithm: The Gaussian filter algorithm is activated synchronously to process the acquired image data, eliminate noise, and improve image quality. For example, a Gaussian filter is used to smooth the image, with a filter kernel size of 3×3.
[0104] Step 4: The vision sensor captures the reference mark point on the edge of the deep hole every time it rotates by a preset angle. The deviation between the actual angle and the theoretical value is calculated by the coordinate transformation matrix, and the tooling fine-tuning motor is driven to perform real-time compensation.
[0105] Vision sensor: A device used to capture images, typically mounted on a scanning device, used to monitor reference mark points at the edge of deep holes in real time. Reference mark points: Feature points at the edge of deep holes used to locate and calibrate the position and angle of the scanning device. Coordinate transformation matrix: A mathematical tool used to convert actual measured coordinates into a theoretical coordinate system, typically used to calculate deviations. Fixture fine-tuning motor: A motor used to fine-tune the position of rotating fixtures, ensuring the scanning device can accurately align with the target position.
[0106] The necessary processes are described below: 1. The vision sensor captures the reference mark point: The vision sensor captures the reference mark point on the edge of the deep hole once every preset angle (e.g., 10°). For example, the sensor captures images at positions such as 0°, 10°, and 20°. 2. Calculate the deviation between the actual angle and the theoretical value: The actual measured coordinates are converted to coordinates in the theoretical coordinate system using a coordinate transformation matrix. The deviation between the actual angle and the theoretical value is calculated. For example, if the theoretical angle is 10° and the actual angle is 10.2°, the deviation is 0.2°. 3. Drive the tooling fine-tuning motor for real-time compensation: Based on the calculated deviation, the tooling fine-tuning motor is driven to make real-time adjustments. For example, the rotation angle of the motor is adjusted to make the actual angle consistent with the theoretical value. The fine-tuning motor adjusts the rotation angle according to the deviation signal to ensure that the scanning equipment can accurately align with the target position.
[0107] Step 5: Input the raw data of the multi-view deep hole into the preset data fusion algorithm. After SIFT feature matching processing, check whether the data coverage of each area of the hole wall meets the preset standard. If it does not meet the standard, back-derive the new step size adjustment instruction based on the missing area and feed it back to the rotating fixture to repeat the scan until the complete deep hole height map data without obstruction is formed.
[0108] Multi-view deep borehole raw data: Point cloud data or image data of the deep borehole surface acquired from different angles and positions. Data fusion algorithm: An algorithm used to merge multi-view data into a complete dataset, typically including steps such as feature extraction, data alignment, and fusion. SIFT feature matching: A feature matching algorithm based on scale-invariant feature transform, used to identify and match feature points in images.
[0109] The necessary process is described as follows: 1. Input multi-view deep borehole raw data: Raw deep borehole data acquired from different angles is input into a preset data fusion algorithm. For example, point cloud data acquired every 10° from 0° to 360° is input. 2. Data alignment and feature matching: The SIFT feature matching algorithm is used to extract and match feature points from the multi-view data to ensure spatial alignment. For example, feature points are extracted from each viewpoint and aligned using a feature matching algorithm. 3. Data fusion: The aligned data is fused to generate a complete deep borehole height map. For example, the voxel mesh method is used to fuse point cloud data into a 3D model. 4. Verify data coverage: The data coverage after fusion is calculated to check if it meets the preset standard. For example, the data coverage is calculated to ensure it reaches 95%. 5. Evaluate data integrity: If the data coverage does not meet the preset standard, missing areas are identified. For example, insufficient data coverage is found in the bottom area of the borehole. 6. Generate step size adjustment instructions: Based on the location and extent of the missing areas, new step size adjustment instructions are derived. For example, increase the scanning step size in the bottom area of the hole, adjusting it from 2° to 1°. 7. Feedback to the rotating fixture: Feedback the new step size adjustment command to the rotating fixture, repeatedly scanning the missing area until the data coverage reaches the preset standard. 8. Verify the final data: Repeat the above process until unobstructed, complete deep hole height map data is generated, ensuring the integrity and accuracy of the data.
[0110] Step S3244: Enable the preset anti-vibration compensation function for vibration-sensitive risks, and suppress mechanical vibration during the scanning process with preset accuracy.
[0111] Vibration sensitivity risk: Due to the structural characteristics of parts (such as thin walls, small protrusions, etc.), they are particularly sensitive to mechanical vibration, which may lead to inaccurate scanning data. Vibration compensation function: A function in scanning equipment used to reduce the impact of mechanical vibration, usually implemented through a combination of hardware and software. Preset accuracy: The vibration suppression accuracy to be achieved during scanning, usually expressed as a percentage or absolute value of the vibration amplitude.
[0112] The necessary process is described as follows: 1. Assess vibration sensitivity risk: Assess vibration sensitivity risk based on the structural characteristics of the sub-region (e.g., thin walls, small protrusions). If the thickness of the thin wall or the spacing of the small protrusions reaches the preset vibration threshold, it is determined that there is a vibration sensitivity risk. 2. Enable vibration compensation function: Enable the preset vibration compensation function, including hardware and software measures. Hardware measures: Install vibration damping devices, such as vibration damping pads, dampers, etc. Software measures: Enable vibration compensation algorithms, such as adaptive filtering algorithms. 3. Set preset accuracy: Set the preset accuracy according to the structural characteristics of the part and the scanning accuracy requirements. For example, set the vibration suppression accuracy to within 10% of the vibration amplitude. 4. Implement vibration compensation: Monitor mechanical vibration in real time during the scanning process and adjust it through the vibration compensation function. For example, use an adaptive filtering algorithm to adjust the scanning data in real time to suppress the impact of vibration. 5. Verify vibration compensation effect: Verify the vibration compensation effect through real-time scanning data to ensure that the vibration amplitude is within the preset accuracy range. If the vibration amplitude exceeds the preset accuracy, adjust the vibration compensation parameters and rescan.
[0113] Step S3245: After the scan is completed, check the data coverage of the sub-region. If the coverage reaches the preset standard, the auxiliary measures are deemed effective. If the coverage does not reach the standard, the auxiliary measures parameters are readjusted and the scan is repeated.
[0114] Data coverage: The degree to which scanned data covers the surface of a part, usually expressed as a percentage. Preset standard: A set target value for data coverage, used to evaluate the integrity of the scanned data.
[0115] Auxiliary parameters: parameters used to adjust scanning equipment or tooling, such as scanning angle, step size, vibration compensation strength, etc.
[0116] The necessary process is described as follows: 1. Calculate data coverage: Use the software tools of the scanning equipment to calculate the coverage of the scanned data. For example, calculate the coverage based on the density and distribution of point cloud data. 2. Evaluate data coverage: Compare the calculated data coverage with a preset standard. For example, the preset standard is 95%, and the actual coverage is 92%. 3. Determine the effectiveness of auxiliary measures: If the data coverage reaches the preset standard, the auxiliary measures are deemed effective. If the data coverage does not meet the standard, the auxiliary measures are deemed ineffective, and the parameters need to be readjusted. 4. Adjust auxiliary measure parameters: Adjust the auxiliary measure parameters based on the data coverage result. For example, if the data coverage is lower than the preset standard, the step size of the rotating fixture can be reduced or the vibration compensation strength can be increased. 5. Repeat scanning: After adjusting the parameters, scan again until the data coverage reaches the preset standard.
[0117] Optimizing reflections and extracting two-dimensional features from optical images includes:
[0118] Step S3a0: Import the part CAD model and design parameters, divide the structural areas according to the model, select the appropriate light source and equipment according to the characteristics and materials of the areas, preprocess the high reflectivity areas with a polarizing mirror with a preset polarization angle, and collect the original optical image.
[0119] The system is categorized into several regions: Structural Regions: These are regions with different geometric features, such as planes, curved surfaces, deep holes, and minute protrusions, defined by the CAD model. Suitable Light Sources and Equipment: Appropriate light sources and scanning equipment are selected based on the characteristics of each region to optimize scanning results. Polarizing Filters: Optical elements used to reduce or eliminate reflections, using polarization filtering at specific angles to minimize reflected light. High-Reflectivity Regions: Areas with high surface reflectivity typically require special treatment to reduce the impact of reflections on the scanning process.
[0120] The necessary process is described below: 1. Import CAD Model and Design Parameters: Import the CAD model and design parameters of the part using CAD software to ensure the integrity and accuracy of the model. For example, load the CAD model file of the part using the file import function. 2. Divide Structural Regions: Divide the CAD model into different structural regions based on its geometric features. For example, use the geometric analysis tools of the CAD software to divide the part into regions such as planes, curved surfaces, deep holes, and small protrusions. 3. Select Appropriate Light Source and Equipment: Select a suitable light source and scanning equipment based on the characteristics of the structural regions. For example, for highly reflective areas, select a low-angle light source to reduce reflection. 4. Polarizing Filter Preprocessing: Preprocess highly reflective areas using a polarizing filter with a preset polarization angle to reduce reflection. For example, use a polarizing filter to reduce the reflection of natural light and improve scanning quality. 5. Acquire Raw Optical Images: Acquire raw optical images using the selected equipment and light source. For example, use an industrial camera to acquire optical images after polarizing filter processing.
[0121] Step S3b0: Based on the acquired optical image, eliminate specular reflection in highly reflective areas, fuse images with a preset number of polarization angles to achieve a preset texture retention rate threshold, correct the brightness of unevenly lit areas to a preset brightness deviation range, and increase the contrast of dark areas to a preset contrast threshold.
[0122] Among them, specular reflection: the reflection of light on a smooth surface, which usually results in bright areas in the image, affecting the observation of details. Texture retention: the degree to which texture information is retained in the image, usually expressed as a percentage. Polarization angle: the angle of a polarizing filter relative to the light source, used to reduce reflected light. Brightness deviation range: the allowable deviation range of brightness in the corrected image, used to evaluate the uniformity of illumination. Contrast threshold: the minimum contrast in dark areas, used to evaluate the visibility of image details.
[0123] The necessary processes are described below: 1. Eliminate specular reflection: Take multiple images of highly reflective areas using a polarizing filter with a preset polarization angle. Fuse these images to achieve a texture retention rate of a preset threshold (e.g., 90%). 2. Correct uneven illumination: Estimate illumination components using a multi-scale Gaussian function and perform a logarithmic transformation. Adjust brightness through a power transformation to control brightness deviation within a preset range (e.g., ±10%). 3. Enhance contrast: Process dark areas using an adaptive enhancement algorithm with nonlinear global brightness correction. 4. Adjust contrast to ensure dark area contrast reaches a preset threshold (e.g., 30%).
[0124] Step S3c0: Combine the CAD model to locate the area where the shadow area ratio exceeds the preset shadow ratio threshold, extract the shadow features, and use multi-view image stitching to make the overlap reach the preset overlap threshold to eliminate feature breakage.
[0125] Among them, shadow area proportion: the proportion of the image area occupied by the shadow region, used to assess the degree of influence of shadows on the image. Preset shadow area proportion threshold: the upper limit set for the shadow area proportion; areas exceeding this value require special processing. Overlap degree: the degree of overlap of features between images from different viewpoints during multi-view image stitching, used to evaluate the stitching effect. Preset overlap degree threshold: the lower limit set for the overlap degree; the overlap degree of the stitched image must reach this value to ensure feature integrity.
[0126] The necessary process is described as follows: 1. Locating the shadow region: Using image segmentation algorithms combined with the CAD model, locate regions where the shadow area ratio exceeds a preset shadow ratio threshold. For example, using grayscale thresholding, identify regions in the image below a certain grayscale value as shadow regions and calculate their area ratio. If the area ratio exceeds a preset threshold (e.g., 10%), mark the region as a shadow region to be processed. 2. Extracting features under the shadow: For the marked shadow regions, use multi-view image stitching technology to extract features under the shadow. For example, take optical images of the part from multiple different angles and use feature matching algorithms (e.g., SIFT or ORB) to extract feature points. By matching these feature points, stitch the multi-view images to extract the features under the shadow region. 3. Multi-view image stitching: Use a multi-view image stitching algorithm to stitch images from different perspectives, ensuring that the overlap of the stitched images reaches a preset overlap threshold. For example, stitch multi-view images using feature point matching and image fusion algorithms. During the stitching process, adjust the image alignment and fusion parameters to ensure that the overlap of the stitched images in the feature regions reaches a preset threshold (e.g., 90%). 4. Verify the stitching effect: Check whether the overlap of the stitched images reaches the preset overlap threshold. If it does not reach the preset threshold, adjust the stitching parameters and re-stitch until the requirements are met.
[0127] Step S3d0: The defect contour is extracted using the dynamic threshold Canny algorithm with a preset edge detection threshold. The region exceeding the preset texture anomaly threshold is identified by combining texture parameters. For regular structures, template matching with a preset matching degree threshold is used to exclude normal textures and strengthen the defect edges.
[0128] Among them, the dynamic thresholding Canny algorithm is a classic edge detection algorithm that extracts edges in an image by dynamically adjusting the threshold, and is suitable for different lighting and noise conditions. Texture parameters are quantitative indicators describing the texture features of an image, such as texture direction and texture intensity, used to identify texture anomalies in an image. Template matching is an image recognition technique that identifies specific structures in an image by comparing the similarity between a template and the image to be detected. The matching degree threshold is a set lower limit for template matching similarity; regions exceeding this value are considered normal textures.
[0129] The necessary process is described as follows: 1. Extracting defect contours: Applying the dynamic thresholding Canny algorithm, edges in the image are extracted based on a preset edge detection threshold. These edges may correspond to defects on the surface of the part. 2. Identifying texture aberration regions: Analyzing the texture parameters of the image, such as texture direction and intensity, identifies texture aberration regions, which may contain defects. 3. Excluding normal textures: Using template matching technology, known normal texture templates are compared with textures in the image. If the matching degree exceeds a preset threshold, the region is considered a normal texture and is thus excluded. 4. Enhancing defect edges: The identified defect edges are enhanced, for example, by increasing edge contrast or using edge enhancement algorithms to make the defects more noticeable.
[0130] Step S3e0: Filter out normal features that conform to the specifications, retain two-dimensional features that exceed the preset defect judgment threshold, and form a standardized feature set.
[0131] Among them, normal features are those that conform to design specifications and processing requirements and are not considered defects. Filtering normal features involves using preset rules or models to identify and filter out normal features that conform to specifications. For example, by comparing with a CAD model, features that meet design requirements are identified and excluded. The defect judgment threshold is a quantitative standard used to distinguish between normal and defective features; features exceeding this threshold are considered defects. The standardized feature set is the set of features after filtering and standardization, used for subsequent defect analysis and classification.
[0132] The defect analysis feature set is formed by fusing the above features through an attention mechanism, including:
[0133] Step S3A0: Import 3D features, 2D features, and process parameter features, and establish a feature-defect type mapping based on the surface defect detection target.
[0134] Among them, process parameter features refer to parameter features related to the part machining process, such as machining speed, temperature, and pressure. Feature-defect type mapping establishes a correspondence between extracted features and possible defect types for subsequent defect detection and classification.
[0135] The necessary processes are described below: 1. Import 3D Features: Import 3D feature data, such as curvature, roughness, and depth, from the feature extraction module. For example, read the curvature data of a part surface from a database. 2. Import 2D Features: Import 2D feature data, such as edges, textures, and area, from the feature extraction module. For example, read the edge strength data of a part surface from a file. 3. Import Process Parameter Features: Import process parameter features, such as processing speed, temperature, and pressure, from the production control system. For example, read the processing temperature data from the production control system. 4. Establish Feature-Defect Type Mapping: Establish a mapping relationship between features and defect types based on the target of surface defect detection. For example, associate curvature anomalies with crack defects and roughness anomalies with wear defects using expert knowledge or machine learning models.
[0136] In step S3B0, based on the mapping relationship, the three-dimensional features are assigned basic weights to the surface defects, and the weights are increased proportionally when the ratio of near-surface defect depth to wall thickness exceeds a threshold; the two-dimensional features are assigned core basic weights, and the weights are adjusted by magnitude when the proportion of surface defect area exceeds a threshold.
[0137] Among them, the basic weight is the initial weight value assigned to the feature, used to represent the importance of the feature in defect detection. The near-surface defect depth to wall thickness ratio is the ratio of the defect depth to the wall thickness of the area it occupies, used to assess the severity of the defect. The surface defect area ratio is the ratio of the defect area to the total surface area of the part, used to assess the extent of the defect. Proportional increase: The weight is increased proportionally according to specific conditions. Adjustment by magnitude: The weight is adjusted by a certain magnitude according to specific conditions.
[0138] The necessary process is described below: 1. Determine the basic weights: Based on the mapping relationship between features and defect types, assign basic weights to 3D and 2D features respectively. For example, the basic weight for 3D features is 0.6, and the basic weight for 2D features is 0.8. 2. Adjust the 3D feature weights: Calculate the ratio of near-surface defect depth to wall thickness. If it exceeds a preset threshold, the weight is increased proportionally. For example, if the preset threshold is 0.1, and the actual ratio is 0.15, the weight is increased by 10%. 3. Adjust the 2D feature weights: Calculate the proportion of surface defect area. If it exceeds a preset threshold, the weight is adjusted by the magnitude. For example, if the preset threshold is 10%, and the actual proportion is 12%, the weight is increased by 5%.
[0139] In step S3C0, based on the premise that the 3D positioning error does not exceed the accuracy threshold and the 2D edge integrity is not lower than the set value, the weight of the substandard features is reduced to the upper limit.
[0140] Among them, 3D positioning error: the error in spatial positioning of 3D features, typically used to evaluate the accuracy and reliability of features. Accuracy threshold: the maximum allowable value for 3D positioning error; features exceeding this value are considered unreliable. 2D edge integrity: the integrity and continuity of edges in 2D features, used to evaluate feature quality. Set value: the minimum allowable value for 2D edge integrity; features below this value are considered incomplete. Weight upper limit: the maximum value of feature weights, used to limit the adjustment range of weights.
[0141] The necessary process is described as follows: 1. Calculate the 3D positioning error: Use the coordinate information of the 3D features to calculate their positioning error. For example, by comparing with the CAD model, calculate the deviation between the actual position and the designed position of the feature points. 2. Evaluate the 2D edge integrity: Use an edge detection algorithm to evaluate the integrity and continuity of the edges in the 2D features. For example, by calculating the number of edge breakpoints or edge continuity indices. 3. Adjust feature weights: Adjust the feature weights based on the 3D positioning error and the 2D edge integrity. If the 3D positioning error exceeds the accuracy threshold or the 2D edge integrity is lower than the set value, the feature weights are reduced to the upper limit.
[0142] Step S3D0 involves associating 3D and 2D features through physical-visual conversion coefficients. When the surface area scale distortion exceeds the deviation, a calibration factor is activated, and the binding weight is proportionally strengthened for areas where the defect correlation meets the standard.
[0143] Among them, the physical-visual conversion coefficient is used to correlate three-dimensional features (physical space) with two-dimensional features (visual space), ensuring their spatial consistency. Surface area scale distortion refers to changes in surface area size caused by errors during scanning or imaging, which may affect the accuracy of features. The calibration factor is used to correct scale distortion, ensuring the accuracy and consistency of features. Defect correlation is the degree of correlation between features and defects, used to assess the importance of features in defect detection. Binding weights are used to strengthen the correlation between features and defects, ensuring that key features play a more significant role in defect detection.
[0144] The necessary process is described as follows: 1. Calculate the physical-visual conversion coefficient: Use a feature matching algorithm to calculate the conversion coefficient between three-dimensional features and two-dimensional features to ensure the consistency between the two in space.
[0145] For example, feature points are extracted and transformation coefficients are calculated using the SIFT algorithm. 2. Scale distortion detection: Image analysis algorithms are used to detect scale distortion in surface areas, comparing the deviation between actual and design dimensions. For example, distortion is detected by calculating the deviation between the actual dimensions of feature areas and the design dimensions in the CAD model. 3. Enable calibration factors: When scale distortion exceeds a preset deviation, calibration factors are enabled for correction. For example, a scaling factor or polynomial calibration model is used to correct the distortion.
[0146] 4. Strengthen binding weights: For areas where the defect correlation meets the standard, strengthen the binding weights proportionally to ensure that key features play a more important role in defect detection. For example, use a preset scaling factor to increase the weights.
[0147] In step S3E0, when the fluctuation of parameters affecting surface quality in the molding process exceeds the threshold, the corresponding three-dimensional weight is increased; when the surface treatment environment parameters exceed the range, the corresponding two-dimensional weight is increased; and a temporal attention mechanism is established by combining the timestamp.
[0148] Among them, parameter fluctuation refers to the range of variation of process parameters during the processing, used to assess the stability of the processing. Environmental parameters refer to environmental conditions affecting the surface treatment of parts, such as humidity and temperature. Temporal attention mechanism is a time-series-based attention mechanism used to focus on important time points or periods in a time series. Weight enhancement and adjustment increases feature weights based on specific conditions to improve their importance in defect detection.
[0149] The necessary processes are described below: 1. Assess process parameter fluctuations: Calculate the fluctuation range of processing temperature and compare it with a preset threshold (e.g., ±5°C). If the fluctuation range exceeds the threshold, increase the three-dimensional weights proportionally (e.g., 10%). 2. Assess environmental parameter ranges: Check if the ambient humidity exceeds the preset range (e.g., 40%-60%). If it exceeds the range, increase the two-dimensional weights proportionally (e.g., 10%). 3. Establish a temporal attention mechanism: Use timestamps to associate process parameters and environmental parameters with feature data. Use an LSTM model to analyze time series data, focusing on key time points or time periods.
[0150] In step S3F0, if the confidence level of the two-dimensional feature meets the standard and there are no anomalies in the three-dimensional feature, backpropagation activates the associated process parameter features.
[0151] Among them, 2D feature confidence: the reliability of the 2D feature detection result, usually expressed as a confidence score. Anomaly: refers to a part of the 3D feature that does not meet normal processing or design requirements, possibly indicating a defect. Backpropagation: a mechanism used to activate or update feature weights, based on conditions being met to backpropagate signals to enhance relevant features. Associated process parameter features: process parameters related to the current detection feature, such as processing speed and temperature.
[0152] The necessary processes are described below: 1. Evaluate the confidence level of two-dimensional features: Calculate the confidence score using a two-dimensional feature detection algorithm to determine if it meets the standard. For example, calculate the confidence score for edge detection; if the score is higher than a preset threshold (e.g., 0.8), the confidence level is considered to meet the standard. 2. Detect three-dimensional feature anomalies: Detect anomalies using a three-dimensional feature analysis algorithm to determine if anomalies exist. For example, calculate the curvature; if the curvature exceeds a preset threshold (e.g., 0.1), an anomaly is considered to exist. 3. Activate associated process parameter features through backpropagation: If the confidence level of the two-dimensional features meets the standard and the three-dimensional features are anomalies, then activate the associated process parameter features through a backpropagation mechanism. For example, use the backpropagation algorithm of a neural network to enhance the weights of process parameter features related to the currently detected features.
[0153] Step S3G0 integrates the adjusted three-dimensional features, two-dimensional features, and process parameter features to form a defect analysis feature set.
[0154] The necessary processes are described below: 1. Obtain adjusted features: Obtain adjusted 3D features, 2D features, and process parameter features from the previous steps. For example, obtain the adjusted feature weights and values from steps S3E0 and S3F0. 2. Feature fusion: Combine different features according to their weights using a weighted average method. 3. Form a defect analysis feature set: Combine the fused feature values into a defect analysis feature set for subsequent defect analysis and classification. For example, store the fused feature values in the feature set for use by the subsequent model.
[0155] A method for detecting surface defects in parts and optimizing processes also includes steps following the first branch, which identifies defect types and quantifies parameters by fusing three-dimensional and two-dimensional features, and the second branch, which calculates the correlation between defect features and each process using association rule mining and random forest algorithms. The details are as follows:
[0156] Step SA00: Analyze whether a product requirement profile is configured.
[0157] The product requirement profile describes the quality requirements and defect tolerance of a product under different application scenarios, typically including key information such as defect type, defect size, and defect location. The defect tolerance dimension defines the allowed range or degree of defects in the product requirement profile, used to distinguish between acceptable and unacceptable defects. The defect judgment benchmark matrix is a reference data table generated based on the product requirement profile, used to determine whether defects exceed the allowable range, and includes quantitative parameter thresholds for different defect types.
[0158] The necessary procedures are described below: 1. Check product requirement profile configuration: Check whether a product requirement profile is configured in the product management system or quality control database. For example, confirm the existence of a product requirement profile by querying the database or checking the configuration file. If not configured, continue to the next step (step SB00). If configured, proceed to step SC00. 2. Obtain defect tolerance dimension: If a product requirement profile is configured, extract the defect tolerance dimension information from it. For example, read the defect type and corresponding tolerance range from the product requirement profile. For example, the defect type is "surface scratch", and the tolerance range is "length not exceeding 2mm, depth not exceeding 0.1mm".
[0159] Step SB00: If not configured, continue with the following steps.
[0160] Next steps: Without configuring a product requirement profile, perform defect detection and process optimization according to the default process or standard.
[0161] Step SC00: If configured, retrieve the defect judgment benchmark matrix for the corresponding scenario based on the defect tolerance dimension in the product requirement profile.
[0162] Among them, the defect tolerance dimension refers to the range or degree of allowed defects defined in the product requirement profile, used to distinguish between acceptable and unacceptable defects. The defect judgment benchmark matrix is a reference data table generated based on the product requirement profile, used to determine whether defects exceed the allowable range, and includes quantitative parameter thresholds for different defect types.
[0163] Extracting Defect Tolerance Dimensions: Extract defect tolerance dimension information from the product requirement profile. For example, read the defect type and corresponding tolerance range from the configuration file. For example, the extracted defect tolerance dimensions are as follows: Defect type: surface scratch; Length threshold: not exceeding 2mm; Depth threshold: not exceeding 0.1mm. 3. Retrieving the Defect Judgment Benchmark Matrix: Based on the extracted defect tolerance dimensions, retrieve the defect judgment benchmark matrix for the corresponding scenario.
[0164] Step SD00 compares the defect type and quantification parameters with the defect judgment benchmark matrix to screen out critical defects that exceed the threshold.
[0165] The necessary process is described as follows: 1. Obtain defect type and quantification parameters: Obtain the identified defect type and quantification parameters from the defect detection model. For example, the model outputs a defect type of "surface scratch," with quantification parameters of length 2.5mm and depth 0.12mm. 2. Obtain defect judgment benchmark matrix: Obtain the defect judgment benchmark matrix from the product requirement profile or database. For example, load the defect judgment benchmark matrix from the configuration file, where the length threshold for surface scratches is 2mm and the depth threshold is 0.1mm. 3. Compare defect quantification parameters with the benchmark matrix: Compare the defect's quantification parameters with the thresholds in the defect judgment benchmark matrix. For example, compare whether the length of the surface scratch (2.5mm) exceeds the length threshold of 2mm and whether the depth (0.12mm) exceeds the depth threshold of 0.1mm. 4. Screen critical defects: If the defect's quantification parameters exceed the thresholds in the benchmark matrix, the defect is marked as a critical defect. For example, a surface scratch with a length of 2.5mm exceeding the length threshold of 2mm is marked as a critical defect.
[0166] Step SE00: Extract the process correlation data associated with key defects, and trace the change trajectory of the corresponding process parameters through a time-series attention mechanism.
[0167] Among them, process correlation data describes the degree of correlation between critical defects and various processes, usually calculated through association rule mining or machine learning models. Temporal attention mechanism: a mechanism that focuses on key time points or time periods in a time series to identify and trace changes in key process parameters that cause defects. Process parameter change trajectory: sequence data recording the changes in process parameters over time, used to analyze the causes of defects.
[0168] The necessary processes are described below: 1. Extract process correlation data: Obtain correlation data between critical defects and each process from association rule mining or machine learning models. For example, extract the correlation between critical defects and each process from a random forest model to obtain the correlation value for each process. 2. Obtain process parameter change trajectories: Obtain historical data of process parameters from the production control system and record the trajectory of parameter changes over time. For example, obtain historical data of parameters such as processing temperature and pressure from a PLC system and record their changes over time. 3. Apply temporal attention mechanisms: Use temporal attention mechanisms to trace the trajectory of process parameter changes corresponding to critical defects. For example, use an LSTM model to analyze time series data and identify key time points or time periods. 4. Trace the change trajectory: Through temporal attention mechanisms, trace the trajectory of process parameter changes corresponding to critical defects to identify the key process parameter changes that cause the defects. For example, identify abnormal fluctuations in processing temperature within a certain time period.
[0169] Step SF00: Calculate the dynamic correlation coefficient between the trajectory and the defect parameters, and retain the process data with strong correlation that reaches a preset significant level.
[0170] Dynamic correlation coefficient: An indicator that measures the dynamic correlation between the trajectory of process parameter changes and defect parameters, used to assess the strength of the correlation between the two. Significance level: A set statistical significance threshold used to determine whether the correlation strength is sufficiently strong, usually expressed as a p-value or confidence interval. Strongly correlated process data: Process parameter data whose dynamic correlation coefficient reaches a significant level; these data have a strong correlation with the occurrence of defects.
[0171] The necessary procedures are described below: 1. Calculate the dynamic correlation coefficient: Use statistical analysis methods or machine learning models to calculate the dynamic correlation coefficient between the process parameter change trajectory and the defect parameter. For example, use the Pearson correlation coefficient to calculate the correlation coefficient. 2. Evaluate the significance level: Use statistical testing methods to evaluate the significance of the dynamic correlation coefficient. For example, calculate the p-value and compare it with a preset significance level (e.g., 0.05). 3. Filter strongly correlated process data: Retain process parameter data whose dynamic correlation coefficient reaches a significant level. For example, retain process parameter data with a p-value less than 0.05.
[0172] Step SG00: Integrate key defect information and data from strongly related processes to form integrated information.
[0173] The information includes: Key Defect Information: Screened and confirmed defect information that significantly impacts product quality, including defect type and quantifiable parameters. Strongly Correlated Process Data: Process parameter data that is significantly correlated with key defects, statistically significantly influencing defect occurrence. Integrated Information: Comprehensive information combining key defect information and strongly correlated process data, used for subsequent defect analysis and process optimization.
[0174] Necessary process description: 1. Obtain critical defect information: Obtain critical defect information from the previous steps, including defect type and quantification parameters. 2. Obtain data for strongly correlated processes: Obtain data for strongly correlated processes from the previous steps, including process parameters and their change trajectories.
[0175] For example, the acquired strongly correlated process data are: Process 1: Processing temperature [200°C, 205°C, 210°C, 208°C, 203°C]; Process 2: Processing pressure [100kPa, 105kPa, 110kPa, 108kPa, 103kPa]. 3. Information Integration: The key defect information and strongly correlated process data are merged to form integrated information.
[0176] Step SH00: When the 3D feature quantization parameters and 2D feature quantization parameters of the key defects in the integrated information both meet the preset defect threshold, and the correlation degree value of a certain process in the strongly correlated process data exceeds the preset correlation degree threshold, the process is determined to be the root cause process.
[0177] Among them, 3D feature quantization parameters are quantization parameters extracted from 3D features, such as depth and curvature. 2D feature quantization parameters are quantization parameters extracted from 2D features, such as length and area. Preset defect threshold: A threshold value set for the defect quantization parameters, used to determine whether a defect exceeds the allowable range. Correlation degree value: The strength of the correlation between a process and a defect, usually calculated through statistical analysis or a machine learning model. Preset correlation degree threshold: A threshold value set for the correlation degree, used to determine whether the correlation between a process and a defect is significant. Root cause process: The main process that causes the defect and needs to be optimized and adjusted.
[0178] The necessary procedures are described below: 1. Check if the defect quantification parameters meet the preset thresholds: Check if both the 3D and 2D feature quantification parameters exceed the preset defect thresholds. For example, the depth threshold is 0.1 mm, the length threshold is 2 mm, and the area threshold is 0.5 square millimeters. 2. Check if the process correlation value exceeds the preset threshold: Check if the correlation value of a process exceeds the preset correlation threshold. For example, the preset correlation threshold is 0.5. 3. Determine the root cause process: If the defect quantification parameters meet the thresholds and the correlation value of a certain process exceeds the threshold, then that process is determined to be the root cause process. For example, if the correlation of process 1 is 0.8, which exceeds 0.5, then process 1 is determined to be the root cause process.
[0179] Analyze the deviation between the key parameters of the root cause process and the defect quantification parameters, and adjust the parameters according to the degree of deviation through a dynamic adjustment mechanism, including:
[0180] Step S610: Determine whether the system is configured with a product requirement profile.
[0181] The necessary processes are described as follows: 1. Check product requirement profile configuration: Check whether a product requirement profile is configured in the product management system or quality control database. For example, confirm the existence of a product requirement profile by querying the database or checking the configuration file. If not configured, proceed to step S620. If configured, proceed to step S630. 2. Obtain configuration information: If a product requirement profile is configured, extract information such as cost sensitivity, delivery priority, and product type attributes. For example, read this information from the configuration file.
[0182] Step S620: If not configured, calculate the absolute deviation value between the key parameters of the root cause process and the defect quantification parameters based on the preset general deviation level classification standard, match the corresponding deviation level, and call the preset fixed adjustment coefficient correction parameter.
[0183] The general deviation level classification standard is a preset deviation range classification standard used to categorize deviation values into different levels. The absolute deviation value is the absolute difference between the key parameter and the defect quantification parameter. The fixed adjustment coefficient is a preset parameter adjustment ratio or value based on the deviation level, used to correct the parameter.
[0184] The necessary process is described as follows: 1. Calculate the absolute deviation value: Obtain the key parameters and defect quantification parameters of the root process from the previous steps. Calculate the absolute deviation value between the two. For example, if the key parameter for processing temperature is 200°C and the defect quantification parameter is 210°C, the absolute deviation value is 10°C. 2. Match the deviation level: According to the preset general deviation level classification standard, match the absolute deviation value to the corresponding deviation level. For example, the preset deviation level classification is: Low (0-5%): adjustment coefficient 0.1; Medium (5%-10%): adjustment coefficient 0.2; High (>10%): adjustment coefficient 0.3; Calculate the percentage deviation of processing temperature: 3. Activate fixed adjustment coefficient: Based on the matched deviation level, activate the preset fixed adjustment coefficient. For example, the adjustment coefficient for the medium deviation level is 0.2. 4. Correct parameters: Use the fixed adjustment coefficient to correct key parameters. For example, the corrected processing temperature is: 200 + 200 × 0.2 = 240°C.
[0185] Step S630: If configured, based on the cost sensitivity and delivery priority dimensions in the product demand profile, and combined with the product type attributes defined in the profile, construct a three-dimensional adjustment model of deviation-cost-timeliness. In the process of constructing this model, first determine the preset weight ratio of cost sensitivity and delivery priority according to the product type attributes, and then use a preset weighting algorithm to integrate the deviation value with these two quantitative indicators according to the weights to generate a decision index to guide the adjustment strategy. Among them, the product type attributes include safety-critical type, appearance-driven type, and trial production verification type.
[0186] Among these, cost sensitivity refers to how sensitive a product is to cost changes; high cost sensitivity implies stricter cost control. Delivery priority reflects the importance of product delivery time; high delivery priority means tighter delivery deadlines. Product type attributes categorize products based on their characteristics, such as safety-critical, appearance-driven, and trial production / verification. The deviation-cost-timeliness three-dimensional adjustment model is a model that comprehensively considers deviation values, cost sensitivity, and delivery priority to guide parameter adjustments.
[0187] The necessary process is described as follows: 1. Obtain product requirement profile: Obtain product requirement profile from the product management system or configuration file, including cost sensitivity, delivery priority, and product type attributes. 2. Determine preset weight ratios: Determine the preset weight ratios for cost sensitivity and delivery priority based on product type attributes. For example, for safety-critical products, the cost sensitivity weight is 0.4, and the delivery priority weight is 0.6. 3. Calculate deviation value: Calculate the deviation value between the key parameters of the root cause process and the defect quantification parameters. For example, if the key parameter for processing temperature is 200°C, and the defect quantification parameter is 210°C, the deviation value is 10°C. 4. Integrate deviation value with quantification index: Use a preset weighted algorithm to integrate the deviation value with cost sensitivity and delivery priority according to their weights to generate a decision index. For example, decision index = deviation value weight × deviation value + cost sensitivity weight × cost sensitivity + delivery priority weight × delivery priority. 5. Generate adjustment strategy: Generate an adjustment strategy based on the decision index to correct the parameters. For example, when the decision index is higher than a certain threshold, a more aggressive adjustment strategy is adopted.
[0188] Step S640: After adjusting the parameters according to the decision index, generate a parameter adjustment report and synchronize it to the process execution system.
[0189] The parameter adjustment report is a document that records the parameter adjustment process and results, including parameter values before and after adjustment, and the basis for adjustment. The process execution system is a system used to control and execute production processes, receiving parameter adjustment commands and performing corresponding adjustment operations.
[0190] The necessary process is described as follows: 1. Perform parameter correction: Based on the decision index, perform parameter correction operations. For example, if the decision index is 5.62, adjust the processing temperature from 200°C to 210°C according to preset rules. 2. Generate parameter adjustment report: Record the parameter values before and after adjustment, the basis for adjustment, adjustment time, and other information. For example, generate a report containing the following: Before adjustment: Processing temperature 200°C; After adjustment: Processing temperature 210°C; Basis for adjustment: Decision index 5.62; Adjustment time: 2024-08-05; 3. Synchronize to the process execution system: Send the parameter adjustment command to the process execution system to ensure that the adjustment operation is executed. For example, send the adjustment command to the PLC system via a network interface to update the processing temperature setting.
[0191] The adjustments to the execution parameters based on the decision index include:
[0192] Step S641: Adjust the decision index input parameter rule base and match the corresponding correction scheme.
[0193] The parameter tuning rule base is a pre-defined set of rules that stores parameter tuning schemes for different decision index ranges. These rules are generated based on historical data, expert knowledge, or machine learning models to quickly match suitable tuning strategies. The correction scheme is a detailed parameter tuning strategy tailored to a specific decision index range, including the specific name of the tuning parameter, target value, tuning step size, and other information.
[0194] The necessary process is described as follows: 1. Input the decision index: Input the calculated decision index into the parameter adjustment rule base. For example, the decision index is 5.62. 2. Match the correction scheme: Find the rule in the rule base that best matches the current decision index. The rule base may contain multiple rules, each defining the range of the decision index and the corresponding adjustment strategy. For example: Rule 1: Decision index < 3, slight adjustment, adjustment step size 1. Rule 2: 3 ≤ decision index < 6, moderate adjustment, adjustment step size 2. Rule 3: Decision index ≥ 6, severe adjustment, adjustment step size 3. 3. For the decision index 5.62, rule 2 is matched, and the corresponding adjustment strategy is moderate adjustment, with an adjustment step size of 2. 4. Generate adjustment instructions: Generate specific adjustment instructions based on the matched rules. For example: Parameter name: Processing temperature. Target value: 210°C (assuming the current temperature is 200°C). Adjustment step size: 2°C. 5. Send adjustment instructions: Send the adjustment instructions to the process execution system (such as a PLC system) to ensure that the adjustment operation is executed. 6. Record the adjustment process: Record the parameter values before and after adjustment, the basis for adjustment, adjustment time, and other information in the parameter adjustment report for subsequent traceability and analysis.
[0195] Step S642: For safety-critical products, when the deviation exceeds the preset safety threshold, the decision index triggers the maximum adjustment range and the preset expedited correction process, and sends an adjustment instruction according to the plan. The instruction includes the parameter name, target value and preset step size.
[0196] Safety-critical products refer to those with extremely high safety requirements, where even minor defects can lead to serious safety accidents. Examples include aerospace components, automotive safety system parts, and medical devices. Preset safety threshold: The maximum permissible deviation of parameters set to ensure product safety. When the actual deviation exceeds this threshold, the system will trigger an emergency response. Decision index: A quantitative indicator used to guide parameter adjustment, generated after comprehensively considering factors such as deviation value, cost sensitivity, and delivery priority. Maximum adjustment range: In safety-critical products, the maximum permissible adjustment range the system will take when the deviation exceeds the safety threshold to ensure rapid correction of the deviation.
[0197] Pre-set expedited correction process: When the deviation exceeds the safety threshold, the system initiates an emergency correction procedure, which typically includes rapid response and priority handling.
[0198] Generate and send adjustment instructions: Generate adjustment instructions based on the maximum adjustment range, including parameter name, target value, and preset step size. For example, the adjustment instruction is: Parameter name: Processing temperature; Target value: 200°C; Preset step size: 5°C; Send the adjustment instruction to the process execution system to ensure rapid execution.
[0199] Step S643: For appearance-driven products, calculate the decision index by combining the preset three-level visual impact weights and cost sensitivity, prioritize adjusting the parameter with the highest weight, and send adjustment instructions according to the plan. The instructions include the parameter name, target value and preset step size.
[0200] Among them, appearance-driven products refer to products whose appearance quality has a significant impact on their market competitiveness and user satisfaction, such as car shells, electronic product shells, and high-end consumer goods. Three preset visual impact weights are used: based on the severity of the visual impact of appearance defects, three different preset weight levels are established. For example, high weight (0.7), medium weight (0.3), and low weight (0.1).
[0201] The preset three-level visual impact weighting is set as follows: Expert Evaluation: Process engineers and quality control experts assess the degree of visual impact of different appearance defects based on experience and assign weights accordingly. For example, for car body shells, scratches may be assigned a high weight (0.7), color differences may be assigned a medium weight (0.3), and minor flaws may be assigned a low weight (0.1). User Feedback: User feedback data is used to analyze which appearance defects have the greatest impact on user satisfaction, and the weights are adjusted accordingly. Machine Learning Model: Image recognition and machine learning algorithms (such as convolutional neural networks CNN) are used to analyze the visual impact of appearance defects and automatically generate weight assignments.
[0202] 2. Cost sensitivity is obtained as follows: Cost analysis: Obtain product cost data through the cost accounting system and analyze the impact of adjusting different parameters on costs. Market research: Based on market research data, understand the product's price sensitivity and cost tolerance in the market. Corporate strategy: Combine the company's cost control strategy and profit targets to set cost sensitivity parameters.
[0203] 3. The decision index is calculated as follows: a weighted algorithm is used to calculate the decision index by combining the deviation value, visual impact weight, and cost sensitivity. For example: Decision Index = w1 × Deviation Value + w2 × Visual Impact Weight + w3 × Cost Sensitivity; where w1, w2, and w3 are preset weights that are adjusted according to the product type attributes.
[0204] Step S644: For the trial production verification product, with cost sensitivity as the main weight, calculate the decision index according to the preset deviation gradient, match the parameter combination and send the adjustment instruction, and record the defect change data simultaneously. The instruction includes the parameter name, target value and preset step size.
[0205] Among them, trial-produced verification products refer to products in the R&D or pilot production stage, mainly used to verify design, process, and performance. They are highly sensitive to cost control, but at the same time, it is necessary to ensure product quality and performance. Cost sensitivity: The degree to which a product is sensitive to cost changes; high cost sensitivity means stricter cost control. Preset deviation gradient: Different preset adjustment gradients based on the magnitude range of deviation values, used to guide the magnitude of parameter adjustments. Decision index: A quantitative indicator generated after comprehensively considering factors such as deviation values and cost sensitivity, used to guide parameter adjustments. Parameter combination: A set of parameter adjustment schemes matched according to the decision index and preset rules, including target values and step sizes for multiple parameters.
[0206] Step S645: Compare the device adjustment data with the expected trajectory in real time. If the deviation exceeds the preset range, trigger a secondary correction.
[0207] The equipment adjustment data includes: actual operating data after the equipment executes the adjustment command, such as processing temperature, pressure, and speed; expected trajectory: the ideal operating state or target trajectory of the equipment calculated based on the adjustment command and equipment characteristics; preset range: the allowable deviation range set to ensure equipment adjustment accuracy; when the deviation between the actual operating data and the expected trajectory exceeds this range, a secondary correction is triggered; and secondary correction: additional adjustment operations performed during equipment adjustment when a deviation exceeding the preset range is detected, to ensure that the equipment operating state meets expectations.
[0208] The necessary process is described as follows: 1. Real-time monitoring of equipment adjustment data: Use sensors and data acquisition systems to monitor equipment operating data in real time, such as processing temperature and pressure. For example, use thermocouple sensors to monitor processing temperature in real time. 2. Calculation of deviation: Compare the real-time monitored equipment adjustment data with the expected trajectory and calculate the deviation. For example, if the expected temperature trajectory is 200°C and the actual temperature is 203°C, the deviation is 3°C. 3. Determine if the deviation exceeds the preset range: If the deviation exceeds the preset range (e.g., ±2°C), trigger a secondary correction. For example, if the deviation is 3°C, it exceeds the preset range of ±2°C. 4. Triggering secondary correction: Recalculate the adjustment command based on the deviation value and equipment characteristics. For example, use a PID controller to adjust the temperature adjustment command. 5. Sending secondary adjustment command: Send the new adjustment command to the equipment control system to execute the secondary adjustment. For example, the new adjustment command is to reduce the temperature by 3°C. 6. Recording the correction process: Record detailed information about the secondary correction in the parameter adjustment report, including the parameter values before and after the correction, the basis for the correction, and the correction time.
[0209] Step S646: When the fluctuation amplitude of the parameter does not exceed the preset threshold within a continuous preset time period, the parameter is determined to be stable, and parameter correction is completed.
[0210] Preset duration: The set continuous monitoring time used to determine parameter stability. Examples include 30 seconds and 1 minute. Fluctuation range: The maximum range of parameter variation during the monitoring period, usually expressed as an absolute value or percentage. Preset threshold: The maximum allowable fluctuation range; the parameter is considered stable when the actual fluctuation range does not exceed this value. Parameter stability: The parameter's fluctuation range within the preset duration does not exceed the preset threshold, indicating that the adjustment has achieved the expected effect.
[0211] The necessary procedures are described below: 1. Start parameter monitoring: After the equipment executes the adjustment command, start the parameter monitoring program to collect data on key parameters in real time. For example, start monitoring the processing temperature. 2. Calculate fluctuation range: Calculate the maximum fluctuation range of the parameters in real time within a preset time period. For example, if the preset time period is 1 minute, record the temperature data within this 1 minute and calculate the maximum fluctuation range. 3. Determine stability: If the fluctuation range does not exceed the preset threshold, the parameter is considered stable. For example, if the preset threshold is ±1°C, and the monitored maximum fluctuation range is 0.5°C, the parameter is considered stable. 4. Complete parameter correction: If the parameter is stable, record the adjustment result and mark the adjustment as complete. For example, record the adjusted temperature as 200°C and the fluctuation range as 0.5°C, indicating adjustment is complete.
[0212] Based on the same inventive concept, embodiments of the present invention provide a part surface defect detection and process optimization system, including a memory and a processor, wherein the memory stores information that can run on the processor to implement the following: Figures 1 to 2 The procedure for any method.
[0213] The embodiments described in this specific implementation are preferred embodiments of this application and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.
Claims
1. A method for detecting surface defects in parts and optimizing processes, characterized in that, include: Obtain the surface height map and optical map of the part to be inspected, as well as the key parameters, process identifiers and environmental parameters of the corresponding production process; By calibrating the timestamps triggered by process nodes, multi-source data is aligned with the process switching time as the benchmark to ensure consistency. Denoise the height map and extract three-dimensional features, optimize the reflection of the optical map and extract two-dimensional features, calculate process parameter features, and fuse the above features through an attention mechanism to form a defect analysis feature set; The feature set is input into a dual-branch fusion deep learning model. The first branch identifies the defect type and quantification parameters by fusing three-dimensional and two-dimensional features. The second branch calculates the correlation between defect features and each process by using association rule mining and random forest algorithm. When both the three-dimensional and two-dimensional features meet the preset defect threshold and the correlation of a certain process exceeds the preset threshold, the process is determined to be the root cause process. Analyze the deviation between the key parameters of the root cause process and the defect quantification parameters, and correct the parameters through a dynamic adjustment mechanism according to the degree of deviation; Re-inspect the surface features of the parts to verify whether the defects have been eliminated. If not, repeat the adjustment until the standard is met. Denoising the height map and extracting 3D features includes: Import the CAD model and design parameters of the part, establish a height map and part coordinate mapping through positioning fixtures, divide the structural form into plane, curved surface, deep hole and micro protrusion sub-regions, and clarify the structural and material characteristics of each sub-region. Based on the structural and material characteristics of the sub-regions, select appropriate 3D scanning equipment and adopt corresponding scanning methods for different material characteristics to ensure the quality of height map data for each sub-region; For the height map obtained by scanning, denoising is performed in layers based on the structural characteristics of the sub-regions and the type of noise. Based on the denoised height map, the design features and abnormal regions are separated by feature matching and comparison with the CAD model, and the preset volatile features are enhanced. Extract the three-dimensional feature parameters of each sub-region; Based on the structural and material characteristics of the sub-regions, suitable 3D scanning equipment is selected, and corresponding scanning methods are adopted for different material characteristics to ensure the quality of the height map data for each sub-region, including: Based on the division of sub-regions, the scanning accuracy and anti-interference requirements are determined by combining their structural and material characteristics; Match the corresponding 3D scanning equipment according to the determined accuracy requirements; The scanning parameters are dynamically adjusted according to the material characteristics, and corresponding laser sources and parameters are used for sub-regions with high reflectivity, strong light absorption and conventional materials respectively; Structural disturbance risks are analyzed based on the structural characteristics of sub-regions, and pre-set auxiliary measures are activated according to the analyzed structural disturbance risks.
2. The method for detecting surface defects in parts and optimizing processes according to claim 1, characterized in that, Structural disturbance risk is analyzed based on the structural characteristics of sub-regions, and pre-defined auxiliary measures are activated according to the analyzed structural disturbance risk, including: Extract key structural parameters of the sub-region, including the aperture-to-depth ratio of deep holes, thin wall thickness, and spacing of micro-protrusions; The risk type is determined based on the key structural parameters and preset thresholds. When the diameter-to-depth ratio of deep holes and grooves reaches the preset occlusion threshold, it is determined that there is a risk of scanning occlusion. When the thickness and spacing of the adjacent areas of thin walls and micro protrusions reach the preset vibration threshold, it is determined that there is a risk of vibration sensitivity. To mitigate the risk of scanning occlusion, a preset side-mounted scanning lens is used, which, in conjunction with a rotating fixture, performs multi-angle scanning at preset steps. To address vibration-sensitive risks, a preset vibration compensation function is activated to suppress mechanical vibration during the scanning process with preset precision. After the scan is completed, the data coverage of the sub-region is checked. If the coverage meets the preset standard, the auxiliary measures are deemed effective. If the coverage does not meet the standard, the auxiliary measures parameters are readjusted and the scan is repeated.
3. The method for detecting surface defects in parts and optimizing processes according to claim 1, characterized in that, Optimizing reflections and extracting two-dimensional features from optical images includes: Import the CAD model and design parameters of the part, divide the structural areas according to the model, select appropriate light sources and equipment according to the characteristics and materials of the areas, preprocess the high reflectivity areas with a polarizing mirror with a preset polarization angle, and collect the original optical image; Based on the acquired optical images, specular reflections are eliminated in highly reflective areas, images with a preset number of polarization angles are fused to achieve a preset texture retention rate threshold, brightness in areas with uneven lighting is corrected to a preset brightness deviation range, and contrast in dark areas is increased to a preset contrast threshold. By combining the CAD model to locate areas where the shadow area ratio exceeds the preset shadow ratio threshold, extract the features under the shadow, and use multi-view image stitching to make the overlap reach the preset overlap threshold to eliminate feature breakage. The dynamic threshold Canny algorithm with a preset edge detection threshold is used to extract the defect contour. Combined with texture parameters, regions exceeding the preset texture anomaly threshold are identified. For regular structures, template matching with a preset matching degree threshold is used to exclude normal textures and enhance the defect edges. Filter out normal features that conform to the specifications, retain two-dimensional features that exceed the preset defect judgment threshold, and form a standardized feature set.
4. The method for detecting surface defects in parts and optimizing processes according to claim 3, characterized in that, The defect analysis feature set is formed by fusing the above features through an attention mechanism, including: Import 3D features, 2D features, and process parameter features, and establish a feature-defect type mapping based on the surface defect detection target; Based on the mapping relationship, three-dimensional features are assigned basic weights to surface defects, and the weights are increased proportionally when the ratio of near-surface defect depth to wall thickness exceeds a threshold; two-dimensional features are assigned core basic weights, and the weights are adjusted by magnitude when the proportion of surface defect area exceeds a threshold. Based on the premise that the 3D positioning error does not exceed the accuracy threshold and the 2D edge integrity is not lower than the set value, the weight of the substandard features is reduced to the upper limit. By linking 3D and 2D features through physical-visual conversion coefficients, a calibration factor is activated when the surface area scale distortion exceeds the deviation, and the binding weight is strengthened proportionally for areas with qualified defect correlation. By combining process parameters, when the fluctuation of parameters affecting surface quality in the molding process exceeds the threshold, the corresponding three-dimensional weight is increased; when the surface treatment environment parameters are out of range, the corresponding two-dimensional weight is increased; and a temporal attention mechanism is established by combining timestamps. If the confidence level of the two-dimensional feature meets the standard and there are no anomalies in the three-dimensional feature, backpropagation activates the associated process parameter features. By integrating adjusted three-dimensional features, two-dimensional features, and process parameter features, a defect analysis feature set is formed.
5. A method for detecting surface defects in parts and optimizing processes according to any one of claims 1 to 4, characterized in that, It also includes the steps following the first branch, which identifies defect types and quantifies parameters by fusing three-dimensional and two-dimensional features, and the second branch, which calculates the correlation between defect features and each process using association rule mining and random forest algorithms. The details are as follows: Analyze whether a product demand profile is configured; If not configured, continue with the following steps; If configured, the defect judgment benchmark matrix for the corresponding scenario will be retrieved based on the defect tolerance dimension in the product requirement profile. The defect type and quantification parameters are compared with the defect judgment benchmark matrix to screen out critical defects that exceed the threshold. Extract the process correlation data associated with key defects, and trace the change trajectory of corresponding process parameters through a time-series attention mechanism; Calculate the dynamic correlation coefficient between the trajectory and defect parameters, and retain the process data with strong correlation that reaches a preset significant level; Integrate key defect information and data from strongly related processes to form integrated information; When the 3D feature quantization parameters and 2D feature quantization parameters of the key defects in the integrated information both meet the preset defect threshold, and the correlation degree value of a certain process in the strongly correlated process data exceeds the preset correlation degree threshold, the process is determined to be the root cause process.
6. The method for detecting surface defects in parts and optimizing processes according to claim 5, characterized in that, Analyze the deviation between the key parameters of the root cause process and the defect quantification parameters, and adjust the parameters according to the degree of deviation through a dynamic adjustment mechanism, including: Determine if the system is configured with product requirement profiles; If not configured, the absolute deviation values between the key parameters of the root cause process and the defect quantification parameters are calculated based on the preset general deviation level classification standard. After matching the corresponding deviation level, the preset fixed adjustment coefficient correction parameter is called. If already configured, based on the cost sensitivity and delivery priority dimensions in the product demand profile, and combined with the product type attributes defined in the profile, a three-dimensional adjustment model of deviation-cost-timeliness is constructed. In the process of constructing this model, the preset weight ratio of cost sensitivity and delivery priority is first determined according to the product type attributes. Then, the deviation value and these two quantitative indicators are integrated according to their weights through a preset weighting algorithm to generate a decision index that guides the adjustment strategy. Among them, the product type attributes include safety-critical, appearance-driven, and trial production verification types. After adjusting the execution parameters based on the decision index, a parameter adjustment report is generated and synchronized to the process execution system.
7. The method for detecting surface defects in parts and optimizing processes according to claim 6, characterized in that, The adjustments to the execution parameters based on the decision index include: Adjust the rule base by inputting the decision index as an input parameter, and match the corresponding correction scheme; For safety-critical products, when the deviation exceeds the preset safety threshold, the decision index triggers the maximum adjustment range and the preset expedited correction process, and sends adjustment instructions according to the plan. The instructions include parameter names, target values and preset step sizes. For appearance-driven products, a decision index is calculated by combining the preset three-level visual impact weights and cost sensitivity. The parameter with the highest weight is adjusted first, and an adjustment instruction is sent according to the plan. The instruction includes the parameter name, target value and preset step size. For trial production and verification products, cost sensitivity is the main weight. The decision index is calculated according to the preset deviation gradient, the parameter combination is matched and the adjustment command is sent. Defect change data is recorded synchronously. The command includes parameter name, target value and preset step size. The system compares the device adjustment data with the expected trajectory in real time, and triggers a secondary correction when the deviation exceeds the preset range. When the fluctuation range of the parameter does not exceed the preset threshold within a preset duration, the parameter is determined to be stable, and parameter correction is completed.
8. A system for detecting surface defects in parts and optimizing processes, characterized in that, It includes a memory, a processor, and a program stored in the memory and executable on the processor, which, when loaded and executed by the processor, implements a method for detecting surface defects in a part and optimizing processes as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Real-time defect detection and in-situ repair method and device in additive manufacturing process
CN120307645A