Galvanometer type line laser three-dimensional reconstruction method based on double bp neural network

By combining a depth-first search algorithm and a Weibull distribution model with a dual backpropagation neural network, the calibration complexity and coordinate coupling problems in galvanometer-type line laser 3D reconstruction technology are solved, achieving efficient and accurate 3D reconstruction, which is suitable for industrial inspection and reverse engineering.

CN121582467APending Publication Date: 2026-02-27GUILIN UNIV OF ELECTRONIC TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511726183.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-24
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Existing galvanometer-based line laser 3D reconstruction technology suffers from problems such as complex calibration processes, cumulative coordinate coupling solution errors, insufficient utilization of multi-source information, unoptimized neural network applications, and poor adaptability of laser line center point extraction to complex grayscale distributions.

Method used

The center point is extracted by combining a depth-first search algorithm with a Weibull distribution model, and the three-dimensional coordinates are solved in stages by a dual BP neural network. This simplifies the calibration process, optimizes the accuracy of laser line search and center point extraction, deeply integrates multi-source data, and decouples and optimizes the coordinate solution.

Benefits of technology

It simplifies the calibration process, improves the integrity of laser line extraction and the accuracy of the center point, optimizes the efficiency and accuracy of three-dimensional coordinate solving, enhances adaptability to complex scenarios, and meets the high-precision measurement needs of industrial inspection and reverse engineering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The invention belongs to the technical field of non-contact three-dimensional measurement, discloses a galvanometer type line laser three-dimensional reconstruction method based on a double BP neural network, and aims to solve the problems of complex calibration, low laser line extraction precision and large coordinate calculation error in the prior art. The method comprises the following steps: firstly, fixing poses of a galvanometer and line laser, calibrating internal reference of a camera and establishing a coordinate system; a data set is acquired through Z-axis translation of a calibration plate and multi-angle scanning of a galvanometer, laser rays are searched by adopting a depth-first algorithm, and center pixel coordinates of stripes are extracted from each column in a Weibull distribution manner; a precise three-dimensional coordinate data set is obtained by combining a homography matrix and light plane fitting, a double BP neural network is constructed, and XY coordinates and Z-axis coordinates are sequentially trained and output; during actual measurement, laser line characteristic data and a galvanometer angle of a measured object are input, and three-dimensional reconstruction is completed. The calibration process is simplified, the laser line extraction and coordinate calculation precision is improved, the cost is low, the adaptability is high, and the method is suitable for industrial detection, reverse engineering and other scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the interdisciplinary field of optical measurement, computer vision and artificial intelligence. Specifically, it relates to a method for extracting the center of a line laser and a galvanometer-based three-dimensional reconstruction method and system for line lasers based on a dual BP neural network. It is applicable to industrial inspection, intelligent manufacturing, reverse engineering and other scenarios that require high-precision three-dimensional shape acquisition. Technical Background

[0002] With the rapid development of industrial automation and intelligent manufacturing, the demand for 3D measurement technology in industrial inspection, reverse engineering, robot vision, and precision manufacturing is becoming increasingly urgent. While contact measurement methods in traditional 3D measurement can guarantee basic accuracy, they suffer from low efficiency and are prone to damaging the surface of the object being measured, failing to meet the needs of large-scale production and real-time monitoring. Traditional optical triangulation methods, although achieving non-contact measurement, are limited by mechanical structures and geometric modeling, making it difficult to adapt scanning flexibility, speed, and accuracy to the efficient and precise measurement of complex-shaped components. Therefore, developing efficient, accurate, and flexible non-contact 3D measurement technology has become a core research focus in the industry.

[0003] Line structured light technology, as a mainstream non-contact 3D measurement solution, projects specific patterns of light stripes onto the surface of a target object. A camera captures the deformation of these stripes caused by the object's surface shape, and the 3D coordinates of the object are calculated based on geometric relationships. This technology boasts advantages such as high measurement speed, high accuracy, and non-contact, non-destructive operation, making it particularly suitable for 3D reconstruction of complex shapes and delicate components, and possessing broad application potential in industrial scenarios. Among these, the precise search of the laser line and the high-precision extraction of the stripe center are crucial preliminary steps determining the quality of 3D reconstruction, and their performance directly affects the accuracy of subsequent coordinate calculations.

[0004] However, existing line structured light 3D measurement technology still has significant limitations. Traditional line structured light measurement systems rely on complex mechanical scanning platforms to control the movement of light stripes, resulting in large overall size, significant space consumption, slow scanning speed, and poor flexibility. Furthermore, the system's measurement accuracy is highly dependent on the calibration results of camera intrinsic and extrinsic parameters and the laser plane equation. The calibration process is cumbersome and easily affected by environmental factors, severely limiting its deployment efficiency in industrial settings. In the center point extraction stage, a Weibull distribution model is used to extract the center point, which can solve the problem of low accuracy in extracting the laser line center. By processing the grayscale value sequence corresponding to each column of pixels in the laser line image, the center of each column of pixels is obtained, eliminating the need for a Gaussian distribution model to obtain the laser line center. Therefore, under the influence of factors such as illumination, workpiece surface material, and noise, the accuracy of laser line center extraction can be improved.

[0005] The emergence of galvanometer-based line laser scanning systems offers solutions to some of the aforementioned problems. This system replaces the traditional mechanical scanning platform with a high-precision galvanometer, precisely controlling the emission direction of the line laser through rapid galvanometer deflection, enabling active and rapid scanning of objects. Compared to traditional scanning methods, galvanometer-based systems not only significantly simplify the overall structure and reduce equipment size, but also offer faster scanning speeds and a larger measurement range. Furthermore, they exhibit excellent positioning and repeatability accuracy, providing fundamental three-dimensional topographic data for the measured object and adapting to the application needs of a wider range of industrial scenarios.

[0006] Despite the significant advantages of galvanometer-based line laser scanning systems, current technologies still face key bottlenecks that hinder their ability to meet the demands of high-precision industrial-grade measurements. Firstly, the system calibration process is complex, typically requiring high-precision auxiliary instruments such as linear motion stages. This not only increases equipment costs and operational time but also makes the calibration process susceptible to human error and environmental interference, leading to insufficient accuracy and impacting subsequent 3D coordinate calculations. Secondly, 3D coordinate calculations rely on traditional geometric models (such as line-plane intersections and multi-parameter fitting), necessitating the establishment of precise mappings between the galvanometer rotation angle and control current, and between camera pixel coordinates and spatial coordinates. However, factors such as galvanometer mechanical errors, electrical fluctuations, and temperature drift can disrupt the stability of these mappings, resulting in decreased coordinate solution accuracy. Thirdly, traditional methods often employ single-stage coupled solutions for 3D coordinates, with the XY axes and Z... The associated errors of the axes are superimposed, and the key information of the galvanometer rotation current, which directly reflects the scanning state, is not fully utilized. The adaptability to complex curved surfaces is poor, which further limits the reconstruction accuracy. Fourth, most of the existing solutions that combine neural networks output three-dimensional coordinates at one time in a single stage network. They fail to achieve coordinate decoupling optimization and do not optimize the core pain points of laser line search and center point extraction. They are unable to give full play to the nonlinear mapping and feature fusion capabilities of neural networks and cannot effectively make up for the defects of traditional geometric modeling and image processing.

[0007] Based on the aforementioned industry needs and technical pain points, there is a need for a galvanometer-based line laser 3D reconstruction method that can simplify the calibration process, optimize the accuracy of laser line search and center point extraction, deeply integrate multi-source data, and improve coordinate solution accuracy through decoupling optimization. This invention proposes a technical solution based on a depth-first search algorithm for laser lines, Weibull distribution for center point extraction, and a dual BP neural network. This solution specifically addresses the core problems of existing technologies, promoting the high-precision and high-efficiency application of non-contact 3D measurement technology in industrial scenarios. Summary of the Invention

[0008] This invention aims to address the problems in existing galvanometer-based line laser 3D reconstruction technology, such as complex calibration processes, accumulated errors from coordinate coupling solutions, insufficient utilization of multi-source information, unoptimized neural network applications, and poor adaptability of laser line center point extraction to complex grayscale distributions. It provides a galvanometer-based line laser 3D reconstruction method based on a depth-first search algorithm, Weibull distribution, and a dual BP neural network. This method simplifies the calibration process, improves the completeness and accuracy of laser line extraction and center point accuracy, optimizes the efficiency and accuracy of 3D coordinate solutions, and enhances adaptability to complex scenes. Technical solutions

[0009] The technical problem this invention aims to solve is to address the shortcomings of the existing technology by providing a galvanometer-based line laser 3D reconstruction method that simplifies the calibration process, deeply integrates multi-source data, and improves coordinate solution accuracy through decoupling optimization.

[0010] Step 1: Install and fix the relative positions of the galvanometer and the line laser emitter to ensure that their positional relationship is stable and to avoid measurement errors caused by component displacement during the scanning process.

[0011] Step 2: Using mature methods such as Zhang's calibration method, calibrate the industrial camera in the calibration system to obtain the camera's intrinsic parameters (focal length, principal point coordinates, etc.) and distortion coefficients, providing basic parameters for subsequent coordinate transformation.

[0012] Step 3: Clearly establish the correspondence between the world coordinate system, camera coordinate system, and pixel coordinate system, define the origin and coordinate axis direction of each coordinate system, and provide a unified benchmark for cross-coordinate system coordinate transformation.

[0013] Step 4: Place the high-precision dot calibration plate on the measurement platform, turn off the laser, control the camera to capture the reference image of the calibration plate, turn on the laser, and adjust the camera's exposure time, focal length, and other parameters to ensure that the laser stripes are clear and uniform in the image. Control the galvanometer to deflect sequentially to the preset angle at uniform intervals. (n≥4), one laser stripe image is acquired synchronously for each deflection angle. After completing one layer of angle scanning, the calibration plate is moved sequentially along the Z-axis of the world coordinate system to... (m≥4 and =0), repeat the above angle scanning and image acquisition process to finally obtain a multi-dimensional laser stripe dataset under different deflection angles and heights. The acquired images are as follows: Figure 7 Let the size of this image be... .

[0014] Step 5: Preprocess all acquired laser stripe images. Use a depth-first search algorithm to search for grayscale points in the entire image, obtain all grayscale points in each column, and select all grayscale values ​​in each column using a threshold to select valid grayscale values. This can be obtained through depth-first search.

[0015] Step 6:

[0016] Step 7: Where threshold is the corresponding grayscale threshold of the nth column image, Gmax is the maximum grayscale value in the grayscale value sequence of the nth column image, and Gmin is the minimum grayscale value in the grayscale value sequence of the nth column image.

[0017] Step 8: Obtain the valid grayscale points in the nth column, and use the obtained valid grayscale points to find the center point of the column using the Weibull distribution (WD) model.

[0018] Step 9: If no valid grayscale point is determined and n is less than W, let n = n + 1, and perform the step of processing the nth column of the laser line image to obtain the grayscale value sequence of the nth column image.

[0019] Step 10: Determine the center of the grayscale points in each column based on the Weibull distribution model. The distribution model used in this embodiment can be the Weibull distribution model, which can be expressed by the following formula:

[0020] Step 11:

[0021] Step 12: In the formula, when The formula exhibits a single-peak function with a distinct peak that converges towards the center, closely matching the grayscale distribution of the laser line array.

[0022] Step 13: The peak position of the Weibull distribution is the maximum y-value of the function. This can be obtained by differentiating the formula and setting the derivative to 0.

[0023]

[0024] Step 14: When the shape parameter k of the formula is fixed, the scale parameter The analytical solution of the weighted MLE is obtained by applying the weighted log-likelihood function with respect to... After finding the derivative and setting it to zero, solve for the grayscale weight. satisfy ,in Let be the gray value of the i-th point. Substitute the weighted log-likelihood function from the formula into... achievable

[0025] Step 15: Obtain the valid points of column n through steps 6-7 and solve for the center point of column n according to the formula. Repeat this process for column n+1.

[0026] Step 16: Combining the camera intrinsic parameters and distortion coefficients obtained in Step 2, the coordinate system relationship established in Step 3, and the pixel coordinates (u,v) of each laser stripe center and the known parameters of the high-precision dot calibration plate, the feature point coordinates (u,v) in the pixel coordinate system are initially converted into three-dimensional coordinates in the world coordinate system through homography matrix transformation. .

[0027] Step 17: Due to inaccuracies or missing values ​​in the initially obtained Wz', based on the multiple sets of laser stripe data collected in Step 4, the least squares method is used for optical plane fitting to complete and correct the accurate world coordinate system Z-axis coordinate Wz, thus determining the complete three-dimensional coordinates. .

[0028] Step 18: Integrate the calibration data from all angles and heights to form a dataset containing n×m precise 3D coordinate points. This dataset serves as the training sample for the dual BP neural network (input features correspond one-to-one with output labels).

[0029] Step 19: Construct a two-stage cascaded BP neural network model. The first-stage network takes the pixel coordinates (u,v) extracted in Step 5 and the mirror deflection angle q recorded in Step 4 as input, and the world coordinate system XY coordinates determined in Step 8 as input. To output labels, hyperparameters such as the number of network layers, neurons, and learning rate are set. The network is then iteratively trained using the backpropagation algorithm until the model converges. The second-level network uses pixel coordinates (u, v), the mirror deflection angle q, and the output of the first-level network. The input consists of five features. The world coordinate system Z-axis coordinate Wz, determined in step 8, is used as the output label. The training strategy is the same as that of the first-level network to complete the training, and finally a well-trained dual BP neural network model is obtained.

[0030] Step 20: Control the galvanometer-type line laser scanning system to scan the object under test, synchronously record the galvanometer deflection angle p for each scan, acquire laser stripe images of the object surface, extract the feature point coordinates (u,v) of the center line of each laser stripe in the pixel coordinate system, and input the (u,v) of each feature point and the corresponding galvanometer deflection angle p into a well-trained dual BP neural network model, which then outputs the results sequentially through the first-level network. The second-level network outputs Wz, which yields the complete three-dimensional coordinates of each feature point on the object's surface. It integrates all three-dimensional coordinate points to generate the three-dimensional point cloud data of the object, and completes the three-dimensional reconstruction of the object under test.

[0031] The beneficial effects of the above technical solution are as follows: This invention acquires laser line images through image acquisition equipment, searches for laser lines in the laser image using depth-first search, finds the points containing laser light in the laser image, obtains the gray value sequence of the laser line in the nth column of the image, identifies valid points with gray values ​​greater than a gray value threshold in the gray value sequence, and obtains the center point of the nth column by obtaining the valid points in the nth column and using a Weibull distribution model. If n is less than W, n+1 is set, and the W columns of the laser line image are processed to obtain the gray value sequence of the nth column. This solves the problem of low accuracy in extracting the center of the laser line. Furthermore, the provided galvanometer-based 3D reconstruction method for line lasers based on a dual BP neural network only requires translation along the Z-axis of a calibration plate and multi-angle scanning of the galvanometer to complete the dataset acquisition. It eliminates the need for complex geometric parameter calibration processes, requires less manual intervention, is easy to operate, and facilitates automated deployment in industrial scenarios. This invention employs a dual-backpropagation (BP) neural network to calculate 3D coordinates in stages. The first neural network focuses on solving the X and Y axes, while the second neural network fuses multi-source features to optimize Z-axis accuracy. Simultaneously, it combines optical plane fitting to correct depth data, fully leveraging the nonlinear mapping capabilities of neural networks and the advantages of multi-source data fusion. This effectively offsets the effects of galvanometer mechanical errors, electrical fluctuations, and environmental interference, resulting in significantly higher 3D reconstruction accuracy than traditional methods based on geometric modeling or single-stage neural networks. Furthermore, this invention eliminates the need for high-precision auxiliary calibration instruments such as linear motion stages, simplifying system deployment costs through a data-driven training model. The staged decoupling design avoids error aggregation caused by coordinate coupling, making it more adaptable to objects with weak textures and complex shapes. It balances reconstruction efficiency and accuracy, fully meeting the high-precision measurement needs of industrial inspection, reverse engineering, and other scenarios. Attached Figure Description

[0032] Figure 1 This is a flowchart of three-dimensional reconstruction using a galvanometer line structured light scanner, provided in the first embodiment of the present invention.

[0033] Figure 2 This is a schematic diagram illustrating the system coordinate establishment for three-dimensional reconstruction using a galvanometer line structured light scanner according to the first embodiment of the present invention.

[0034] Figure 3 This is a schematic diagram showing the initial light plane of the galvanometer line structured light scanner provided in the first embodiment of the present invention being perpendicular to the calibration plate.

[0035] Figure 4 The angle obtained as provided in the first embodiment of the present invention Schematic diagram of laser stripe principle.

[0036] Figure 5 A schematic diagram illustrating the principle of mapping the center point coordinates of laser stripes at the same angle but different heights, provided for the first embodiment of the present invention.

[0037] Figure 6 This is a schematic diagram of the calibration process provided in the first embodiment of the present invention.

[0038] Figure 7 This is a schematic diagram of a laser line image provided in the first embodiment of the present invention.

[0039] Figure 8 The direction of depth-first search provided in the first embodiment of the present invention.

[0040] Figure 9 This refers to the region for depth-first search provided in the first embodiment of the present invention.

[0041] Figure 10 This is a schematic diagram of the center extraction result of a laser line image provided in the first embodiment of the present invention.

[0042] Figure 11 The dual bp neural network model provided in the first embodiment of the present invention

[0043] Figure 12 The generated training dataset provided in the first embodiment of the present invention

[0044] Figure 13 The result image obtained by scanning using the present invention is provided for the first embodiment of the present invention.

[0045] Figure 14 The object before scanning using the present invention is provided in the first embodiment of the present invention.

[0046] Figure 15 A schematic diagram illustrating the specific process of a galvanometer-based line laser 3D reconstruction method based on a dual bp neural network, as provided in the first embodiment of the present invention. Figure Labels

[0047] 1. Line structured light, 2. Galvanometer system, 3. Industrial camera, 4. Calibration board Detailed Implementation

[0048] like Figure 1 and Figure 15 The flowchart below illustrates an embodiment of this application. The specific implementation of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. The following embodiments are used to illustrate the present invention, but are not intended to limit the scope of the invention.

[0049] Step 1: As shown in step S1, Figure 3To establish the pose relationship between the galvanometer system and the line laser, adjust the initial position of the galvanometer lens so that its plane and the light plane are perpendicular to the calibration plate.

[0050] Step 2: Use Zhang Zhengyou's calibration method to calibrate the distortion coefficients and camera intrinsic parameters of the industrial camera, and denote the camera intrinsic parameter matrix as K.

[0051] Step 3: As shown in Figure 2, the system needs to establish five coordinate systems to support subsequent calibration work. The rules for establishing each coordinate system are as follows: Construct the camera coordinate system with the camera's optical center as the origin. Establish an image pixel coordinate system with the top left corner of the image as the origin. The image physical coordinate system is established with the intersection of the camera's optical center and the imaging plane as the origin. A target coordinate system is established with the upper left corner of the high-precision dot calibration plate as the origin. Establish with the rotation axis of the galvanometer as the center axis axis, axis and target coordinate system The intersection of the planes is taken as the origin. And when the galvanometer is in a stationary state, the normal direction of the laser plane is taken as... Axis, based on which a world coordinate system is established The calibration process of the system is essentially about solving for and establishing the precise mapping relationship between the five coordinate systems mentioned above.

[0052] Step 4: From step S2 and Figure 5 As shown, the high-precision dot calibration plate is placed vertically on the scanner's measurement platform. First, the galvanometer angle is set to... To ensure the line laser can be projected onto the calibration plate through the galvanometer and the industrial camera can capture a complete image of the calibration plate, after setting up, adjust the industrial camera's exposure, focal length, and other parameters, and first take a picture of the line laser at the current galvanometer angle to ensure the laser stripes are clear and uniform in the image. Then, turn off the line laser and take a picture of the calibration plate without laser. Calculate the extrinsic parameter matrix R of this calibration plate using Euclidean principle, keeping the calibration plate's position unchanged. Finally, control the galvanometer system to rotate it at the preset angle. (n>4) Rotate, after each rotation of an angle ( Figure 4 (As shown), turn on the line laser, repeat the previous operation, and take pictures of images with and without laser stripes. The scanned laser images are similar to... Figure 7 As shown.

[0053] Step 5: As Figure 6 As shown, after completing the angle scan of one layer, the calibration plate is adjusted and moved sequentially along the Z-axis of the world coordinate system to... (m≥4 and =0), repeat step 4 to take pictures of each height with and without laser stripes.

[0054] Step 6: As shown in step S3, after steps 5-6, we obtain laser-free and laser-containing bar images for all angles and heights. For the laser image, we first extract the laser lines using a depth-first search algorithm. The algorithm works as follows: First, we search from the leftmost column to the right. For the nth column, if there is no laser in that column, we search from the top to the bottom, and then continue searching the (n+1)th column. If there is laser in that column, we search from top to bottom. If a point with grayscale value is found, we start the depth-first search algorithm, setting the search directions to eight directions: up, down, left, right, upper left, upper right, lower left, and lower right. Figure 8 As shown, the column being searched is marked on the left. When the search in this column is complete, when searching column n+1, it is checked whether it has been searched. If it has been searched, it is skipped; otherwise, the search continues from the top of column n+1 downwards. Finally, for Figure 6 The locations of the images searched are as follows Figure 9 .

[0055] Step 7: For the searched nodes, select the valid points for each column using the threshold. The specific threshold formula is as follows:

[0056] Step 8:

[0057] Step 9: Where threshold is the corresponding grayscale threshold of the nth column image, Gmax is the maximum grayscale value in the grayscale value sequence of the nth column image, and Gmin is the minimum grayscale value in the grayscale value sequence of the nth column image.

[0058] Step 10: Obtain the valid grayscale points in the nth column, and use the obtained valid grayscale points to obtain the pre-built Weibull distribution (WD) model.

[0059] Step 11: If no valid grayscale point is determined and n is less than W, let n = n + 1, and perform the step of processing the nth column of the laser line image to obtain the grayscale value sequence of the nth column image.

[0060] Step 12: As shown in step S4, the center of the grayscale points in each column is determined based on the Weibull distribution model. The distribution model used in this embodiment can be the Weibull distribution model, which can be expressed by the following formula:

[0061] Step 13:

[0062]

[0063] Step 14: In the formula, when The formula exhibits a single-peak function with a distinct peak that converges towards the center, which matches the grayscale distribution of the laser line array.

[0064] Step 15: The peak position of the Weibull distribution is the maximum y-value of the function. This can be obtained by differentiating the formula and setting the derivative to 0.

[0065]

[0066] Step 16: When the shape parameter k of the formula is fixed, the weighted MLE analytical solution for the scale parameter r is obtained by applying the weighted log-likelihood function with respect to... After finding the derivative and setting it to zero, solve for the grayscale weight. satisfy ,in Let be the gray value of the i-th point. The weighted log-likelihood function of the formula is:

[0067]

[0068] Substitution We can obtain:

[0069]

[0070] Taking its derivative and setting it to 0, we get

[0071]

[0072] Therefore

[0073] =

[0074] Therefore

[0075]

[0076] Where k is a constant with a range of m is the number of valid points in the nth column.

[0077] Step 17: As shown in step S5, the above formula can be used to obtain the coordinates (u, v) of all the center points where y is the center point of the nth column. The specific effect is shown in the following diagram. Figure 10 As shown.

[0078] Step 18: Combining the camera intrinsic parameters and distortion coefficients obtained in Step 2, the coordinate system relationship established in Step 3, the known parameters of the high-precision dot calibration plate, and the pixel coordinates (u,v) of each laser stripe center obtained in Step 6, the feature point coordinates (u,v) in the pixel coordinate system are initially converted into three-dimensional coordinates in the world coordinate system through homography matrix transformation.

[0079] Step 19: Due to inaccuracies or missing values ​​in the initially obtained Wz', based on the multiple sets of laser stripe data collected in Step 4, the least squares method is used for optical plane fitting to complete and correct the accurate world coordinate system Z-axis coordinate Wz, thus determining the complete three-dimensional coordinates. .

[0080] Step 20: As Figure 12 The content shown integrates point cloud data generated after calibration at all angles and heights, forming a dataset containing n×m precise 3D coordinate points. This dataset will serve as the training sample for a dual BP neural network (input features correspond one-to-one with output labels).

[0081] Step 21: Construct a dual BP neural network model. The first layer of the network takes the pixel coordinates (u,v) extracted in Step 6 and the preset calibrated galvanometer rotation angle q as input, and the world coordinate system XY coordinates determined in Step 8 as input. To output the labels, hyperparameters such as the number of network layers, neurons, and learning rate are set. The model is then iteratively trained using the backpropagation algorithm until it converges. The second network uses pixel coordinates (u, v), the mirror deflection angle q, and the output of the first network. Using the joint input (a total of 5 feature dimensions), and the world coordinate system Z-axis coordinate Wz determined in step 8 as the output label, the same training strategy as the first layer of the network is employed to complete the training, ultimately resulting in a well-trained dual BP neural network model, the network model of which is as follows: Figure 11 As shown.

[0082] Step 22: As shown in step S6, the trained neural network model obtained in step 20 is now scanned using a galvanometer-type line structured light system. Figure 14 The actual object is reconstructed in 3D. A galvanometer-type line laser scanning system is controlled to scan the object. The line laser is turned on, and the exposure and focal length of the industrial camera are adjusted. Line laser stripe images are extracted every time the galvanometer is rotated by an angle p until the entire object is scanned. As shown in step S7, after scanning, the feature point coordinates (u, v) of the center line of each laser stripe in the pixel coordinate system are extracted through steps 6-16. The (u, v) of each feature point and the corresponding galvanometer deflection angle p are input into a well-trained dual BP neural network model, which is then passed through the first-level network and output... The second-level network outputs Wz, which yields the complete three-dimensional coordinates of each feature point on the object's surface. By integrating all 3D coordinate points to generate the 3D point cloud data of the object, the 3D reconstruction of the measured object is completed, and the final result is as follows. Figure 13 As shown.

[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope defined by the claims of the present invention.

Claims

1. A galvanometer-based line laser 3D reconstruction method based on a dual BP neural network, characterized in that, Includes the following steps: (1) Fix the relative pose of the galvanometer and the line laser emitter, calibrate the intrinsic parameters and distortion coefficients of the industrial camera, and establish the correspondence between the world coordinate system, the camera coordinate system and the pixel coordinate system; (2) Place the high-precision dot calibration plate on the measurement platform, turn off the laser to take a reference image of the calibration plate, turn on the laser and adjust the camera parameters to make the laser stripes clear and uniform, and control the galvanometer to deflect to the preset angle in sequence. (n≥4) and simultaneously acquire laser stripe images, then move the calibration plate sequentially along the Z-axis of the world coordinate system to (m≥4 and z1=0), repeat the above angle scanning and image acquisition process to obtain a multi-dimensional laser stripe dataset; (3) use the depth-first algorithm to search for the complete laser line contour on the laser stripe image, and then use the Weibull distribution to fit the gray-scale features of each column of pixels of each laser line to extract the feature point coordinates (u,v) of the stripe center line in the pixel coordinate system; (4) combine the camera intrinsic parameters, distortion coefficients, coordinate system relationship and known parameters of the calibration plate, and use the homography matrix to initially convert the pixel coordinates (u,v) into three-dimensional coordinates in the world coordinate system. By using light plane fitting to correct Wz', accurate three-dimensional coordinates are obtained. (5) Construct a dual BP neural network training dataset; the first layer takes pixel coordinates (u,v) and mirror deflection angle q as input, and the second layer takes pixel coordinates (u,v) and mirror deflection angle q as input. The model is trained to output labels; the first level uses pixel coordinates (u,v), mirror deflection angle q, and the output of the first level. As a joint input, Wz is used as the output label to train the model, resulting in a well-trained dual BP neural network model; (6) The galvanometer-type line laser scanning system is controlled to scan the object under test, and the galvanometer deflection angle q is recorded simultaneously and the laser stripe image is acquired. The center pixel coordinates (u,v) of the stripe are extracted using the method in step (3). (u,v) and the corresponding q are input into the well-trained model, and the output is sequentially... By integrating all three-dimensional coordinates with Wz, the three-dimensional point cloud of the object is obtained, and the three-dimensional reconstruction is completed.

2. The method according to claim 1, characterized in that, In step (2), the galvanometer deflection angle The calibration plate is set at uniform intervals, and the movement distance along the Z-axis is controlled according to a preset step size.

3. The method according to claim 1, characterized in that, In step (3), the depth-first algorithm starts from the laser line seed point and recursively searches the complete stripe contour along the connected domain to eliminate noise interference areas.

4. The method according to claim 1, characterized in that, In step (3), the Weibull distribution calculates the point with the maximum gray probability density as the center coordinate of the stripe by fitting the gray attenuation characteristics of the laser stripe column direction.

5. The method according to claim 1, characterized in that, In step (5), the input feature dimension of the first layer of the BP neural network is 3-dimensional (u,v,q), and the output dimension is 2-dimensional. The input feature dimension of the second-level BP neural network is 5-dimensional. The output dimension is 1 dimension (Wz).

6. The method according to claim 1, characterized in that, After the three-dimensional coordinate extraction is completed in step (6), the galvanometer is controlled and the industrial camera scans the physical object to extract the center line point, and the three-dimensional point cloud of the object is obtained through the trained neural network model.

7. The method according to any one of claims 1-6, characterized in that, The method is applicable to three-dimensional shape measurement in industrial inspection, reverse engineering, robot vision, or precision manufacturing.