Dynamic calibration type laser surface real-time detection method and system
Through the real-time detection method of dynamic calibration laser surface, combined with standard calibration plates and workpiece reference areas, calibration parameters are updated in real time, which solves the problems of reduced accuracy and low production efficiency in traditional detection methods, and achieves high-precision and efficient detection effects.
Patent Information
- Application Number
- CN202510705187.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-08-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional laser surface detection methods reduce the detection accuracy when facing dynamic interference such as ambient light changes, equipment vibration, temperature drift, etc., and cannot update calibration parameters in real time, resulting in blind spots and misjudgments of detection, affecting production efficiency.
The dynamic calibration laser surface real-time detection method is adopted, and the initial measurement coordinate system is constructed by combining standard calibration plates and workpiece reference areas by using camera calibration method, and the calibration parameters are updated in real time with the grayscale center of gravity method, parabolic fitting algorithm and beam adjustment method, and three-dimensional point cloud data are generated and defect classification is performed.
It realizes high-precision real-time detection in complex environments, can detect small defects, improves production efficiency and product quality, and ensures the accuracy of test results and the stability of production processes.
Smart Images

Figure CN120446138A_ABST
Abstract
Description
[0001] Technical Field The present invention relates to the field of optical measurement and industrial automation detection, and in particular to a dynamic calibration laser surface real-time detection method and system. Background Art
[0002] In modern manufacturing, such as the automotive, electronics, aerospace and other fields, as well as various industrial production processes, product surface quality is of vital importance. On the one hand, consumers have increasing requirements for the texture and touch of product appearance; on the other hand, industrial production also has higher standards for the adaptability of product surfaces to subsequent processes and equipment stability. This requires product surface quality inspection to accurately identify tiny defects, accurately measure related parameters, and be able to complete them in real time during high-speed production, and the inspection requirements are becoming increasingly stringent. Traditional laser surface inspection methods usually use static calibration methods (such as pre-set standard samples and offline calibration of sensor parameters), which have the following defects: 1. Dynamic interference such as ambient light changes, equipment vibration, and temperature drift leads to a decrease in long-term detection accuracy; 2. When the workpiece's speed fluctuates or its posture changes, the calibration parameters cannot be updated in real time, which can easily lead to detection blind spots or misjudgments. 3. Offline calibration requires interrupting the testing process, affecting production line efficiency; To this end, a dynamic calibration laser surface real-time detection method and system are proposed. Summary of the Invention
[0003] The object of the present invention is to provide a dynamic calibration type laser surface real-time detection method and system to solve one of the problems raised in the above background technology.
[0004] To solve the above technical problems, a technical solution adopted in this application is: a dynamic calibration laser surface real-time detection method, comprising the following steps: Step 1: Obtain the initial calibration parameters of the laser projection module and the high-speed imaging module using a standard calibration plate, and use the camera calibration method to construct the initial measurement coordinate system and establish a dynamic calibration model; Step 2: Based on the change of environmental parameters or the timing cycle, a calibration trigger mechanism is used to trigger the standard calibration plate or the workpiece reference area to enter the field of view, and at least three sets of calibration images are collected and pre-processed. Step 3: Based on the pre-processed calibration image, use the grayscale centroid method or parabola fitting algorithm to extract the center coordinates of the laser light bar, and use the bundle adjustment method to calculate the transformation matrix H between the current laser light plane and the camera coordinate system. t , update dynamic calibration parameters; Step 4: Use a high-speed camera to synchronously capture the laser stripe image on the workpiece surface, combined with the real-time calibration parameter Ht Complete 3D coordinate conversion and generate 3D point cloud data; Step 5: Filter the 3D point cloud data, extract the morphological features and compare them with the standard template to classify and locate the defects; Step 6: Mark and record the detected defects, generate a test report, and transmit the test report to the PLC or host computer on the production line in real time to trigger an alarm or rejection action.
[0005] As a further preferred embodiment of the present technical solution: in step 2, the environmental parameter change includes any one or more of a vibration amplitude greater than 0.5 g, a temperature change ΔT greater than 2° C., and a light intensity fluctuation greater than 10%; The timing period is a fixed time interval, which is adjusted between 10 minutes and 60 minutes according to actual production needs; The workpiece reference area is a preset defect-free golden area on the workpiece surface, with a surface roughness of ≤ Ra0.1 μm. The area boundary is located by using the SIFT feature matching algorithm, and a self-reference coordinate system is established in combination with RANSAC plane fitting; The preprocessing of the calibration image includes removing salt and pepper noise in the image by using an adaptive median filtering algorithm, and enhancing the contrast of the image by using a histogram equalization algorithm; The calibration trigger mechanism adopts dual calibration source fusion technology, supports dual calibration sources of standard calibration plate and workpiece self-reference area, and dynamically allocates weights through Bayesian estimation. The calculation formula is: H final =w1H plate +w2H ref , w1+w2=1; Among them, w1 is dynamically adjusted according to the mechanical positioning accuracy of the calibration plate, and w2 is dynamically adjusted according to the movement speed of the workpiece.
[0006] As a further preferred embodiment of the present technical solution: in step three, when the grayscale centroid method is used to extract the center coordinates of the laser light stripe, the weighted centroid of the grayscale value of each light stripe pixel is calculated to obtain sub-pixel accuracy, with an error of ≤±0.05 pixels; when the parabola fitting algorithm is used to extract the center coordinates of the laser light stripe, a parabola fitting is performed based on the grayscale distribution of the light stripe pixels to determine the position of the light stripe center, with a fitting error of ≤±0.03 pixels; and the bundle adjustment method uses the least squares method for optimization and solution.
[0007] As a further preferred embodiment of the present technical solution: in step 5, the filtering process for the three-dimensional point cloud data adopts a Kalman filter algorithm, and by establishing a state space model of the point cloud data, the noise interference of the point cloud data is predicted and corrected in real time; The topographic features include curvature, normal vector and height difference of the three-dimensional point cloud; The defect classification adopts a convolutional neural network model. The convolutional neural network model is trained with multiple defect samples, and the defect classification accuracy is ≥98%.
[0008] As a further preferred embodiment of the present technical solution: in step 4, the synchronous triggering mode of the high-speed camera is encoder pulse triggering, and the exposure time of the high-speed camera is dynamically adjusted according to the movement speed of the workpiece, and the maximum exposure time is ≤1μs.
[0009] As a further preferred embodiment of the present technical solution: in step six, the contents of the inspection report include the type, location, size, severity level of the defect, inspection time, and workpiece number, and the inspection report is stored and transmitted in CSV or XML format; when the inspection report is transmitted to the PLC or host computer on the production line in real time, an Ethernet communication protocol is adopted, and the transmission rate is ≥100Mbps.
[0010] As a further preferred embodiment of the present technical solution: in step 1, the standard calibration plate is a ceramic calibration plate, and the flatness error of the ceramic calibration plate is ≤±10 μm, and the surface roughness is ≤Ra0.05 μm.
[0011] To solve the above technical problems, another technical solution adopted by this application is: a dynamic calibration type laser surface real-time detection system, the system comprising: a calibration construction module, a calibration acquisition module, a coordinate calculation module, an acquisition conversion module, an analysis and positioning module and a report transmission module; The calibration construction module is configured to obtain initial calibration parameters of the laser projection module and the high-speed imaging module through a standard calibration plate, and to construct an initial measurement coordinate system using a camera calibration method to establish a dynamic calibration model; The calibration acquisition module is configured to use a calibration trigger mechanism to trigger a standard calibration plate or a workpiece reference area to enter the field of view according to changes in environmental parameters or a timing period, to acquire at least three sets of calibration images, and to pre-process the calibration images; The coordinate calculation module is configured to extract the center coordinates of the laser light strip using the grayscale centroid method or parabola fitting algorithm based on the preprocessed calibration image, and calculate the transformation matrix H between the current laser light plane and the camera coordinate system using the bundle adjustment method. t , update dynamic calibration parameters; The acquisition conversion module is configured to use a high-speed camera to synchronously acquire the laser stripe image on the workpiece surface, combined with the real-time calibration parameter H t Complete 3D coordinate conversion and generate 3D point cloud data; The analysis and positioning module is configured to filter the three-dimensional point cloud data, extract the morphological features and compare them with the standard template to classify and locate the defects; The report transmission module is configured to mark and record the detected defects, generate a test report, and transmit the test report to the PLC or host computer on the production line in real time to trigger an alarm or rejection action.
[0012] As a further preferred embodiment of the present technical solution: the calibration acquisition module adopts dual calibration source fusion technology, and dynamically allocates calibration weights of the standard calibration plate and the workpiece self-reference area through Bayesian estimation.
[0013] As a further preferred embodiment of the present technical solution: the laser projection module has a built-in self-constant temperature control unit, and the self-constant temperature control unit includes a Peltier temperature control module and a wavelength locker.
[0014] Advantages of the present invention: 1. The present invention uses a dynamic calibration mechanism to update calibration parameters in real time. Combined with a sub-pixel laser stripe center coordinate extraction method, it effectively improves detection accuracy and can detect tiny surface defects. 2. The present invention responds to changes in environmental parameters such as vibration, temperature, and light intensity in real time and automatically triggers the calibration process to ensure high-precision detection results in complex industrial environments; 3. The present invention shortens the calibration time by combining a standard calibration plate with a workpiece reference area. It can also quickly adapt to different types of workpieces by quickly migrating pre-trained model parameters and using federated learning, thereby improving production efficiency. 4. The present invention can trigger alarms or rejection actions in a timely manner through real-time detection and feedback of workpiece surface defects, thereby ensuring product quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0016] Figure 1 1 is a flow chart of a dynamic calibration laser surface real-time detection method according to the present invention; Figure 2 This is a schematic diagram of the functional modules of a dynamic calibration laser surface real-time detection system of the present invention. DETAILED DESCRIPTION
[0017] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0018] Example Figure 1 This is a flow chart of a dynamic calibration laser surface real-time detection method according to an embodiment of the present invention. It should be noted that if there are substantially the same results, the method of this application is not based on Figure 1 The process sequence shown is limited. Figure 1 A dynamic calibration laser surface real-time detection method is shown, comprising the following steps: Step 1: Obtain the initial calibration parameters of the laser projection module and the high-speed imaging module using a standard calibration plate, and use the camera calibration method to construct the initial measurement coordinate system and establish a dynamic calibration model; Specifically, first, a standard calibration plate made of ceramic material is selected, and its flatness error is ensured to be ≤±10μm and its surface roughness is ≤Ra0.05μm. The ceramic calibration plate is pre-designed with high-precision feature patterns, such as a checkerboard or circular array. The position accuracy of these feature points is at the micron level, which is used for subsequent calibration calculations. The standard calibration plate is then mounted on a precisely movable platform capable of high-precision displacement adjustment within three dimensions, with an accuracy of ±0.01mm. Simultaneously, the laser projection module and high-speed imaging module are installed on the inspection station, ensuring their relative positions are fixed and stable. This ensures that the laser beam emitted by the laser projection module completely covers the surface of the calibration plate, and that the high-speed imaging module's field of view clearly captures the laser stripes and characteristic patterns on the plate. Next, turn on the power of the laser projection module and the high-speed imaging module, start the control software of the relevant equipment, and in the software interface, set the emission power, frequency and other parameters of the laser projection module so that it can produce clear and stable laser stripes; for the high-speed imaging module, set the exposure time, frame rate, gain and other parameters of the camera to obtain high-quality images. For example, according to the on-site lighting conditions, the exposure time is initially set to 50μs and the frame rate is set to 100fps; at the same time, through the control software, operate the movable platform to move the calibration plate to different positions and angles within the field of view of the laser projection module and the high-speed imaging module, and collect at least 5 sets of calibration images in different postures. During the collection process, ensure the clarity and integrity of the laser stripes in the image. After each image is collected, perform a preliminary inspection of the image. If the image is blurred or blocked, re-collect it; Subsequently, the captured calibration image is imported into the calibration calculation software and calculated using the Zhang Zhengyou calibration method. This method establishes the relationship between the image pixel coordinates and the actual physical coordinates by identifying the feature points in the image. In the software, the image is first preprocessed, including grayscale conversion, filtering and other operations to enhance the recognition of feature points. Then, the image coordinates of the feature points on the calibration board are extracted using a corner detection algorithm (such as Harris corner detection). At the same time, the actual physical coordinates of the feature points are obtained based on the design drawings of the calibration board. Using these coordinate data, the mathematical model of the Zhang Zhengyou calibration method is used for calculation to obtain the initial calibration parameters of the laser projection module and the high-speed imaging module, including the camera's intrinsic parameters (such as focal length, principal point coordinates, distortion coefficient, etc.) and extrinsic parameters (such as rotation matrix and translation vector). Next, based on the calculated initial calibration parameters, the initial measurement coordinate system is constructed in the software. A three-dimensional rectangular coordinate system is established, with the optical axis of the laser projection module as the Z axis and the imaging plane of the camera as the XY plane. In this coordinate system, the characteristic points on the calibration plate are used as reference points to determine the relative positions of other measurement points. For example, the equation of the laser light plane in the measurement coordinate system is calculated using the initial calibration parameters, providing a reference for subsequent measurement and calibration. Finally, the initial calibration parameters and the constructed initial measurement coordinate system are saved in the system database as the initial state of the dynamic calibration model; the dynamic calibration model is a software module based on mathematical models and algorithms. It can update the calibration parameters in real time according to the subsequently acquired calibration images and changes in environmental parameters. In the calibration model, a parameter update algorithm is established. When changes in environmental parameters are detected or the timing period arrives, the initial calibration parameters are corrected and optimized by re-acquiring the calibration image and calculating, thereby realizing dynamic calibration.
[0019] Step 2: Based on the change of environmental parameters or the timing cycle, a calibration trigger mechanism is used to trigger the standard calibration plate or the workpiece reference area to enter the field of view, and at least three sets of calibration images are collected and pre-processed. Specifically, first, vibration sensors, temperature sensors and light sensors are installed near the detection area on the production line; the vibration sensor has an accuracy of ±0.01g and can monitor the vibration amplitude generated by the equipment in real time; the temperature sensor has an accuracy of ±0.1℃ and can accurately measure changes in ambient temperature; the light sensor can detect fluctuations in light intensity with an accuracy of ±1%. These sensors transmit the environmental parameters collected in real time to the calibration acquisition module; for example, when an abnormality occurs during the startup or operation of the production line equipment, the vibration sensor detects a sudden increase in the vibration amplitude; as the air-conditioning system in the production workshop runs, the temperature sensor captures temperature changes; according to actual production needs, the timing period is set to 30 minutes, which means that even if the environmental parameters have not changed significantly, the calibration process will be triggered every 30 minutes; the timing period can be easily adjusted in the system control software. If the production environment is relatively stable, the timing period can be appropriately extended; if there are many environmental interference factors, the timing period can be shortened to ensure the accuracy of the detection system; Then, the calibration acquisition module continuously receives and analyzes the sensor data; when any one or more of the following conditions occurs: the vibration amplitude exceeds 0.5g, the temperature changes by more than 2°C, or the light intensity fluctuates by more than 10%, or when the preset 30-minute timing period is reached, the calibration trigger mechanism is activated; for example, if the vibration sensor detects that the vibration amplitude reaches 0.6g, the system immediately triggers the calibration process; at the same time, dual calibration source fusion technology is adopted, namely the standard calibration plate and the workpiece reference area; when the system determines that calibration is required, the calibration source is dynamically selected according to the workpiece movement speed and the mechanical positioning accuracy of the calibration plate; if the cylinder is in production If the movement speed on the production line is slow (below the set threshold, such as a line speed less than 2m / min) and the mechanical positioning accuracy of the calibration plate is high (positioning error within ±0.05mm), a standard calibration plate is preferred. If the workpiece moves at a faster speed, to reduce the impact of calibration on production, the workpiece reference area (a pre-set defect-free golden area on the engine cylinder surface with a surface roughness of ≤Ra0.1μm) is selected for calibration. In actual operation, the motor drive device is controlled to adjust the position of the standard calibration plate or the inspection equipment so that the workpiece reference area enters the field of view of the laser projection module and high-speed imaging module. Before performing calibration image acquisition, adjust the parameters of the high-speed imaging module according to the selected calibration source. If a standard calibration plate is used, the camera exposure time can be appropriately reduced to increase the image acquisition speed due to its stable surface characteristics; if a workpiece reference area is used, considering that there are certain reflection differences on the workpiece surface, it is necessary to fine-tune the camera exposure time and gain to ensure that a clear laser stripe image is acquired; at the same time, after ensuring that the calibration source stably enters the field of view, the high-speed imaging module, triggered by the encoder pulse, acquires at least 3 sets of calibration images. During the acquisition process, a certain time interval (such as 0.5 seconds) is maintained between each set of images to avoid data redundancy caused by overly intensive image acquisition; and the acquired images are previewed in real time. If the image is found to be blurred, noisy, or the laser stripes are incomplete, adjust the acquisition parameters or re-acquire in a timely manner; Finally, the image is processed using an adaptive median filter algorithm, which adaptively adjusts the filter window size based on the distribution of pixel values in a local area of the image. Noise points (e.g., points whose grayscale values significantly deviate from those of surrounding pixels) are replaced with the median pixel value of their neighborhood, effectively removing salt-and-pepper noise while preserving image edges and detail. Furthermore, to more clearly display the laser streaks, a histogram equalization algorithm is used to enhance image contrast. By performing statistical analysis on the image's grayscale histogram, the grayscale values are redistributed, expanding the image's grayscale range. This improves the contrast between the laser streaks and the background, facilitating the subsequent precise extraction of the laser streak's center coordinates. The preprocessed image is then transferred to the coordinate calculation module for further processing.
[0020] Step 3: Based on the pre-processed calibration image, use the grayscale centroid method or parabola fitting algorithm to extract the center coordinates of the laser light bar, and use the bundle adjustment method to calculate the transformation matrix H between the current laser light plane and the camera coordinate system. t , update dynamic calibration parameters; Specifically, first, choose the grayscale centroid method or the parabola fitting algorithm based on the image characteristics and accuracy requirements. If the grayscale distribution of the laser light strip in the image is relatively uniform and the light strip width is relatively stable, choose the grayscale centroid method. If the light strip grayscale distribution has a certain gradient change, or the accuracy of the light strip center coordinate is extremely high, choose the parabola fitting algorithm. For example, for aluminum alloy parts with relatively smooth surfaces and uniform laser reflection, the grayscale centroid method is preferred. For cast iron parts with complex surface textures and fluctuating laser reflection, the parabola fitting algorithm is more suitable. Then, when calculating the transformation matrix H tPreviously, it was necessary to find corresponding feature points in the laser light plane and the camera coordinate system. By extracting the center coordinates of the laser light strip and combining them with the known geometric relationship between the laser projection module and the camera, the corresponding 3D feature points were determined on the laser light plane. At the same time, the corresponding 2D feature points were marked in the camera image. The feature points should be representative and unique, such as the endpoints and intersections of the light strips. Then, the bundle adjustment method is used to calculate the transformation matrix H between the current laser light plane and the camera coordinate system with the goal of minimizing the reprojection error. t ; The reprojection error refers to the pixel distance between the projection point of the three-dimensional feature point in the camera coordinate system and the actual feature point in the image. By continuously iteratively optimizing the transformation matrix H t , so that the reprojection error is minimized; in the calculation process, the least squares method is used for optimization and solution, and the rotation and translation parameters in the transformation matrix are continuously adjusted until the reprojection error converges to a minimum value, and the accurate transformation matrix H is obtained. t ; Finally, the calculated transformation matrix H t Stored in the system's dynamic calibration parameter database, overwriting the previous calibration parameters, the system will call the updated H when performing the three-dimensional coordinate conversion of the laser stripe image on the workpiece surface. t Parameters to ensure the accuracy of the test results; at the same time, record each calculation H t Relevant information at the time of calibration, such as calibration time, environmental parameters, and the algorithm used, is recorded to facilitate subsequent traceability and analysis of the calibration process. If abnormalities in detection accuracy are found during subsequent testing, the calibration parameters can be re-evaluated and adjusted based on this recorded information.
[0021] Step 4: Use a high-speed camera to synchronously capture the laser stripe image on the workpiece surface, combined with the real-time calibration parameter H t Complete 3D coordinate conversion and generate 3D point cloud data; Specifically, in order to achieve synchronous acquisition of laser stripe images on the workpiece surface by a high-speed camera, precise synchronization settings of the hardware are required. First, the laser projection module and the high-speed camera are connected to the same synchronization controller. The synchronization controller will send a synchronization trigger signal to ensure that the moment when the laser projection module emits laser stripes is precisely matched with the moment when the high-speed camera is exposed. For example, when the synchronization controller sends a trigger signal, the laser projection module instantly emits laser stripes with a specific pattern to illuminate the workpiece surface. At the same time, the high-speed camera immediately exposes and captures the laser stripe image reflected back from the workpiece surface. Adjust the acquisition parameters of the high-speed camera according to the characteristics of the workpiece and the inspection requirements. For high-precision inspection objects such as aerospace parts, higher resolution and frame rate are usually required. Set the camera resolution to a level that can clearly capture the details of the laser stripes, such as 4096×3072 pixels. The frame rate is determined by the movement speed of the workpiece. If the workpiece moves at a faster speed on the production line, the frame rate needs to be increased to 1000 frames per second or even higher to ensure that the laser stripe image of each workpiece surface can be fully acquired. At the same time, it is also necessary to adjust the camera's exposure time, gain and other parameters to obtain an image with appropriate contrast and uniform brightness. For example, for metal parts with strong reflective surfaces, appropriately reduce the exposure time and gain to avoid overexposure of the image. For parts with darker surfaces and weaker reflective surfaces, increase the exposure time and gain to ensure that the laser stripes can be clearly displayed. During the acquisition process, the quality of the captured image is monitored in real time. Using image analysis algorithms, the image is checked for issues such as blur, excessive noise, or incomplete laser stripes. If the image quality does not meet the requirements, the camera acquisition parameters are adjusted promptly or the hardware equipment is checked for proper function. For example, if the image is blurry, the camera's focus is not adjusted properly and needs to be readjusted. If there is a lot of noise in the image, it is due to ambient light interference or noise from the camera itself, and appropriate measures need to be taken to reduce the noise, such as adding a lens hood or adjusting the camera's filter parameters. After image acquisition is completed, the latest real-time calibration parameter H is read from the system's calibration parameter database. t This parameter is calculated by the bundle adjustment method in step 3. It accurately describes the transformation relationship between the current laser light plane and the camera coordinate system, ensuring that the read H t It is the latest calibration result to ensure the accuracy of three-dimensional coordinate conversion; The collected laser stripe image of the workpiece surface is processed to extract the feature points on the laser stripes. The grayscale centroid method or parabola fitting algorithm mentioned in step 3 can be used to extract the center coordinates of the laser stripes as feature points. The two-dimensional coordinates of these feature points in the image coordinate system are is known; According to the two-dimensional coordinates of the extracted feature points and real-time calibration parameter H t , use the coordinate transformation formula to complete the three-dimensional coordinate transformation; assuming that the three-dimensional point coordinates on the laser light plane are , the coordinates of the two-dimensional point on the camera image plane are , then the coordinate transformation formula can be expressed as: ; By solving the above formula, the three-dimensional coordinates of the feature point in the laser light plane coordinate system can be obtained: In actual calculations, it is necessary to consider the accuracy and efficiency of matrix operations and adopt appropriate numerical calculation methods to solve them, such as Gaussian elimination method, singular value decomposition method, etc. After completing the three-dimensional coordinate conversion, the conversion result can be verified by comparing it with a known standard workpiece to check whether the converted three-dimensional coordinates are consistent with the actual situation; if a large error is found in the conversion result, the calibration parameter H needs to be rechecked. t The accuracy of the image or whether there are problems in the process of image acquisition and feature point extraction; the verified 3D coordinate data is stored in the database for subsequent data analysis and processing, such as surface defect detection, size measurement, etc.
[0022] Step 5: Filter the 3D point cloud data, extract the morphological features and compare them with the standard template to classify and locate the defects; Specifically, we first analyze the sources of noise. For example, in the 3D point cloud data of a mobile phone's metal casing, noise primarily comes from laser measurement errors, tiny vibrations in the production environment, and reflective interference from the metal casing. This noise can cause abnormal fluctuations in the point cloud data, affecting the subsequent accurate analysis of the surface topography. The 3D point cloud data is then processed using a Kalman filter algorithm. This algorithm establishes a state-space model of the point cloud data, predicts its next state, and modifies the prediction based on actual measurements, effectively removing noise interference. In practical applications, parameters such as the state transfer matrix, observation matrix, and noise covariance matrix are determined based on the characteristics of the point cloud data of the mobile phone's metal casing. The collected 3D point cloud data is then sequentially fed into the Kalman filter model, which filters the coordinate values of each point. For example, for a particular point's coordinates, the model combines the previous predicted value with the current measured value to obtain a more accurate coordinate value through a series of calculations, removing deviations caused by noise. After filtering, the point cloud data becomes smoother and more accurately reflects the surface topography of the phone's metal casing. Extract morphological features, which include the curvature, normal vector, and height difference of the 3D point cloud. Curvature is an important feature that describes the degree of curvature of an object's surface. For filtered 3D point cloud data, the curvature of each point is calculated to analyze the curvature of the mobile phone's metal casing surface. The normal vector is used to represent the direction of the object's surface at a certain point. By calculating the normal vector of each point in the point cloud data, the directional changes of the mobile phone's metal casing surface can be understood. The height difference can intuitively reflect the undulations of the mobile phone's metal casing surface. In the point cloud data, a reference plane is selected, and then the height difference of each point relative to the reference plane is calculated. By analyzing the data distribution of the height difference, surface defects such as protrusions and depressions can be discovered. The extracted topographic features of the mobile phone metal shell are compared with the standard template. For curvature features, the actual curvature value is compared with the curvature range in the standard template to determine whether it exceeds the allowable tolerance range. For normal vectors, the direction and magnitude of the normal vector are compared to ensure they are consistent with those in the standard template. For height difference, the actual height difference is checked to ensure it is within the error range of the standard value. For example, if the actual curvature value of a certain area exceeds the range of the standard template, it means that the area has surface deformation defects. The standard template contains the 3D point cloud data of the mobile phone metal shell under ideal conditions and the corresponding topographic feature parameters, such as curvature range, normal vector distribution, and standard height difference value. These parameters are determined according to product design specifications and quality standards. Based on the comparison results, the defects on the surface of the mobile phone's metal shell are classified; if the curvature of a certain area is abnormal, it indicates a surface deformation defect; inconsistent normal vectors indicate abnormal surface texture or structure; if the height difference exceeds the range, there are problems such as protrusions, depressions or insufficient processing accuracy; by analyzing different features, the type of defect can be accurately determined; at the same time, the coordinate information of the point cloud data is used to determine the specific location of the defect on the surface of the mobile phone's metal shell; for example, through analysis, it is found that the height difference of a certain point exceeds the standard value. Combined with the coordinates of the point in the point cloud data, the position of this defect can be located on the actual surface of the mobile phone's metal shell, providing accurate information for subsequent repairs or quality assessments.
[0023] Step 6: Mark and record the detected defects, generate a test report, and transmit the test report to the PLC or host computer on the production line in real time to trigger an alarm or rejection action; Specifically, consider an automotive parts production line, where engine cylinder surface defect detection is in progress. Once the analysis and positioning module detects a defect on the cylinder surface, the system accurately marks the location of the defect on a virtual model or actual image of the cylinder based on the coordinate information from the 3D point cloud data. For example, on the monitoring screen on the production line, areas with defects such as pinholes and cracks are circled with red circles or other eye-catching markers, along with defect numbers for easy traceability. In addition to marking the location, the system also records detailed information about each defect, including defect type (e.g., pinholes, cracks, pores), size (length, width, depth, etc., calculated using 3D coordinates), and severity level (classified as mild, moderate, or severe based on defect size and impact on product performance). The system also records the time the defect was discovered and the corresponding workpiece number to ensure a complete record of each defect. Then, all recorded defect information is integrated to generate an inspection report. The report is presented in a structured format, usually including a header (containing basic information such as inspection time, production line name, inspection equipment number, etc.) and a defect summary table (listing each defect's number, type, location, size, severity level, etc.). For some complex defects, a detailed text description and analysis will also be attached to help technicians better understand the defect situation. Then, using the Ethernet communication protocol, the generated test report is transmitted in real time to the PLC (Programmable Logic Controller) or host computer (such as the workshop management computer) on the production line. During the transmission process, a reliable transmission protocol (such as TCP / IP) is used to ensure the integrity and accuracy of the data and avoid data loss or errors. When the PLC or host computer receives the inspection report, it will make a judgment based on the defect information in the report; if a serious defect is detected (such as a deep crack that affects the structural strength and sealing of the engine cylinder), the system will immediately trigger the alarm device and remind the operator to deal with it in time through sound and light alarms; at the same time, the PLC will send a control instruction to the production line's actuator to remove the engine cylinder with serious defects from the production line to prevent it from entering the subsequent processing links, thereby ensuring product quality and smooth production process.
[0024] In this embodiment, specifically: in step 2, the environmental parameter change includes any one or more of a vibration amplitude greater than 0.5g, a temperature change ΔT greater than 2°C, and a light intensity fluctuation greater than 10%; Specifically, high-precision sensors are installed around the detection equipment. Among them, the vibration sensor is selected with a measurement accuracy of up to ±0.01g, the temperature sensor accuracy is ±0.1℃, and the light sensor accuracy is controlled within ±1%; these sensors are connected to the calibration and acquisition module to continuously collect environmental data; once the vibration amplitude exceeds 0.5g, for example, the equipment suddenly vibrates abnormally; or the temperature changes by more than 2℃, such as when the workshop air conditioning malfunctions and causes temperature fluctuations; or when the light intensity fluctuates by more than 10%, such as when the lighting equipment fails or the external light changes, the sensor will quickly transmit the signal to the calibration and acquisition module.
[0025] The timing cycle is a fixed time interval, which can be adjusted between 10 minutes and 60 minutes according to actual production needs; Specifically, based on the process stability and equipment characteristics of electronic chip production, the timing period is set to 20 minutes. This is because the chip manufacturing environment is relatively stable, but regular calibration is required to ensure detection accuracy. If it is found during the production process that the equipment is greatly affected by external factors or the detection accuracy fluctuates, the timing period can be conveniently adjusted within the range of 10-60 minutes through the system software interface. For example, when the workshop performs equipment maintenance or process adjustments, the timing period can be appropriately shortened to 15 minutes, and the calibration frequency can be increased to ensure detection accuracy.
[0026] The workpiece reference area is a preset defect-free golden area on the workpiece surface with a surface roughness of ≤ Ra0.1μm. The area boundary is located using the SIFT feature matching algorithm, and a self-reference coordinate system is established in combination with RANSAC plane fitting. Specifically, during the electronic chip design stage, a defect-free golden area is preset on the chip surface. This area has been specially treated and the surface roughness is strictly controlled to ≤Ra0.1μm. During actual inspection, the SIFT (Scale-Invariant Feature Transform) feature matching algorithm is used to locate the area boundary. First, a multi-scale space is constructed for the image containing the workpiece reference area, and feature points are detected at each scale and their feature vectors are described. Then, the feature vector of the current image is matched with the pre-stored standard feature vector of the workpiece reference area to find the best matching point set, thereby determining the area boundary. Combined with the RANSAC (Random Sample Consensus) plane fitting algorithm, a plane fitting is performed based on the area boundary points found by the SIFT algorithm. A certain number of points are randomly selected, assuming that these points conform to the plane model, the plane equation is calculated, and then the equation is used to verify other points. The number of points that conform to the model is counted. After multiple iterations, the plane model with the most conforming points is selected as the plane of the workpiece reference area, thereby establishing a self-reference coordinate system. This coordinate system provides an accurate benchmark for subsequent calibration and measurement.
[0027] The preprocessing of the calibration image includes using the adaptive median filtering algorithm to remove the salt and pepper noise in the image and using the histogram equalization algorithm to enhance the contrast of the image; Specifically, the collected calibration images will inevitably contain salt and pepper noise, which will affect subsequent analysis. An adaptive median filtering algorithm is used, with each pixel as the center, to adaptively adjust the filter window size according to the grayscale value distribution of its neighboring pixels. If there is a noise point in the window (the grayscale value is too different from the surrounding pixels), the pixel value is replaced by the neighborhood median, effectively removing the salt and pepper noise while retaining the image's detailed information, such as the edge of the laser stripe. At the same time, in order to present the laser stripes more clearly, a histogram equalization algorithm is used. This algorithm redistributes the grayscale values of the image by statistically analyzing the grayscale histogram of the image, so that the grayscale range covers the entire grayscale range more evenly, thereby enhancing the contrast between the laser stripe and the background, facilitating the subsequent precise extraction of the center coordinates of the laser stripe.
[0028] The calibration trigger mechanism adopts dual calibration source fusion technology, supports dual calibration sources of standard calibration plate and workpiece self-reference area, and dynamically allocates weights through Bayesian estimation. The calculation formula is: H final =w1H plate +w2H ref , w1+w2=1; Among them, w1 is dynamically adjusted according to the mechanical positioning accuracy of the calibration plate, and w2 is dynamically adjusted according to the movement speed of the workpiece; Specifically, it is assumed that a dynamic calibration laser surface real-time detection method is used to detect the surface quality of an automobile engine cylinder block on a production line.
[0029] A ceramic calibration plate with a flatness error of ≤±10μm and a surface roughness of ≤Ra0.05μm is selected and mounted on a high-precision movable bracket with a positioning accuracy of up to ±0.05mm. At the same time, the laser projection module, high-speed imaging module, and related environmental monitoring sensors (vibration sensor, temperature sensor, light sensor) are installed at the inspection station on the production line to ensure the relative position stability of each device. In the system software, set the environmental parameter trigger thresholds, namely vibration amplitude > 0.5g, temperature change ΔT > 2°C, and light intensity fluctuation > 10%. The timing period is set to 30 minutes, which can be adjusted within 10-60 minutes based on actual production conditions. In addition, the initial values of the Bayesian estimation weights are pre-set, assuming that in the initial state, w1 = 0.6 and w2 = 0.4. During the production process, environmental monitoring sensors continuously collect environmental data, and the system records the movement speed of the workpiece. When the vibration sensor detects a vibration amplitude of 0.6g or a timing period of 30 minutes, the system determines that calibration is required and triggers the calibration process. Before each calibration, the actual position of the calibration plate is measured using a detection device to obtain the mechanical positioning error of the calibration plate. For example, if the positioning error of the calibration plate is ±0.04mm, based on the pre-set relationship between positioning accuracy and weight (the higher the positioning accuracy, the larger w1), it is calculated that w1 should be adjusted to 0.7. The speed sensor on the production line monitors the engine cylinder's speed in real time. Assume the cylinder's current speed is 3 m / min, while the system's preset speed threshold is 2 m / min. Since the cylinder's speed exceeds the threshold, to minimize the impact of calibration on production progress, the pre-set speed-weight relationship (faster speed, larger w2) determines that w2 should be adjusted to 0.3, thereby relying more heavily on the workpiece's self-reference area for calibration. Based on the adjusted weights, the system controls the calibration plate or workpiece to enter the field of view from the reference area. If w1 is larger, the calibration plate is moved to the inspection position first. If w2 is larger, the workpiece self-reference area (a preset defect-free golden area on the engine block surface with a surface roughness of ≤ Ra0.1μm) is directly used. The high-speed imaging module, triggered by encoder pulses, captures at least three sets of calibration images. After preprocessing the collected calibration image (using adaptive median filtering algorithm to remove salt and pepper noise and histogram equalization algorithm to enhance image contrast), the center coordinates of the laser light stripe are extracted based on the preprocessed image using the grayscale centroid method or parabola fitting algorithm, and the transformation matrix H corresponding to the calibration plate is calculated using the bundle adjustment method. plate The transformation matrix H corresponding to the workpiece self-reference area ref ; According to the Bayesian estimation formula: H final =w1H plate +w2H ref ; Calculate the final transformation matrix H final ; For example, the calculated H plate and H ref , substitute w1=0.7, w2=0.3 into the formula to get H final and use it as an updated dynamic calibration parameter in the subsequent detection process; Throughout the production process, the system continuously repeats the above calibration triggering, weight adjustment and calibration process, and dynamically allocates the weights of the dual calibration sources according to the actual mechanical positioning accuracy of the calibration plate and the movement speed of the workpiece, ensuring that the detection system can maintain high-precision detection performance under different working conditions.
[0030] In this embodiment, specifically: in step 3, when extracting the center coordinates of the laser light stripe using the grayscale centroid method, the weighted centroid of the grayscale value of each light stripe pixel is calculated to obtain sub-pixel accuracy, with an error of ≤±0.05 pixels; Specifically, the pre-processed calibration image is first grayscaled to convert the color image into a grayscale image for subsequent calculations. A weighted average method is used to convert the RGB value of each pixel in the image into a grayscale value according to the formula Gray = 0.299R + 0.587G + 0.114B, based on the human eye's sensitivity to different colors. Next, image threshold segmentation technology is used, combined with the grayscale characteristics of the laser light stripe, to set an appropriate threshold to separate the laser light stripe from the background, resulting in a binary image of the light stripe. Morphological operations (such as erosion and dilation) are used to remove noise points and small discrete areas in the binary image, accurately determining the boundaries and range of the light stripe. For each pixel within the determined light strip area , get its grayscale value The core of the grayscale centroid method is to calculate the weighted centroid of the grayscale values of the light strip pixels. The calculation formula is: ; ; In actual calculation, the coordinates of the center of the light bar are obtained by traversing all pixels in the light bar area and performing the above summation operation. ; Because the calculation process takes into account the grayscale value weight of each pixel, it can effectively improve the accuracy of the center coordinates and achieve sub-pixel accuracy. After actual testing and verification, its error can be controlled within the range of ≤±0.05 pixels, which is crucial for high-precision surface inspection of mechanical parts and can provide a reliable data basis for subsequent precise measurement and analysis.
[0031] When the parabola fitting algorithm extracts the center coordinates of the laser light stripe, a parabola fitting is performed based on the grayscale distribution of the light stripe pixels to determine the position of the light stripe center, with a fitting error of ≤±0.03 pixels; Specifically, when using the parabola fitting algorithm, it is necessary to sample the grayscale distribution of the light strip pixels; along the direction of the laser light strip, sampling points are selected at a certain interval. The sampling interval is usually determined according to the width and accuracy requirements of the light strip, generally between 2-5 pixels; for each sampling point, its coordinates are recorded. and grayscale values ; The sampling points should be evenly distributed on the light strip to accurately reflect the grayscale distribution characteristics of the light strip; Based on the sampled point set, it is assumed that the grayscale distribution of the light bar pixels can be expressed by the quadratic parabola equation To fit; use the least squares method to solve the coefficients in the parabola equation ; The goal of the least squares method is to make the actual gray value of the sampling point and parabola fitting values The sum of squared errors is the smallest, that is: ; By solving the above optimization problem, we can get the coefficients of the parabola ; Then, take the derivative of the parabola equation and set the derivative to 0, that is: ; Solved: ; This value is the center of the light bar. Coordinates in direction; The directional coordinates can be determined based on the geometric characteristics of the light strip or other auxiliary methods (such as the vertical position distribution pattern of the light strip in the image). Practice has verified that the fitting error of the parabola fitting algorithm in determining the center position of the light strip is ≤±0.03 pixels, which can meet the strict requirements of high-precision detection for the center positioning of the light strip.
[0032] The bundle adjustment method uses the least square method for optimization and solution; Specifically, the goal of the bundle adjustment method is to calculate the transformation matrix H between the current laser light plane and the camera coordinate system t , achieved by minimizing the reprojection error; a 3D point on the known laser light plane and its corresponding 2D point on the camera image plane In the case of , a reprojection error model is established; the three-dimensional point is transformed by the matrix H t The projection point onto the image plane is , reprojection error Projection point With the actual image point The pixel distance between them is: ; The transformation matrix H is transformed using the least squares method. t To optimize, substitute all known 3D points and corresponding 2D points into the reprojection error formula, construct the error function, and continuously adjust the transformation matrix H through iteration. t The parameters in (including the rotation matrix R and the translation vector T) are used to minimize the value of the error function. In each iteration, according to the gradient information of the error function to the transformation matrix parameters, a suitable optimization algorithm (such as the Gauss-Newton method or the Levenberg-Marquardt method) is used to update the parameter values until the error function converges to a minimum value. At this time, the obtained transformation matrix H tThat is the optimized result, which can accurately describe the transformation relationship between the laser light plane and the camera coordinate system, and provide precise calibration parameters for subsequent three-dimensional coordinate transformation; in practical applications, this optimized bundle adjustment method can effectively improve the accuracy and stability of calibration, ensuring that the detection system can operate reliably under different working conditions.
[0033] In this embodiment, specifically: in step 5, the three-dimensional point cloud data is filtered using a Kalman filter algorithm, and the noise interference of the point cloud data is predicted and corrected in real time by establishing a state space model of the point cloud data; The Kalman filter is a recursive optimal estimation algorithm that uses the system's dynamic information and measurement data to optimally estimate the system's state. When processing 3D point cloud data, noise can interfere with data accuracy, affecting subsequent analysis and processing. By establishing a state-space model of point cloud data, the Kalman filter can predict and correct point cloud data in real time based on historical information and current measurements, effectively reducing noise interference. The specific operations are as follows: First, the position, velocity, and other information of each point in the 3D point cloud data are treated as the state variables of the system. The state transition equation is used to describe the change of these state variables over time, while the observation equation shows how to obtain the actual measured point cloud data from the state variables. Then, the point cloud state at the current moment is predicted according to the state transition equation, and the Kalman gain is calculated by combining the current measured value and the predicted value; the predicted value is corrected by the Kalman gain to obtain the optimal estimate value at the current moment, thereby reducing the impact of noise.
[0034] The topographic features include the curvature, normal vector and height difference of the 3D point cloud; Curvature reflects the degree of curvature of an object's surface. By calculating the curvature of each point in 3D point cloud data, we can understand the local shape characteristics of the surface. For example, the curvature of a flat area is close to zero, while the curvature of a convex or concave area is larger. Calculating curvature helps detect surface defects such as slight deformations, convexities, or concave areas. A normal vector is a vector perpendicular to an object's surface, describing the orientation of the surface at a specific point. In 3D point cloud data, each point has a corresponding normal vector. By analyzing the direction and changes of the normal vector, we can identify surface boundaries, corners, and connections between different planes. Abnormal changes in the normal vector suggest damage or defects on the surface. Height difference refers to the difference in height of each point in 3D point cloud data relative to a reference plane. By calculating height difference, we can intuitively understand the surface undulations. For example, when inspecting a planar object, if the height difference of certain points exceeds the normal range, it indicates that the area has defects such as protrusions or depressions.
[0035] Defect classification uses a convolutional neural network model. After being trained on multiple defect samples, the convolutional neural network model has a defect classification accuracy of ≥98%; Among them, the convolutional neural network (CNN) is a deep learning model specifically designed for processing grid-structured data (such as images). It can automatically extract features from input data and perform tasks such as classification or regression. In the defect classification of 3D point cloud data, CNN can learn the characteristic patterns of different defect types and accurately classify unknown point cloud data. The specific operation is as follows: First, a large number of 3D point cloud data samples containing different defect types are collected and each sample is labeled to indicate the defect type it belongs to. These samples are then fed into a CNN model for training, and the model automatically learns the feature representations of different defect types. Then, after training on multiple defect samples, the CNN model is able to classify defects in new 3D point cloud data. Because the model has learned from a large amount of sample data, it can achieve a high classification accuracy (≥98%). This means that in practical applications, the model can reliably identify different types of defects and provide accurate information for subsequent quality control and repair.
[0036] In this embodiment, specifically: in step 4, the synchronous triggering mode of the high-speed camera is encoder pulse triggering, and the exposure time of the high-speed camera is dynamically adjusted according to the movement speed of the workpiece, and the maximum exposure time is ≤1μs; Specifically, encoder pulse triggering is a method for accurately synchronizing high-speed camera image acquisition. The encoder is generally installed on the axis that drives the workpiece, such as the conveyor drive shaft that moves the workpiece on the production line, or the rotating shaft that rotates the workpiece. When the workpiece moves, the encoder will generate pulse signals as the shaft rotates. The number and frequency of pulses are related to the rotation angle and speed of the shaft. The high-speed camera and encoder are connected via a synchronization controller, which receives the pulse signal from the encoder. When a preset pulse condition is met (for example, a certain number of pulses are generated), the synchronization controller sends a trigger signal to the high-speed camera, causing the camera to expose and capture an image. This triggering method ensures that the camera accurately captures images when the workpiece moves to a specific position, achieving precise synchronization between camera acquisition and workpiece movement. For example, in a production line for automobile engine cylinders, the cylinder moves at a constant speed on a conveyor belt, and the encoder generates pulses as the conveyor belt drive shaft rotates. When the cylinder moves to a specific position at the inspection station, the encoder's pulse signal triggers the high-speed camera to capture an image of the laser stripes on the cylinder surface. The captured image accurately reflects the state of the cylinder surface. The exposure time of a high-speed camera refers to the length of time the camera sensor receives light, which has a significant impact on the quality of the captured image. If the exposure time is too long, the image captured by the camera will be blurred due to the movement of the workpiece. If the exposure time is too short, the image will be too dark and the laser stripes will not be clearly displayed. Therefore, it is necessary to dynamically adjust the exposure time according to the movement speed of the workpiece. Generally speaking, the faster the workpiece moves, the shorter the exposure time needs to be set to reduce image blur caused by the movement of the workpiece. A speed sensor can be installed on the production line to monitor the movement speed of the workpiece in real time. The speed information is then transmitted to the camera control unit. The control unit calculates the appropriate exposure time based on the movement speed of the workpiece according to a preset algorithm and automatically adjusts the camera exposure time. At the same time, to ensure that clear images can be captured under any circumstances, the maximum exposure time is limited to ≤1μs. Even if the workpiece moves slowly, the exposure time will not exceed this upper limit. This can avoid image blurring caused by excessively long exposure times and ensure that the captured laser stripe images are clear and accurate, providing high-quality data for subsequent 3D coordinate conversion and surface inspection.
[0037] In this embodiment, specifically: in step 6, the content of the inspection report includes the type, location, size, severity level of the defect, inspection time, and workpiece number, and the inspection report is stored and transmitted in CSV or XML format; Defect type refers to the specific category of the detected defect, such as scratches, cracks, holes, and other different types of defects on the product surface. Clarifying the defect type helps to take targeted treatment measures later. For example, cracks require welding repair, while scratches only require surface grinding. Defect location refers to the specific location of the defect on the workpiece. Accurately recording the defect location allows workers to quickly locate the problem. Especially for workpieces with complex structures, clear location information can improve the efficiency of repair and processing. For example, on a large circuit board, a precise description of the defect location near a component can help technicians quickly find the problem point. Defect size includes specific measurement data such as the length, width, and depth of the defect. The size can reflect the severity of the defect and provide a basis for evaluating the impact of the defect on the performance of the workpiece. For example, a large hole will seriously affect the structural strength of the workpiece, while a small hole will have a relatively small impact. Severity levels are classified based on defect type, size, and impact on workpiece function, performance, and safety. Common severity levels include mild, moderate, and severe. This helps companies develop different handling strategies. For mild defects, the workpiece can continue to be used or undergo simple treatment, while severe defects require the workpiece to be scrapped. Detection time refers to the specific moment when a defect is discovered, recorded with accuracy to year, month, day, hour, minute, and second. Detection time is very important for quality traceability and statistical analysis. It can analyze the pattern of defect occurrence in different time periods, determine whether there are quality issues in a specific period, and also help determine the approximate production link where the defect occurs. The workpiece number is a unique number for each workpiece, similar to the workpiece's "identity card". Through the workpiece number, the workpiece's production information, process parameters, historical inspection records, etc. can be associated to achieve quality control of a single workpiece throughout its life cycle. CSV (Comma-Separated Values) is a simple text format that stores tabular data in plain text, with commas separating data items. The advantage of the CSV format is that it is easy to generate, edit, and process. Many data analysis software and databases can directly import CSV files for processing. For inspection reports on production lines, the CSV format can be used to easily organize and analyze data. XML (eXtensible Markup Language) is an extensible markup language that uses tags to describe the structure and meaning of data. The XML format is highly readable and self-describing, and can clearly express the hierarchical relationships between data. Using the XML format in inspection reports facilitates data exchange and sharing between different systems, especially when integrated with other enterprise information systems. The advantages of XML are even more apparent.
[0038] When transmitting the test report to the PLC or host computer on the production line in real time, the Ethernet communication protocol is used with a transmission rate of ≥100Mbps; Among them, Ethernet is a widely used local area network communication technology with advantages such as fast transmission speed, high stability and low cost. In industrial production environments, Ethernet communication protocol is widely used for data transmission between devices. Using Ethernet communication protocol to transmit test reports to PLC (Programmable Logic Controller) or host computer can ensure the efficiency and reliability of data transmission. The requirement of a transmission rate ≥100Mbps ensures that the test report can be transmitted to the PLC or host computer in real time and quickly. The higher transmission rate can reduce the delay in data transmission, so that the control system on the production line can obtain the test results in a timely manner and make corresponding decisions based on the results, such as triggering alarms, controlling equipment operations, etc.; for example, when a serious defect is detected, the system can quickly transmit the report to the PLC, and the PLC immediately triggers the alarm device or controls the production line to stop running, preventing the defective workpiece from entering the next production link.
[0039] In this embodiment, specifically: in step 1, the standard calibration plate is a ceramic calibration plate, the flatness error of the ceramic calibration plate is ≤±10 μm, and the surface roughness is ≤Ra0.05 μm; Specifically, ceramic calibration plates with a flatness error of ≤±10μm and a surface roughness of ≤Ra0.05μm are selected primarily to meet the needs of high-precision testing. In optical measurement, the accuracy of the calibration plate directly affects the accuracy of the measurement system. Ceramic materials have excellent stability and wear resistance and are not easily deformed or damaged by environmental factors (such as temperature and humidity changes). This ensures that the flatness and surface roughness of the calibration plate remain stable over time. The flatness error is controlled within ±10μm, ensuring the flatness of the calibration plate surface. This allows the laser stripes projected onto the calibration plate by the laser projection module to be evenly distributed, avoiding deformation of the laser stripes caused by the uneven surface of the calibration plate, which in turn affects measurement accuracy. The surface roughness is ≤Ra0.05μm, which ensures the smoothness of the calibration plate surface, reduces the scattering and reflection interference of the laser on the surface, improves the quality of the laser stripe image, and helps to more accurately extract the center coordinates of the laser stripe, thereby improving the accuracy of the entire detection system.
[0040] In summary, the embodiment of the present invention provides a dynamic calibration type laser surface real-time detection method, which constructs an initial measurement coordinate system and a dynamic calibration model by selecting a high-precision ceramic calibration plate; uses dual calibration source fusion technology to collect and preprocess calibration images according to changes in environmental parameters or timing periods; uses the grayscale centroid method, parabola fitting algorithm and bundle adjustment method to update calibration parameters; uses encoder pulses to trigger a high-speed camera to collect images, and completes three-dimensional coordinate conversion in combination with calibration parameters; uses Kalman filtering to process three-dimensional point cloud data, extracts morphological features such as curvature, normal vector and height difference, and compares them with standard templates, and uses convolutional neural networks to classify and locate defects; finally, marks and records defects, generates CSV or XML format detection reports, and transmits them to the PLC or host computer in real time at an Ethernet transmission rate of ≥100Mbps to trigger corresponding actions, thereby realizing high-precision real-time detection of tiny defects on the workpiece surface in a complex industrial environment, effectively improving product quality control level and production efficiency.
[0041] Figure 2 This is a functional module diagram of a dynamic calibration laser surface real-time detection system according to an embodiment of the present application. Figure 2 As shown, a dynamic calibration type laser surface real-time detection system, the system includes: a calibration construction module, a calibration acquisition module, a coordinate calculation module, an acquisition conversion module, an analysis and positioning module and a report transmission module; a calibration construction module configured to obtain initial calibration parameters of the laser projection module and the high-speed imaging module through a standard calibration plate, and to construct an initial measurement coordinate system using a camera calibration method to establish a dynamic calibration model; A calibration acquisition module is configured to use a calibration trigger mechanism to trigger a standard calibration plate or a workpiece reference area to enter the field of view according to changes in environmental parameters or a timing period, to acquire at least three sets of calibration images, and to pre-process the calibration images; The coordinate calculation module is configured to extract the center coordinates of the laser light strip using the grayscale centroid method or parabola fitting algorithm based on the preprocessed calibration image, and calculate the transformation matrix H between the current laser light plane and the camera coordinate system using the bundle adjustment method. t , update dynamic calibration parameters; The acquisition conversion module is configured to use a high-speed camera to synchronously acquire the laser stripe image on the workpiece surface, combined with the real-time calibration parameter H t Complete 3D coordinate conversion and generate 3D point cloud data; The analysis and positioning module is configured to filter the 3D point cloud data, extract the topographic features and compare them with the standard template to classify and locate the defects; The report transmission module is configured to mark and record the detected defects, generate a test report, and transmit the test report to the PLC or host computer on the production line in real time to trigger an alarm or rejection action.
[0042] In this embodiment, specifically: the calibration acquisition module adopts dual calibration source fusion technology, and dynamically allocates calibration weights of the standard calibration plate and the workpiece self-reference area through Bayesian estimation.
[0043] In this embodiment, specifically: the laser projection module has a built-in self-constant temperature control unit, and the self-constant temperature control unit includes a Peltier temperature control module and a wavelength locker.
[0044] For other details about the technical solutions for implementing each module in the above-mentioned embodiment, a dynamic calibration type laser surface real-time detection system, please refer to the description of the above-mentioned embodiment, a dynamic calibration type laser surface real-time detection method, which will not be repeated here.
[0045] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similarities between the various embodiments can be referred to in conjunction with each other. For system-related embodiments, since they are generally similar to method-related embodiments, their description is relatively simple. For relevant details, refer to the description of the method-related embodiments.
[0046] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A dynamic calibration laser surface real-time detection method, characterized in that: The following steps are involved: The initial calibration parameters of the laser projection module and high-speed imaging module are obtained through the standard calibration plate, and the initial measurement coordinate system is constructed using the camera calibration method to establish a dynamic calibration model; Based on changes in environmental parameters or timing cycles, a calibration trigger mechanism is used to trigger the standard calibration plate or workpiece reference area to enter the field of view, collect at least three sets of calibration images, and pre-process the calibration images; Based on the pre-processed calibration image, the grayscale centroid method or parabola fitting algorithm is used to extract the center coordinates of the laser light bar, and the bundle adjustment method is used to calculate the transformation matrix H between the current laser light plane and the camera coordinate system. t , update dynamic calibration parameters; The high-speed camera is used to synchronously collect the laser stripe image on the workpiece surface, combined with the real-time calibration parameter H t Complete 3D coordinate conversion and generate 3D point cloud data; Filter the 3D point cloud data, extract the morphological features and compare them with the standard template to classify and locate defects; The detected defects are marked and recorded, and a test report is generated. The test report is transmitted to the PLC or host computer on the production line in real time to trigger an alarm or rejection action.
2. The method for real-time detection of a dynamic calibration laser surface according to claim 1, characterized in that: The environmental parameter change includes any one or more of vibration amplitude > 0.5g, temperature change ΔT > 2°C, and light intensity fluctuation > 10%; The timing period is a fixed time interval, which is adjusted between 10 minutes and 60 minutes according to actual production needs; The workpiece reference area is a preset defect-free golden area on the workpiece surface, with a surface roughness of ≤ Ra0.1 μm. The area boundary is located by using the SIFT feature matching algorithm, and a self-reference coordinate system is established in combination with RANSAC plane fitting; The preprocessing of the calibration image includes removing salt and pepper noise in the image by using an adaptive median filtering algorithm, and enhancing the contrast of the image by using a histogram equalization algorithm; The calibration trigger mechanism adopts dual calibration source fusion technology, supports dual calibration sources of standard calibration plate and workpiece self-reference area, and dynamically allocates weights through Bayesian estimation. The calculation formula is: H final =w1H plate +w2H ref , w1+w2=1; Among them, w1 is dynamically adjusted according to the mechanical positioning accuracy of the calibration plate, and w2 is dynamically adjusted according to the movement speed of the workpiece.
3. The dynamic calibration laser surface real-time detection method according to claim 1, characterized in that: When the grayscale centroid method is used to extract the center coordinates of the laser light stripe, the weighted centroid of the grayscale value of each light stripe pixel is calculated to obtain sub-pixel accuracy, with an error of ≤±0.05 pixels. When the parabola fitting algorithm is used to extract the center coordinates of the laser light stripe, a parabola fitting is performed based on the grayscale distribution of the light stripe pixels to determine the position of the light stripe center, with a fitting error of no more than ≤0.03 pixels. The bundle adjustment method uses the least squares method for optimization and solution.
4. The method for real-time detection of a dynamic calibration laser surface according to claim 1, characterized in that: The three-dimensional point cloud data is filtered using a Kalman filter algorithm, which predicts and corrects noise interference of the point cloud data in real time by establishing a state space model of the point cloud data; The topographic features include curvature, normal vector and height difference of the three-dimensional point cloud; The defect classification adopts a convolutional neural network model. The convolutional neural network model is trained with multiple defect samples, and the defect classification accuracy is ≥98%.
5. The dynamic calibration laser surface real-time detection method according to claim 1, characterized in that: The synchronous triggering mode of the high-speed camera is encoder pulse triggering. The exposure time of the high-speed camera is dynamically adjusted according to the movement speed of the workpiece, and the maximum exposure time is ≤1μs.
6. The dynamic calibration laser surface real-time detection method according to claim 1, characterized in that: The contents of the inspection report include the type, location, size, severity level of the defect, inspection time, and workpiece number. The inspection report is stored and transmitted in CSV or XML format. When the inspection report is transmitted to the PLC or host computer on the production line in real time, the Ethernet communication protocol is used, and the transmission rate is ≥100Mbps.
7. The dynamic calibration laser surface real-time detection method according to claim 1, characterized in that: The standard calibration plate is a ceramic calibration plate, and the flatness error of the ceramic calibration plate is ≤±10μm, and the surface roughness is ≤Ra0.05μm.
8. A dynamic calibration type laser surface real-time detection system, applied to a dynamic calibration type laser surface real-time detection method according to any one of claims 1 to 7, characterized in that: The system includes: a calibration construction module, a calibration acquisition module, a coordinate calculation module, an acquisition conversion module, an analysis and positioning module and a report transmission module; The calibration construction module is configured to obtain initial calibration parameters of the laser projection module and the high-speed imaging module through a standard calibration plate, and to construct an initial measurement coordinate system using a camera calibration method to establish a dynamic calibration model; The calibration acquisition module is configured to use a calibration trigger mechanism to trigger a standard calibration plate or a workpiece reference area to enter the field of view according to changes in environmental parameters or a timing period, to acquire at least three sets of calibration images, and to pre-process the calibration images; The coordinate calculation module is configured to extract the center coordinates of the laser light strip using the grayscale centroid method or parabola fitting algorithm based on the preprocessed calibration image, and calculate the transformation matrix H between the current laser light plane and the camera coordinate system using the bundle adjustment method. t , update dynamic calibration parameters; The acquisition conversion module is configured to use a high-speed camera to synchronously acquire the laser stripe image on the workpiece surface, combined with the real-time calibration parameter H t Complete 3D coordinate conversion and generate 3D point cloud data; The analysis and positioning module is configured to filter the three-dimensional point cloud data, extract the morphological features and compare them with the standard template to classify and locate the defects; The report transmission module is configured to mark and record the detected defects, generate a test report, and transmit the test report to the PLC or host computer on the production line in real time to trigger an alarm or rejection action.
9. The dynamic calibration laser surface real-time detection system according to claim 8, characterized in that: The calibration acquisition module adopts dual calibration source fusion technology and dynamically allocates calibration weights of the standard calibration plate and the workpiece self-reference area through Bayesian estimation.
10. The dynamic calibration laser surface real-time detection system according to claim 8, characterized in that: The laser projection module has a built-in self-constant temperature control unit, which includes a Peltier temperature control module and a wavelength locker.
Citation Information
Cited By
Quality detection method suitable for titanium alloy bar
CN121114058A
Quality inspection methods applicable to titanium alloy bars
CN121114058B
Encoder triggering intelligent detection method and system for automobile coating line
CN121164299A
Panorama camera and turntable mobile measurement matching method and system
CN121304806A
Method and system for back projection of 2D defect to 3D digital model
CN121414571A