Deep learning and high dynamic range three-dimensional measurement method for metal surface with compound fringe pattern
Patent Information
- Application Number
- CN202611417004.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-14
- Publication Date
- 2026-10-16
AI Technical Summary
然而,现有研究大多侧重于对多幅正弦条纹的局部恢复,如何进一步提高测量效率,仅利用单幅采集图像即可实现失真区域的全面恢复并满足后续高精度相位求解的需求,仍然缺乏有效的解决方案
[0014] In summary, addressing the technical challenge of balancing accuracy and efficiency in traditional methods for metal parts where drastic changes in reflectivity lead to localized oversaturation or low contrast in stripes, this invention projects a single composite stripe pattern onto the surface of the object under test. A binocular camera then captures the surface-modulated deformed image, which is preprocessed and input into a pre-trained deep learning model. A multi-frequency, multi-step phase-shifted stripe image set is reconstructed from a single frame. Subsequently, phase demodulation and unwrapping are performed on the reconstructed stripe image set to obtain a binocular absolute phase map. Finally, stereo matching and 3D reconstruction are performed based on the absolute phase map to generate a high-precision 3D topography of the object's surface.
Smart Images

Figure CN122921058A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer vision and deep learning technology, specifically to a method for high dynamic range three-dimensional measurement of metal surfaces with composite stripes using deep learning. Background Technology
[0002] Fringe projection profilometry (FPP) has been widely used in industrial 3D measurement due to its advantages such as non-contact operation, high precision, and fast measurement speed. However, in actual industrial manufacturing scenarios, the surfaces of workpieces such as metals often have complex and non-uniform reflective characteristics: high reflectivity areas can easily lead to local oversaturation of deformed fringes acquired by the camera, while low reflectivity or shadowed areas can result in insufficient fringe modulation. Both situations cause serious loss of local fringe information. The reason for this is that commercial cameras have limited dynamic range, making it difficult to simultaneously capture the imaging needs of both high-reflectivity and low-reflectivity areas in a single exposure. This contradiction makes it difficult for traditional fringe projection methods to accurately acquire complete fringe information when dealing with high dynamic range (HDR) surfaces such as metals, leading to phase solution errors and resulting in large areas of holes or distortion in the reconstructed point cloud.
[0003] To address the aforementioned issues, existing research can be broadly categorized into two main types: hardware-based methods and algorithm-based methods. Hardware-based methods primarily suppress reflection interference by adjusting camera exposure time, projector brightness, or using auxiliary optical components such as polarizers. These methods can alleviate reflection problems to some extent, but they typically require additional hardware configurations or complex system calibrations, and often involve multiple exposures or the acquisition and fusion of multiple sets of parameters, resulting in a cumbersome measurement process that struggles to balance system cost and measurement efficiency. Algorithm-based methods, on the other hand, focus on recovering information about distorted areas from the acquired fringe images, such as through multi-exposure image fusion and adaptive fringe projection intensity adjustment to improve fringe quality. While these methods are flexible in implementation and less hardware-dependent, they usually still require additional pre-acquisition or feedback adjustment processes, making it difficult to simultaneously achieve accuracy, efficiency, and robustness in complex reflection scenarios.
[0004] In recent years, the rapid development of deep learning has provided new ideas for high dynamic range (HDR) fringe restoration. Compared with traditional methods, deep learning methods can directly learn the structural priors and contextual information of distorted regions from degraded fringe images, thereby achieving intelligent restoration of saturated and low-quality regions. Existing research has shown that deep learning-based fringe restoration methods have achieved significant results in restoring fringe patterns in overexposed or underexposed areas of metal surfaces. However, most existing research focuses on the local restoration of multiple sinusoidal fringes. How to further improve measurement efficiency and achieve comprehensive restoration of distorted regions using only a single acquired image while meeting the requirements of subsequent high-precision phase solving remains a challenge. Furthermore, in composite fringe coding, the limited grayscale dynamic range of commercial digital projectors means that multiple modulated fringes in a single frame of composite fringe share a limited grayscale dynamic range, leading to decreased fringe contrast, compressed phase information, and a tendency for phase breakage during the dephase resolution process. For traditional sinusoidal fringe coding patterns, distorted regions not only suffer from texture loss but also suffer from frequency component aliasing and phase shift information loss, making it difficult for traditional restoration methods to achieve satisfactory results.
[0005] In view of the above, this application is hereby submitted. Summary of the Invention
[0006] This invention provides a high dynamic range three-dimensional measurement method for metal surfaces using deep learning and composite stripes, which can at least partially improve the above-mentioned problems.
[0007] To achieve the above objectives, the present invention adopts the following technical solution: A high dynamic range three-dimensional measurement method for metal surfaces using deep learning and composite stripes, comprising: The binocular deformed image, modulated by the surface of the object under test, is acquired by the binocular camera module and input into the pre-trained MSA-UNet model to generate a multi-frequency multi-step phase-shifting stripe image set. The MSA-UNet model consists of three cascaded sub-networks: CNN1, CNN2, and CNN3. A multi-scale convolutional module is introduced into the bottleneck layer of each UNet network structure of the MSA-UNet model, and a SimAM module is embedded in the decoding end of each UNet network structure of the MSA-UNet model. Based on the frequency, the multi-frequency multi-step phase-shifting fringe image set is subjected to phase demodulation and phase unwrapping processing to obtain the absolute phase maps of the left and right sides of the binocular camera module; Stereo matching and 3D reconstruction are performed on the absolute phase maps of the left and right sides of the binocular camera module to generate the final 3D shape of the object under test. Before inputting the binocular deformed images into the pre-trained MSA-UNet model, the following training steps are also included: The relative positions of the binocular camera module and the digital projector are fixed, and the binocular camera module and the digital projector are jointly calibrated to obtain a set of calibration parameters for 3D reconstruction. Haar-like composite fringe patterns and preset standard phase-shift fringe patterns are sequentially projected onto the surfaces of metal objects with different reflective properties to obtain captured images acquired by the binocular camera module and construct a high-quality training dataset. Construct the MSA-UNet model and train it on a high-quality training dataset to obtain the trained MSA-UNet model.
[0008] Preferably, a binocular deformed image modulated by the surface of the object under test is acquired by a binocular camera module, and the binocular deformed image is input into a pre-trained MSA-UNet model to generate a multi-frequency, multi-step phase-shifting fringe image set, specifically: A pre-configured single HCFP pattern is projected onto the surface of the object under test using a pre-configured digital projector. The single HCFP pattern is generated based on the Haar principle transformation. The pre-configured left and right cameras are used to simultaneously acquire deformed images modulated by complex reflections, resulting in a first deformed image and a second deformed image. The binocular deformed image is generated based on a single HCFP pattern projected onto the surface of the object being measured. The first deformed image and the second deformed image are respectively subjected to Gamma distortion correction, and the corrected first deformed image and the second deformed image are respectively input into the pre-trained MSA-UNet model for frequency separation and phase shift prediction processing to generate a predicted multi-frequency multi-step phase shift stripe image set.
[0009] Preferably, the multi-frequency, multi-step phase-shifting fringe image set is subjected to phase demodulation and phase unwrapping processing based on frequency to obtain the absolute phase maps of the left and right sides of the binocular camera module, specifically: The four-step phase-shifting method was used to calculate the wrapping phase corresponding to each frequency in the multi-frequency multi-step phase-shifting fringe image set. Based on the wrapped phase, the phase unwrapping process is performed using the multi-frequency heterodyne method to obtain the absolute phase map of the left camera and the absolute phase map of the right camera. The difference frequency phase is calculated based on the wrapped phase, and the globally unique phase is calculated based on the difference frequency phase. Guided by the globally unique phase, the phase unwrapping is performed step by step in order of frequency from low to high to obtain the absolute phase map of the highest frequency.
[0010] Preferably, stereo matching and 3D reconstruction are performed on the absolute phase maps of the left and right sides of the binocular camera module to generate the final 3D shape of the object under test, specifically as follows: After obtaining the absolute phase maps of the left and right cameras, subpixel-level matching is performed on the absolute phase maps of the left and right cameras to obtain the disparity map. By combining the pre-acquired calibration parameter set and disparity map, the three-dimensional coordinates of each pixel on the surface of the object under test are calculated using the principle of triangulation, and a three-dimensional point cloud is generated. The 3D point cloud is filtered and denoised to complete the 3D shape reconstruction and obtain the final 3D shape of the measured object.
[0011] Preferably, the relative positions of the binocular camera module and the digital projector are fixed, and the binocular camera module and the digital projector are jointly calibrated to obtain a calibration parameter set for 3D reconstruction, specifically as follows: According to the preset position requirements, fix the relative position of the binocular camera module and the digital projector, and use the binocular camera module to acquire multiple sets of calibration images with different poses; The camera intrinsic parameters, camera extrinsic parameters, distortion coefficients, and joint calibration parameters of the digital projector and the binocular camera module were obtained using the Zhang Zhengyou calibration method, thus obtaining the calibration parameter set.
[0012] Preferably, a Haar-like composite fringe pattern and a preset standard phase-shift fringe pattern are sequentially projected onto the surfaces of metal objects with different reflective properties to obtain captured images acquired by the binocular camera module, thereby constructing a high-quality training dataset, specifically as follows: Multiple sets of frequency values are selected to generate basic sinusoidal fringes corresponding to each frequency. Each set of basic sinusoidal fringes is converted into a binary square wave image through a Haar-like transform, while retaining its clear periodic boundaries. The gray values at the same pixel position of each binary square wave image are added together and normalized to the gray range of [50, 230] to generate a Haar-like composite stripe pattern. The Haar composite stripe pattern and the preset standard phase-shift stripe pattern are sequentially projected onto the surfaces of metal objects with different reflective properties to obtain the captured image set acquired by the binocular camera module. The captured image set includes multiple reflection distortion images and multiple ground truth label images. Gamma distortion correction was applied to all images in the captured image set to construct a high-quality training dataset.
[0013] Preferably, an MSA-UNet model is constructed and trained on a high-quality training dataset to obtain a trained MSA-UNet model, specifically as follows: Construct the MSA-UNet model, in which the CNN1 subnetwork is a one-to-one UNet structure, the CNN2 subnetwork is a one-to-three UNet network structure, and the CNN3 subnetwork is a one-to-three UNet network structure. Based on a high-quality training dataset, the MSA-UNet model is trained using the TensorFlow framework until the total number of training epochs is reached or the loss converges to the preset requirements, at which point the training ends and the trained MSA-UNet model is obtained.
[0014] In summary, addressing the technical challenge of balancing accuracy and efficiency in traditional methods for metal parts where drastic changes in reflectivity lead to localized oversaturation or low contrast in stripes, this invention projects a single composite stripe pattern onto the surface of the object under test. A binocular camera then captures the surface-modulated deformed image, which is preprocessed and input into a pre-trained deep learning model. A multi-frequency, multi-step phase-shifted stripe image set is reconstructed from a single frame. Subsequently, phase demodulation and unwrapping are performed on the reconstructed stripe image set to obtain a binocular absolute phase map. Finally, stereo matching and 3D reconstruction are performed based on the absolute phase map to generate a high-precision 3D topography of the object's surface.
[0015] Compared to existing technologies, this invention offers the following significant advantages: It greatly improves measurement efficiency, requiring only a single projection and acquisition to predict all images needed for the multi-frequency, multi-step phase-shifting method from a single composite fringe pattern, significantly reducing the total time required and fully meeting online detection needs; it possesses excellent reflection restoration capabilities, with the model effectively extracting fringe features under complex reflection conditions through multi-scale convolution and a parameter-free attention mechanism, effectively suppressing phase errors, significantly improving point cloud coverage, and effectively eliminating holes caused by reflections and shadows; and it boasts excellent 3D reconstruction accuracy, with measurement errors for standard stepped blocks and spheres controlled within a very small range, and stable and reliable point cloud fitting accuracy. This invention provides a new solution for efficient 3D topography measurement in high-dynamic scenes and can be widely applied in industrial manufacturing, visual inspection, reverse engineering, and other fields. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the high dynamic range three-dimensional measurement method for metal surfaces using deep learning and composite stripes provided in this embodiment of the invention.
[0017] Figure 2 This is a schematic diagram of the hardware device for the high dynamic range three-dimensional measurement method of metal surfaces using deep learning and composite stripes provided in an embodiment of the present invention.
[0018] Figure 3 This is a comparison image of the grayscale distribution of sinusoidal stripes at a frequency of 80 Hz provided in an embodiment of the present invention. Figure 3 (a) in the image is the grayscale distribution of the non-reflective background area. Figure 3 (b) in the figure is the grayscale distribution map of the same row of the reflective area of the part.
[0019] Figure 4 This is a flowchart of the three-stage cascaded network training process provided in an embodiment of the present invention.
[0020] Figure 5 This is a schematic diagram of the overall structure and internal modules of the Multi-Scale Attention Network (MSA-UNet) provided in the embodiments of the present invention.
[0021] Figure 6 This is a flowchart of the dataset construction process provided in an embodiment of the present invention.
[0022] Figure 7 The image shows the typical three-dimensional reconstruction results of objects provided in the embodiments of the present invention. The image shows the original image, ideal image, and predicted image of the metal parts flange, L-shaped indexing handle, engine blade, and T-shaped gasket, as well as the corresponding three-dimensional point cloud.
[0023] Figure 8 This is a diagram showing the accuracy verification results of standard parts provided in an embodiment of the present invention. The diagram illustrates the measurement results and accuracy error analysis of a standard fourth-order steel block and a standard ceramic ball. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0025] refer to Figure 1 As shown, the first embodiment of the present invention discloses a method for high dynamic range three-dimensional measurement of metal surfaces using deep learning and composite stripes, which can be executed by a high dynamic range three-dimensional measurement device for metal surfaces using deep learning and composite stripes (hereinafter referred to as the measurement device). Specifically: Please see Figure 2 First, the hardware configuration needs to be set up. This requires two Imaging Source DFK33UX252 industrial cameras (1600×1200 pixels, 20fps) and one V1i digital projector (1600×1200 pixels). The measuring equipment can be equipped with an Intel(R) Core(TM) I5-12400F CPU (2.50GHz) and an NVIDIA RTX 4070 GPU (12GB VRAM). The system parameters are as follows: field of view... The working distance (from camera to the object being measured) is approximately 630 mm.
[0026] Specifically, the following method is executed by one or more processors within the measuring device: S1. Acquire the binocular deformed image modulated by the surface of the object under test, which is collected by the binocular camera module, and input the binocular deformed image into the pre-trained MSA-UNet model to generate a multi-frequency multi-step phase-shifting stripe image set. The MSA-UNet model consists of three cascaded sub-networks, namely CNN1 sub-network, CNN2 sub-network, and CNN3 sub-network. A multi-scale convolution module is introduced into the bottleneck layer of each UNet network structure of the MSA-UNet model, and a SimAM module is embedded in the decoding end of each UNet network structure of the MSA-UNet model. Specifically, step S1 further includes: projecting a preset single HCFP pattern onto the surface of the object being measured using a pre-configured digital projector, wherein the HCFP pattern is generated based on the Haar principle transformation (i.e., a Haar-like transformation), that is, the single HCFP pattern is generated based on the commodity principle transformation. The pre-configured left and right cameras are used to simultaneously acquire deformed images modulated by complex reflections, resulting in a first deformed image and a second deformed image. The binocular deformed image is generated based on a single HCFP pattern projected onto the surface of the object being measured. The first deformed image and the second deformed image are respectively subjected to Gamma distortion correction, and the corrected first deformed image and the second deformed image are respectively input into the pre-trained MSA-UNet model for frequency separation and phase shift prediction processing to generate a predicted multi-frequency multi-step phase shift stripe image set.
[0027] In this embodiment, a pre-configured single-frame HCFP pattern is projected onto the surface of the object under test using a pre-configured digital projector. This single-frame HCFP pattern is generated based on the product principle transformation. The advantage of using a single-frame composite stripe pattern for projection is that multiple frequency stripe information can be encoded into a single frame image with only one projection, avoiding the time overhead of sequentially projecting multiple sets of stripes of different frequencies in traditional methods, thus significantly improving measurement efficiency. Subsequently, pre-configured left and right cameras are used to simultaneously acquire deformed images modulated by complex reflections, resulting in a first deformed image and a second deformed image. The binocular deformed image is generated based on the projection of the single-frame HCFP pattern onto the surface of the object under test. Due to the large difference in reflectivity in different areas of the metal surface, high reflectivity areas are prone to local oversaturation in the images acquired by the camera, while low reflectivity or shadowed areas are prone to low stripe contrast. Therefore, the acquired first and second deformed images will contain stripe distortion areas of varying degrees. The binocular synchronous acquisition method can acquire deformed stripe information of the object surface from two different perspectives, providing sufficient image data for subsequent stereo matching and 3D reconstruction.
[0028] After acquiring the first and second deformed images, gamma distortion correction is performed on both. Due to the inherent nonlinear response between commercial digital projectors and industrial cameras, there is a deviation between the directly acquired stripe grayscale values and the ideal values. This deviation directly affects the accuracy of subsequent phase calculations. Gamma distortion correction effectively eliminates the nonlinear effects of the projection-acquisition link, restoring the image grayscale response to the linear range, thus providing high-quality input data for subsequent deep learning model inference. The corrected first and second deformed images are sequentially input into the pre-trained MSA-UNet model for frequency separation and phase shift prediction. The MSA-UNet model adopts a three-sub-network cascade structure: the first-level sub-network is used to restore the distorted composite stripe region, supplementing the stripe information missing due to oversaturation or low contrast; the second-level sub-network is used to achieve frequency separation of the composite stripes, extracting sinusoidal stripe components of different frequencies from the restored composite stripes; the third-level sub-network is used for phase shift prediction, generating corresponding multi-step phase shift images based on the extracted sinusoidal stripes of each frequency. Through the aforementioned three-stage cascaded processing, a set of predicted multi-frequency, multi-step phase-shift fringe images is finally generated. This image set contains all the fringe information required for subsequent phase calculation, equivalent to the multi-frequency, multi-step phase-shift fringe maps that traditional methods require multiple projections and acquisitions to obtain. Furthermore, the MSA-UNet model introduces a multi-scale convolution module and a parameter-free attention mechanism. The former captures local pixel details and global contextual information through convolutional branches with different receptive fields, effectively improving the extraction accuracy of fringe features under complex reflective conditions; the latter adaptively allocates channels and spatial weights based on the neuron energy function, effectively suppressing invalid high-brightness artifacts. These mechanisms together ensure the quality of fringe reconstruction in high dynamic range scenarios on metal surfaces, ensuring that even in areas with drastic changes in reflectivity, the predicted fringe images maintain accurate grayscale distribution and phase information, laying a reliable foundation for subsequent high-precision phase calculation and 3D reconstruction.
[0029] Please refer to Figure 3 HCFP fringes and sinusoidal fringes with a frequency of 80 were projected onto the surface of a part with a reflective area. Fringes from both the non-reflective background area and the reflective area of the part were analyzed, and their grayscale distribution curves are shown below. Figure 6 As shown in the figure, the grayscale curves of HCFP fringes exhibit significant abrupt changes at their periodic boundaries in both the background and reflective areas. This indicates that HCFP fringes possess strong anti-reflective capabilities, providing rich information for subsequent deep learning and resulting in better fringe quality.
[0030] Specifically, taking three frequency groups (F1=80, F2=70, and F3=61) as an example, a single HCFP pattern is projected onto the surface of the object being measured using a digital projector. Two monochrome cameras simultaneously acquire images of deformed fringe patterns modulated by the object's surface. The HCFP images acquired by the left and right cameras are then corrected for Gamma distortion and input into the trained MSA-UNet model. Within 2.14 seconds, 12 standard three-frequency, four-step phase-shifted fringe images are output from each side. The deformed fringe images are diffused into three frequency groups, and each frequency group undergoes four shifts, thus obtaining 12 standard three-frequency, four-step phase-shifted fringe images, generating a predicted multi-frequency, multi-step phase-shifted fringe image set.
[0031] S2, based on the frequency, perform phase demodulation and phase unwrapping processing on the multi-frequency multi-step phase-shifting fringe image set to obtain the absolute phase maps of the left and right sides of the binocular camera module; Specifically, step S2 further includes: using the four-step phase-shifting method to calculate the wrapping phase corresponding to each frequency in the multi-frequency multi-step phase-shifting fringe image set; Based on the wrapped phase, the phase unwrapping process is performed using the multi-frequency heterodyne method to obtain the absolute phase map of the left camera and the absolute phase map of the right camera. The difference frequency phase is calculated based on the wrapped phase, and the globally unique phase is calculated based on the difference frequency phase. Guided by the globally unique phase, the phase unwrapping is performed step by step in order of frequency from low to high to obtain the absolute phase map of the highest frequency.
[0032] In this embodiment, after generating a predicted multi-frequency, multi-step phase-shifted fringe image set using the MSA-UNet model, phase demodulation and phase unwrapping processing are performed on the image set according to frequency to obtain the absolute phase maps of the left and right sides of the binocular camera module. Specifically, a four-step phase-shifting method is first used to calculate the wrapped phase corresponding to each frequency in the multi-frequency, multi-step phase-shifted fringe image set. The four-step phase-shifting method effectively suppresses the interference of ambient light and the difference in reflectivity of the object surface on phase extraction by combining four fringe images with sequentially shifted phases at each frequency, thereby solving for the principal phase value wrapped in the interval [-π, π] at each frequency. Since this phase value is truncated within a periodic range, it cannot be directly used for 3D reconstruction, so further phase unwrapping processing is required.
[0033] Based on the calculated wrapped phase, phase unwrapping is performed using the multi-frequency heterodyne method to obtain the absolute phase maps of the left and right cameras, respectively. In practice, the difference-frequency phase is first calculated based on the wrapped phase; that is, the wrapped phases at different frequencies are subtracted to generate a difference-frequency phase map with a lower frequency and a larger period. Since the period of the difference-frequency phase is effectively extended, its principal phase value is no longer constrained by the narrow period of the single-frequency fringes, thus covering the entire measurement field of view without additional periods. Based on this, a globally unique phase is further calculated based on the difference-frequency phase. This globally unique phase does not have periodic repetition throughout the measurement space and can therefore serve as reliable guiding information. Subsequently, using this as a guide, the wrapped phases are unwrapped level by level, expanding the wrapped phases corresponding to each frequency from low to high frequencies, ultimately obtaining the absolute phase map of the highest frequency (i.e., using the globally unique phase as a guide, phase unwrapping is performed level by level in ascending order of frequency to obtain the absolute phase map of the highest frequency). This step-by-step untangling strategy significantly improves the robustness of phase unfolding, preventing phase jump errors caused by local reflections or shadows from being propagated to the final reconstruction result, thus ensuring the accuracy and continuity of the absolute phase.
[0034] Specifically, taking three frequency groups (F1=80, F2=70, F3=61) as an example, the wrap-around phase of these three frequencies is calculated using a four-step phase shift method, and the formula is as follows: The following were obtained: the wrap-around phase of the first group of frequencies. The second set of frequencies wrapping phase The third group of frequencies wrapping phase ; The wrap-around phase of the nth frequency group. Let be the grayscale value at the pixel corresponding to the fringe image at the nth frequency and the i-th phase shift. Then, phase unwrapping / time phase unwrapping is performed using the multi-frequency heterodyne method (corresponding to the three-frequency heterodyne method) to obtain the absolute phase maps of the left and right cameras. First, the difference frequency phase is calculated. and Then calculate the globally unique phase. Guided by this, we unpacked the package step by step to obtain the highest frequency (i.e., the first set of frequencies). The absolute phase map is obtained by unwrapping the phases step by step according to the frequency from low to high, guided by the globally unique phase, to obtain the absolute phase map of the highest frequency. Based on this step, the absolute phase maps of the left and right cameras are calculated.
[0035] Please see Figure 7 S3 performs stereo matching and 3D reconstruction on the absolute phase maps of the left and right sides of the binocular camera module to generate the final 3D shape of the object under test.
[0036] Specifically, step S3 further includes: after obtaining the absolute phase map of the left camera and the absolute phase map of the right camera, performing sub-pixel level matching on the absolute phase map of the left camera and the absolute phase map of the right camera to obtain a disparity map. By combining the pre-acquired calibration parameter set and disparity map, the three-dimensional coordinates of each pixel on the surface of the object under test are calculated using the principle of triangulation, and a three-dimensional point cloud is generated. The 3D point cloud is filtered and denoised to complete the 3D shape reconstruction and obtain the final 3D shape of the measured object.
[0037] In this embodiment, after obtaining the absolute phase maps corresponding to the left and right sides of the binocular camera module, stereo matching and 3D reconstruction are performed based on the left and right absolute phase maps to generate the final 3D shape of the measured object. Specifically, subpixel-level matching is first performed on the absolute phase maps of the left and right cameras to obtain a disparity map. Since the left and right cameras capture the same object surface from different perspectives, the pixel position of the same spatial point in the left and right images is laterally offset. This offset is the disparity, which is directly related to the depth information of the object surface. Through the constraints of the absolute phase map, the corresponding matching point in the right image can be accurately searched for each pixel in the left image along the epipolar direction. Compared with the matching method based directly on image grayscale, the absolute phase-based matching method has higher robustness and anti-interference ability, and can effectively cope with the texture deficiency problem caused by the uneven reflectivity of the metal surface. Furthermore, the subpixel-level matching strategy can subdivide the matching position based on integer pixel positions, so that the matching accuracy reaches the subpixel level, thereby significantly improving the smoothness and continuity of the disparity map and providing a reliable guarantee for subsequent high-precision 3D coordinate calculation.
[0038] After obtaining the disparity map, the three-dimensional coordinates of each pixel on the surface of the object are calculated using triangulation principles, based on the pre-acquired calibration parameter set and the disparity map, to generate a three-dimensional point cloud. Specifically, the calibration parameter set includes the intrinsic and extrinsic parameters and projection matrix of the binocular camera module. These parameters describe the relative pose relationship between the left and right cameras and the camera imaging model. For each pixel in the disparity map, a mapping relationship from image pixel coordinates to three-dimensional coordinates in world space can be established using triangulation principles, thereby calculating the three-dimensional coordinates of the corresponding spatial point on the object's surface pixel by pixel. This method efficiently generates a dense three-dimensional point cloud covering the entire field of view, completely restoring the spatial geometric information of the object's surface.
[0039] After generating the 3D point cloud, filtering and denoising are performed. Due to factors such as environmental noise, camera acquisition noise, and matching errors, the initially generated 3D point cloud inevitably contains some outliers and random noise, which affect the smoothness and accuracy of the 3D shape. Filtering effectively removes outliers caused by matching errors or noise interference while preserving the main geometric features of the object's surface. Denoising further smooths the fine undulations on the point cloud surface, making the reconstructed result closer to the real object's shape. After the above filtering and denoising processes, the 3D shape reconstruction is completed, ultimately obtaining a complete and accurate 3D shape of the measured object, providing a reliable data foundation for subsequent industrial inspection, reverse engineering, and other applications.
[0040] Preferably, before inputting the binocular deformed image into the pre-trained MSA-UNet model, the following training steps are also included: S01, fix the relative positions of the binocular camera module and the digital projector, and perform joint calibration of the binocular camera module and the digital projector to obtain a set of calibration parameters for 3D reconstruction; Specifically, step S01 further includes: fixing the relative positions of the binocular camera module and the digital projector according to preset position requirements, and using the binocular camera module to acquire multiple sets of calibration images with different poses; The camera intrinsic parameters, camera extrinsic parameters, distortion coefficients, and joint calibration parameters of the digital projector and the binocular camera module were obtained using the Zhang Zhengyou calibration method, thus obtaining the calibration parameter set.
[0041] In this embodiment, the relative positions of the binocular camera and the projector are fixed, and a 9×12 checkerboard calibration board (square side length 10mm) is used. For example, the calibration board is moved to 15 different poses (including different angles, distances, and tilts), and calibration images of the left and right cameras are acquired simultaneously. The Zhang Zhengyou calibration method is used to solve for the camera's intrinsic parameters (focal length, principal point coordinates), extrinsic parameters (rotation matrix, translation vector), and radial distortion coefficients. The checkerboard pattern is projected through the projector to complete the joint calibration of the projector and the binocular camera, and all parameters required for the system's 3D reconstruction are obtained.
[0042] Specifically, the relative positions of the binocular camera module and the digital projector are first fixed, and then jointly calibrated to obtain a set of calibration parameters for 3D reconstruction. Specifically, according to preset position requirements, the binocular camera module and the digital projector are fixed on a stable support to ensure that the relative poses of the three remain unchanged during subsequent measurements. Then, the binocular camera module is used to acquire multiple sets of calibration images with different poses. In an optional implementation, a checkerboard calibration board can be used as the calibration target. By moving the calibration board to different positions, angles, and tilts, the pattern on the calibration board can exhibit rich pose changes in the binocular camera's field of view, thereby providing sufficient constraint information for calibration calculations.
[0043] After acquiring a sufficient number of calibration images in different poses, the Zhang Zhengyou calibration method was used to process these images. This method establishes a mapping relationship between two-dimensional image points and three-dimensional spatial points by detecting corner features in the calibration images, and then solves for the camera intrinsic parameters, camera extrinsic parameters, and distortion coefficients of the binocular camera module. The camera intrinsic parameters include inherent parameters such as the camera's focal length and principal point coordinates, describing the camera's own imaging characteristics; the camera extrinsic parameters include rotation matrices and translation vectors, describing the relative pose relationship between the left and right cameras in the binocular camera module; the distortion coefficients are used to correct image distortion caused by radial and tangential lens distortion, improving the accuracy of image coordinates. Based on this, a checkerboard pattern or coded pattern is projected using a digital projector to complete the joint calibration of the digital projector and the binocular camera module, obtaining the projection matrix and coordinate transformation relationship between the projector and the camera, thus obtaining a complete set of calibration parameters.
[0044] The calibration parameter set obtained through the above calibration process provides a precise mathematical basis for converting disparity information into three-dimensional spatial coordinates in subsequent steps. Accurate calibration parameters can effectively reduce systematic errors in 3D reconstruction and are an important prerequisite for ensuring the accuracy of the final 3D topography measurement.
[0045] Please see Figure 6 S02, Haar-like Composite Fringe Pattern (HCFP) and a preset standard phase-shift fringe pattern are sequentially projected onto the surfaces of metal objects with different reflective properties to obtain the captured images acquired by the binocular camera module and construct a high-quality training dataset; Specifically, step S02 further includes: selecting multiple sets of frequency values, generating basic sinusoidal fringes corresponding to each frequency, converting each set of basic sinusoidal fringes into a binary square wave image through a Haar-like transform, and preserving its clear periodic boundaries. The gray values at the same pixel position of each binary square wave image are added together and normalized to the gray range of [50, 230] to generate a Haar-like composite stripe pattern. The Haar composite stripe pattern and the preset standard phase-shift stripe pattern are sequentially projected onto the surfaces of metal objects with different reflective properties to obtain the captured image set acquired by the binocular camera module. The captured image set includes multiple reflection distortion images and multiple ground truth label images. Gamma distortion correction was applied to all images in the captured image set to construct a high-quality training dataset (containing distorted stripe inputs and ideal diffuse stripe labels).
[0046] In this embodiment, firstly, a Haar-like composite fringe pattern and a preset standard phase-shift fringe pattern are sequentially projected onto the surfaces of metal objects with different reflectivity to acquire captured images from the binocular camera module, thus constructing a high-quality training dataset. Specifically, multiple sets of frequency values are selected to generate basic sinusoidal fringes corresponding to each frequency. The selected multiple sets of frequency values have different periodic distributions in space, which can provide multi-level phase constraints from coarse to fine in subsequent phase calculations, effectively expanding the unambiguous phase measurement range. Based on this, each set of basic sinusoidal fringes is converted into a binary square wave image through a Haar-like transform, while retaining its clear periodic boundaries. Compared with traditional sinusoidal fringes, the binary square wave image has significant gray-level jump characteristics at the periodic boundaries. This steep edge information is easier to recognize and learn in deep learning models. At the same time, when the pattern is projected onto the reflective area of the metal surface, even if local oversaturation occurs, the boundary position can still be accurately preserved due to the large gray-level difference between adjacent areas of the square wave pattern, thereby improving the network's ability to recover the fringe features of distorted areas.
[0047] Subsequently, the grayscale values at the same pixel location in each binary square wave image are summed and normalized to the grayscale range of [50, 230] to generate a Haar-like composite fringe pattern. This superposition and normalization process fuses multiple sets of fringe information at different frequencies into a single frame image, allowing a single composite fringe pattern to carry frequency information that would otherwise require multiple images to fully represent, providing an information basis for subsequent multi-frequency phase calculations under single-frame acquisition conditions. Further, the Haar-like composite fringe pattern and a preset standard phase-shifted fringe pattern are sequentially projected onto the surfaces of metal objects with different reflective properties. In this process, when projecting a Haar-like composite fringe pattern, the binocular camera module simultaneously acquires deformed images modulated by the reflectivity of the object's surface. These images contain various local distortions caused by oversaturation in high-reflectivity areas and insufficient contrast in low-reflectivity areas of the metal surface. These distorted images serve as input samples in the training set. After spraying a developer to create an ideal diffuse reflective surface, the same Haar-like composite fringe pattern is projected again, and images are acquired. At this point, the diffuse reflective surface eliminates reflective interference, resulting in an ideal grayscale distribution, which serves as the ground truth label image for the first-level network. Furthermore, under diffuse reflective conditions, a standard four-step phase-shift fringe pattern is sequentially projected, and images are acquired to obtain a multi-frequency, multi-step phase-shift diffuse reflective fringe pattern, which serves as the ground truth label images for the second and third-level networks. This operational method ensures that the input images and label images in the training dataset correspond precisely at the pixel level, providing high-quality supervision signals for the deep learning model.
[0048] After acquiring the captured image set, gamma distortion correction is performed on all images in the set. The nonlinear response between the projector and camera causes the fringe grayscale to deviate from the ideal value, and this deviation is further amplified in high dynamic range scenarios on metallic surfaces. Gamma distortion correction effectively eliminates the nonlinear effects of the projection-acquisition link, restoring the image's grayscale response to a near-linear state, thereby significantly reducing the systematic error between the input and label images. After this processing, a high-quality training dataset is finally constructed, providing an accurate and reliable data foundation for the subsequent training of the MSA-UNet model.
[0049] Specifically, taking three frequency groups (F1=80, F2=70, F3=61 respectively) as an example, the frequency selection criterion F that satisfies multi-frequency time-phase unwrapping is... 123 =(80-70)-(70-61)=1. Generate the basic sine fringes. n=1,2,3 This represents the basic sinusoidal fringe corresponding to the nth frequency at pixel (x, y). The sinusoidal fringe is converted into a binary square wave using a Haar-like transform: or , Let W be the binary square wave corresponding to the nth frequency at pixel (x, y), where (x, y) is the coordinate of an arbitrary pixel on the projected stripe pattern, and W is the image width. For the first The group frequencies correspond to the initial phase of the fringes. Finally, the fringes are superimposed and normalized to generate an HCFP. , It is a composite stripe pattern similar to that of Haar. This is the binary square wave corresponding to the first group of frequencies. This is the binary square wave corresponding to the second group of frequencies. This is a binary square wave corresponding to the third group of frequencies. The final HCFP pattern has only four discrete gray values: 50, 110, 170, and 230. The gray values change significantly at the periodic boundaries. That is, it is normalized to the gray range of [50, 230] to generate an HCFP pattern (one image) containing only four discrete gray values: 50, 110, 170, and 230, in order to avoid Gamma nonlinear distortion.
[0050] Composite and sinusoidal stripes were projected onto the surfaces of metal parts with varying reflectivity to capture images with reflectivity distortion. Subsequently, a developer was sprayed at the same location to create an ideal diffuse reflective surface, and ground truth labeled images were captured. A high-quality training dataset was constructed after Gamma distortion correction of all captured images.
[0051] Specifically, the sample parts selected included circular and square planar parts (such as spring washers, T-shaped washers, and stepped steps), freeform surface parts (such as engine blades, curved surface washers, and spheres), and intersecting parts (such as handles). Using 30 different parts, including simple planar and complex curved surface parts, each part was placed in 40 different poses at the center of the measurement field of view, resulting in 1200 sets of sample data for different reflective conditions, forming a real dataset. This dataset was divided into training, validation, and test sets in an 8:1:1 ratio. All images were pixel-normalized to [0,1] and cropped to a uniform size. For each pose of the object being measured, three sets of images were required: one set consisted of images of composite stripes projected directly onto the reflective object, with different reflective areas. This image was then Gamma-corrected and used as input to the network. The creation process is as follows... Figure 6 As shown in (a) above. Another set consists of images captured after spraying developer onto a reflective object, projecting composite stripes, and then photographing the image. This image is captured on a diffuse surface, so there are no reflective areas. It is also gamma-corrected and used as the label for the first-order network, i.e., the ideal ground truth (GT). The fabrication process is as follows: Figure 6As shown in (b) of the diagram. The third group, like the second, involved spraying a developer, projecting a four-step phase-shift pattern, and capturing images. These images, after Gamma correction, served as labels for the second and third-order networks. The fabrication process is as follows: Figure 6 As shown in (c), the dataset is divided into training, validation, and test sets in an 8:1:1 ratio. To accommodate network input, all samples are cropped to... The resolution is adjusted to avoid loss of detail at the stripe period boundaries due to image scaling.
[0052] Please see Figures 4 to 5 S03, Construct the MSA-UNet model. Train the MSA-UNet model based on a high-quality training dataset to obtain the trained MSA-UNet model.
[0053] Specifically, step S03 further includes: constructing an MSA-UNet model, wherein the MSA-UNet model consists of three cascaded sub-networks, namely CNN1 sub-network, CNN2 sub-network, and CNN3 sub-network. CNN1 sub-network (distorted composite stripe information recovery) is a one-to-one UNet structure, recovering distorted composite stripe information; the input is a single distorted HCFP image, and the output is a high-quality HCFP image with recovered information. CNN2 sub-network (frequency separation network) is a one-to-three UNet network structure, performing frequency separation on the composite stripes; the input is the output of CNN1, and the output is three sinusoidal stripes of different frequencies. CNN3 sub-network (phase shift prediction network) is a one-to-three UNet network structure; the input is the output of CNN2, and the output is three additional phase-shifted images corresponding to each frequency (with phase shifts of...). , , ); Based on a high-quality training dataset, the MSA-UNet model (Multi-scale Attention Network) was trained using the TensorFlow framework until the total number of training epochs was reached or the loss converged to a preset requirement. The trained MSA-UNet model was then used to achieve distortion stripe recovery, frequency separation, and phase shift prediction. Specifically, a multi-scale convolution module (MC) was introduced into the bottleneck layer of each UNet network structure in the MSA-UNet model. Parallel convolutional branches with different receptive fields were used to extract and fuse local pixel details, transition edge structures in reflective areas, and global contextual information. A SimAM module (Simple, Parameter-Free Attention Module) was embedded at the decoding end of each UNet network structure in the MSA-UNet model. The decoding layer used a transposed convolution upsampling + SimAM module structure, adaptively allocating channel and spatial weights based on the neuron energy function to suppress ineffective highlight artifacts. The encoding layer employed a convolution + batch normalization + Leaky encoding method. The ReLU structure uses the ReLU activation function in its output layer to ensure that the output grayscale value is non-negative.
[0054] The training parameters are designed as follows: the optimizer is the RMSprop optimizer, the batch size is 1, and the initial learning rate is... The momentum factor is 0.9, and the weight decay coefficient is... The batch size was set to 1, and the total number of training epochs was 400. The mean squared error loss function (MSELoss) was used, with the negative slope coefficient of Leaky ReLU fixed at 0.01. An early stopping strategy was employed during training to prevent overfitting, and the training loss converged to 2.59 × 10⁻⁶. -5 The loss was verified to converge to 3.94 × 10⁻⁶. -5 .
[0055] In this embodiment, firstly, an MSA-UNet model is constructed, which consists of three cascaded sub-networks: CNN1, CNN2, and CNN3. CNN1 is a one-to-one UNet structure, taking a single distorted composite stripe image as input and outputting a high-quality composite stripe image with restored information, used for pixel-level restoration of distorted composite stripe regions. CNN2 is a one-to-three UNet structure, taking the output of CNN1 as input and outputting three sets of sinusoidal stripes of different frequencies, used for effective separation of different frequency components in the composite stripes. CNN3 is a one-to-three UNet structure, taking the output of CNN2 as input and outputting three additional phase-shifted images corresponding to each frequency, used for phase-shifted image prediction. This three-level cascaded structure allows each sub-network to focus on its specific task objective, avoiding the optimization difficulties caused by a single network undertaking multiple tasks simultaneously, thereby effectively improving the overall model's processing accuracy and stability.
[0056] In each UNet network structure of the MSA-UNet model, the encoding layer adopts a "convolution + batch normalization + LeakyReLU" structure. This structure progressively expands the receptive field through layer-by-layer downsampling, extracting multi-level features from local details to global context in the striped image. A multi-scale convolution module is introduced at the bottleneck layer. This module uses multiple parallel convolutional branches with different receptive fields to capture local pixel details, transition edge structures in reflective areas, and global contextual semantic information, respectively, and fuses the features extracted at different scales. This multi-scale feature extraction strategy effectively enhances the network's adaptability to distorted regions of different sizes under complex reflective conditions, enabling the network to maintain good recovery performance when facing large saturated areas and small low-contrast areas. The decoding layer employs transposed convolution upsampling to progressively restore the spatial resolution of the feature map. Simultaneously, a SimAM module is embedded. This module adaptively allocates channels and spatial weights based on the neuron's energy function, recalibrating the feature response without introducing additional learnable parameters. This effectively suppresses ineffective highlight artifacts and highlights key features related to stripe phase information. The output layer uses the ReLU activation function to ensure that the output grayscale value is non-negative, which conforms to the physical constraints of image pixel grayscale.
[0057] Based on the high-quality training dataset constructed above, the MSA-UNet model was trained using the TensorFlow framework. During training, the samples in the training dataset were divided into training, validation, and test sets according to a preset ratio. The training set was used to update network parameters, the validation set was used to monitor the model's generalization performance on unseen data and adjust hyperparameters in a timely manner, and the test set was used to finally evaluate the model's overall performance. During model training, the mean squared error loss function was used as the objective function for optimization. The network weights were iteratively updated using backpropagation and gradient descent algorithms until the total number of training epochs was reached or the loss converged to a preset requirement, at which point training ended, resulting in the trained MSA-UNet model. An early stopping strategy was used during training to prevent overfitting, ensuring that the model maintained its generalization ability to new samples while achieving good recovery performance. The finally trained MSA-UNet model can stably output a high-quality set of multi-frequency, multi-step phase-shifting stripe images from a single-input distorted composite stripe image.
[0058] Please see Figure 8 In this embodiment, to further verify the effectiveness of the method, measurements of standard ceramic sphere pairs and fourth-order standard steel blocks were performed. Specifically, the standard ceramic sphere pair measurement involved two standard ceramic spheres (radii RA=19.0396mm and RB=19.0332mm, center-to-center distance D=100.0968mm). The point cloud fitting radii of the two spheres were measured as RA=19.0328mm, RB=19.0648mm, and center-to-center distance D=100.0576mm, with an average measurement error of less than 0.05mm. The RMSE of the two point cloud spheres were 0.0177mm and 0.0247mm, respectively, with an RMSE less than 0.03mm. The fourth-order standard steel block measurement involved standard steel blocks with step heights of 2.50mm, 5.00mm, and 10.00mm. The average measured heights were 2.48mm, 4.98mm, and 9.95mm, respectively, with an average measurement error of less than 0.05mm. The RMSE measured on the surface of each step were 0.0166mm, 0.0183mm, 0.0208mm, and 0.0199mm, respectively, all less than 0.03mm.
[0059] In summary, this method leverages the advantages of HCFP stripes, combining gamma correction with a carefully designed deep learning network structure to achieve efficient, high-precision, and high dynamic range 3D topography reconstruction. It relates to a high dynamic range (HDR) approach for surfaces with complex reflective properties, such as metals, and is applicable to fields such as industrial manufacturing, visual inspection, and reverse engineering.
[0060] Compared with existing technologies, this method has the following advantages: 1. Significantly improved measurement efficiency: Only a single projection and acquisition is required to predict the 12 images needed for the three-frequency four-step phase-shifting method from a single composite fringe. Compared with traditional methods, the total time is reduced by more than 70%, meeting the needs of online detection.
[0061] 2. Excellent reflection restoration capability: The MC and SimAM modules introduced in the MSA-UNet network effectively improve the accuracy of stripe feature extraction under complex reflective conditions. Experiments show that this method can control the mean absolute error (MAE) of the absolute phase of the metal surface to within 0.05 rad, and increase the average point cloud coverage to over 98.5%, significantly eliminating holes caused by reflections and shadows.
[0062] 3. Excellent 3D reconstruction accuracy: The average absolute error of the measurement of the height of the standard metal step block and the radius of the standard ceramic sphere are both controlled within 0.05mm; the RMSE of each measuring point to the fitting surface calculated from the point cloud plane of the standard step block and the point cloud spherical surface of the standard ceramic sphere is stable within 0.03mm.
[0063] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for high dynamic range three-dimensional measurement of metal surfaces using deep learning and composite stripes, characterized in that, include: The binocular deformed image, modulated by the surface of the object under test, is acquired by the binocular camera module and input into the pre-trained MSA-UNet model to generate a multi-frequency multi-step phase-shifting stripe image set. The MSA-UNet model consists of three cascaded sub-networks: CNN1, CNN2, and CNN3. A multi-scale convolutional module is introduced into the bottleneck layer of each UNet network structure of the MSA-UNet model, and a SimAM module is embedded in the decoding end of each UNet network structure of the MSA-UNet model. Based on the frequency, the multi-frequency multi-step phase-shifting fringe image set is subjected to phase demodulation and phase unwrapping processing to obtain the absolute phase maps of the left and right sides of the binocular camera module; Stereo matching and 3D reconstruction are performed on the absolute phase maps of the left and right sides of the binocular camera module to generate the final 3D shape of the object under test. Before inputting the binocular deformed images into the pre-trained MSA-UNet model, the following training steps are also included: The relative positions of the binocular camera module and the digital projector are fixed, and the binocular camera module and the digital projector are jointly calibrated to obtain a set of calibration parameters for 3D reconstruction. Haar-like composite fringe patterns and preset standard phase-shift fringe patterns are sequentially projected onto the surfaces of metal objects with different reflective properties to obtain captured images acquired by the binocular camera module and construct a high-quality training dataset. Construct the MSA-UNet model and train it on a high-quality training dataset to obtain the trained MSA-UNet model.
2. The method for high dynamic range three-dimensional measurement of metal surfaces using deep learning and composite stripes according to claim 1, characterized in that, The binocular deformable image, modulated by the surface of the object under test and acquired by the binocular camera module, is obtained and input into the pre-trained MSA-UNet model to generate a multi-frequency, multi-step phase-shifting fringe image set. Specifically: A pre-configured single HCFP pattern is projected onto the surface of the object being measured using a pre-configured digital projector. The HCFP pattern is generated based on the Haar principle transformation. The pre-configured left and right cameras are used to simultaneously acquire deformed images modulated by complex reflections to obtain a first deformed image and a second deformed image. The binocular deformed image is generated based on a single HCFP pattern projected onto the surface of the object being measured. Gamma distortion correction is performed on the first deformed image and the second deformed image respectively. The corrected first deformed image and the second deformed image are then input into the pre-trained MSA-UNet model for frequency separation and phase shift prediction processing to generate a predicted multi-frequency multi-step phase shift stripe image set.
3. The method for high dynamic range three-dimensional measurement of metal surfaces using deep learning and composite stripes according to claim 2, characterized in that, Based on the frequency, phase demodulation and phase unwrapping processing are performed on the multi-frequency, multi-step phase-shifting fringe image set to obtain the absolute phase maps of the left and right sides of the binocular camera module, specifically: The four-step phase-shifting method was used to calculate the wrapping phase corresponding to each frequency in the multi-frequency multi-step phase-shifting fringe image set. Based on the wrapped phase, the phase unwrapping process is performed using the multi-frequency heterodyne method to obtain the absolute phase map of the left camera and the absolute phase map of the right camera. The difference frequency phase is calculated based on the wrapped phase, and the globally unique phase is calculated based on the difference frequency phase. Guided by the globally unique phase, the phase unwrapping is performed step by step in order of frequency from low to high to obtain the absolute phase map of the highest frequency.
4. The method for high dynamic range three-dimensional measurement of metal surfaces using deep learning and composite stripes according to claim 3, characterized in that, Stereo matching and 3D reconstruction are performed on the absolute phase maps of the left and right sides of the binocular camera module to generate the final 3D shape of the object under test, specifically: After obtaining the absolute phase maps of the left and right cameras, subpixel-level matching is performed on the absolute phase maps of the left and right cameras to obtain the disparity map. By combining the pre-acquired calibration parameter set and disparity map, the three-dimensional coordinates of each pixel on the surface of the object under test are calculated using the principle of triangulation, and a three-dimensional point cloud is generated. The 3D point cloud is filtered and denoised to complete the 3D shape reconstruction and obtain the final 3D shape of the measured object.
5. The method for high dynamic range three-dimensional measurement of metal surfaces using deep learning and composite stripes according to claim 1, characterized in that, The relative positions of the binocular camera module and the digital projector are fixed, and the binocular camera module and the digital projector are jointly calibrated to obtain a set of calibration parameters for 3D reconstruction, specifically: According to the preset position requirements, fix the relative position of the binocular camera module and the digital projector, and use the binocular camera module to acquire multiple sets of calibration images with different poses; The camera intrinsic parameters, camera extrinsic parameters, distortion coefficients, and joint calibration parameters of the digital projector and the binocular camera module were obtained using the Zhang Zhengyou calibration method, thus obtaining the calibration parameter set.
6. The method for high dynamic range three-dimensional measurement of metal surfaces using deep learning and composite stripes according to claim 1, characterized in that, Haar-like composite fringe patterns and preset standard phase-shift fringe patterns are sequentially projected onto the surfaces of metal objects with different reflective properties. Images captured by the binocular camera module are then obtained to construct a high-quality training dataset, specifically: Multiple sets of frequency values are selected to generate basic sinusoidal fringes corresponding to each frequency. Each set of basic sinusoidal fringes is converted into a binary square wave image through a Haar-like transform, while retaining its clear periodic boundaries. The gray values at the same pixel position of each binary square wave image are added together and normalized to the gray range of [50, 230] to generate a Haar-like composite stripe pattern. The Haar composite stripe pattern and the preset standard phase-shift stripe pattern are sequentially projected onto the surfaces of metal objects with different reflective properties to obtain the captured image set acquired by the binocular camera module. The captured image set includes multiple reflection distortion images and multiple ground truth label images. Gamma distortion correction was applied to all images in the captured image set to construct a high-quality training dataset.
7. The method for high dynamic range three-dimensional measurement of metal surfaces using deep learning and composite stripes according to claim 1, characterized in that, The MSA-UNet model is constructed by training it on a high-quality training dataset to obtain a trained MSA-UNet model. Specifically: Construct the MSA-UNet model, in which the CNN1 subnetwork is a one-to-one UNet structure, the CNN2 subnetwork is a one-to-three UNet network structure, and the CNN3 subnetwork is a one-to-three UNet network structure. Based on a high-quality training dataset, the MSA-UNet model is trained using the TensorFlow framework until the total number of training rounds is reached or the loss converges to the preset requirements, at which point the training ends and the trained MSA-UNet model is obtained.