Complex surface structure light three-dimensional measurement method and storage medium

By constructing a training sample set and training a fringe fusion network using a joint loss function, the problem of complementary information between high and low exposure fringe patterns in structured light measurement of complex surfaces was solved, achieving high-precision 3D reconstruction results.

CN123181532APending Publication Date: 2026-11-27LOW SPEED AERODYNAMIC INST OF CHINESE AERODYNAMIC RES & DEV CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611603968.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-16
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Traditional surface structured light measurement techniques struggle to balance the complementary information from high and low exposure stripes on complex surfaces, resulting in large phase calculation errors, missing point clouds, and an inability to achieve high-precision 3D reconstruction.

Method used

A training sample set is constructed, and a stripe fusion network is trained using a joint loss function, which includes image intensity loss, stripe modulation loss, and wrapping phase loss. The wrapping phase is calculated by the phase shift method and the phase is unfolded to reconstruct the three-dimensional shape.

Benefits of technology

It effectively improves the measurement accuracy and reconstruction integrity of structured light 3D measurement on complex surfaces, reduces phase distortion and point cloud holes, and enhances the reliability of 3D reconstruction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123181532A_ABST
    Figure CN123181532A_ABST
Patent Text Reader

Abstract

The application discloses a complex surface structure light three-dimensional measurement method and a storage medium, and relates to the technical field of optical measurement. First, a training sample set containing original high-exposure phase shift fringe sequences, low-exposure phase shift fringe sequences and reference diffuse reflection phase shift fringe sequences treated by a developer under the same posture is constructed. Then, a combined loss function covering image intensity loss, fringe modulation loss and wrapped phase loss is used to train a fringe fusion network. During actual measurement, high-exposure phase shift fringe sequences and low-exposure phase shift fringe sequences of an object to be measured under the same posture are collected and input into the trained fringe fusion network, and a complete fused phase shift fringe sequence is directly output. Finally, wrapped phase solving and phase unwrapping are completed based on the fused phase shift fringe sequence, and the three-dimensional appearance of the object to be measured is reconstructed. The application effectively improves the measurement accuracy, reconstruction integrity and reliability of complex surface structure light three-dimensional measurement of metals, ice layers and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of optical measurement technology, specifically to a method and storage medium for three-dimensional measurement of complex surface structure light. Background Technology

[0002] Fringe projection profilometry (FPP)-based surface structured light 3D measurement projects periodically coded sinusoidal fringes onto the surface of the object under test and uses a camera to collect deformed fringes to reconstruct the object's 3D shape. This technology offers advantages such as non-contact operation, full-field coverage, high precision, and high measurement efficiency, and has been widely applied in industrial inspection, reverse engineering, precision manufacturing, and aerospace. In a typical phase-shift measurement system, the projector sequentially projects sinusoidal fringes with different phase shifts, and the camera records the phase-shifted fringe sequence reflected from the object's surface. Subsequently, the object's 3D coordinates are obtained through phase demodulation, phase unwrapping, and system calibration. The grayscale variations, modulation depth, and relative relationships between phase-shifted frames of the fringes directly affect the accuracy of phase calculation; therefore, high-quality fringe acquisition is fundamental to reliable 3D reconstruction.

[0003] However, in real-world industrial and specialized scenarios, many measured surfaces often possess complex and non-uniform reflective properties. Highly reflective objects such as metals, ice layers, polished parts, and smooth plastics are prone to both localized overexposure and underexposure. In overexposed areas, the camera's grayscale response, once saturated, no longer reflects the true light intensity changes, leading to the loss of effective fringe information. In underexposed areas, the fringe modulation and signal-to-noise ratio decrease, making phase calculations more sensitive to noise. These degradations disrupt the ideal sinusoidal relationship of the phase-shifted fringes, resulting in phase errors, an increase in invalid points, and localized point cloud defects.

[0004] Traditional high dynamic range stripe restoration techniques are mainly divided into three categories: traditional numerical algorithms, traditional multi-exposure pixel fusion, and basic deep learning fusion.

[0005] Numerical restoration algorithms, such as phase correction methods based on multi-frequency heterodyne and Fourier-Hilbert transform, only perform post-processing correction on the already distorted positions, without repairing the degraded fringes from the source. The inherent errors carried by saturated / weak fringes will be propagated downwards, resulting in limited improvement in reconstruction accuracy. Furthermore, additional multi-frequency patterns are required, leading to low measurement efficiency.

[0006] Multi-exposure fusion methods adaptively select exposure time through statistical histograms and fuse stripes based on modulation intensity in single-frame weighted fusion. These methods process each stripe image independently frame by frame, severing the fixed phase shift correlation within the entire phase shift sequence. Frame-by-frame fusion easily disrupts the sinusoidal matching relationship between the 12 phase shift frames, and the phase consistency of the fused stripes cannot be guaranteed. At the same time, relying solely on manually fixing the fusion weights makes it difficult to adaptively match the complementary stripe information requirements of different reflective and scattering regions.

[0007] Deep learning-based multi-exposure fusion schemes often employ dual-branch networks that only input raw high- and low-exposure single-frame images, lacking pre-correction mechanisms for exposure defects and failing to differentiate between saturated highlight areas and weak scattering areas for targeted compensation. The networks perform only single-layer feature fusion, unable to achieve layered repair of same-exposure defects or cross-exposure information complementarity. During training, they often only use pixel grayscale as a single loss constraint, failing to incorporate fringe modulation and wrapping phase into the network's optimization objectives. The networks prioritize optimal visual effects, failing to adapt to the physical constraints of phase demodulation, and lack ground-value supervision samples that closely match real-world imaging conditions. They rely heavily on simulated images for training, resulting in deviations from real camera noise, projection nonlinearity, and object scattering and reflection characteristics.

[0008] Furthermore, most traditional high-reflectivity fringe fusion methods are designed only for purely metallic mirror-like objects, failing to consider complex surfaces such as ice layers with semi-transmissive or volume scattering characteristics. Ice bodies simultaneously exhibit specular reflection, internal transmission, and random scattering effects, resulting in more complex fringe degradation patterns than metal surfaces. The "Cheta Nong" algorithm struggles to simultaneously suppress saturation truncation and scattering clutter, leading to significant issues of sparse point cloud reconstruction and large-area missing data.

[0009] In summary, traditional surface structured light measurement technology cannot simultaneously meet the needs of inter-frame phase constraint of complete phase shift sequence, targeted repair of high and low exposure stripes, phase-guided network training, and compatible measurement of various complex surfaces such as metals and ice layers. There is still considerable room for improvement in the integrity of 3D reconstruction and measurement accuracy. Summary of the Invention

[0010] The purpose of this application is to provide a three-dimensional measurement method and storage medium for structured light on complex surfaces, in order to solve the problem of low measurement accuracy and integrity of structured light on complex surfaces.

[0011] To achieve the above objectives, the first aspect of this application provides a method for three-dimensional measurement of complex surface structures using light, comprising: A training sample set is obtained, which includes the original high-exposure phase-shift fringe sequence, the original low-exposure phase-shift fringe sequence, and the reference diffuse reflection phase-shift fringe sequence acquired after the training object is treated with a surface developer. The stripe fusion network is trained using a joint loss function to obtain a trained stripe fusion network. The joint loss function includes at least image intensity loss, stripe modulation loss, and wrapping phase loss. Acquire high-exposure phase-shift fringe sequences and low-exposure phase-shift fringe sequences of the object under test in the same orientation; The high-exposure phase-shift stripe sequence and the low-exposure phase-shift stripe sequence of the object under test are input into the trained stripe fusion network to predict and output a complete fused phase-shift stripe sequence. Based on the fused phase-shifted fringe sequence, the wrapping phase is calculated using the phase-shifting method and phase unfolding is performed to reconstruct the three-dimensional shape of the object under test.

[0012] A second aspect of this application provides a computer-readable storage medium storing a program that can be loaded by a processor and executed using the aforementioned method for three-dimensional measurement of complex surface structures.

[0013] The beneficial effects of this application are: This application first constructs a training sample set containing the original high-exposure phase-shift fringe sequence and low-exposure phase-shift fringe sequence under the same pose, as well as a reference diffuse reflection phase-shift fringe sequence obtained by developer treatment. This provides a supervised reference for network training that closely matches real imaging noise and object reflectivity. Then, a joint loss function encompassing image intensity loss, fringe modulation loss, and wrapping phase loss is used to train the fringe fusion network. This constrains the network output from multiple dimensions, including pixel grayscale, fringe contrast, and phase consistency, avoiding the destruction of the inherent inter-frame phase relationship of the phase-shift fringes by solely pursuing visual image effects. During actual measurement, high-exposure and low-exposure phase-shift fringe sequences under the same pose of the object under test are acquired and input into the trained fringe fusion network. The network directly outputs a complete fused phase-shift fringe sequence, fully utilizing the complementary information between the two exposure fringes to suppress overexposure and degradation of fringes caused by complex, highly reflective surfaces. Finally, the wrapping phase is solved and the phase is unfolded based on this fused phase-shift fringe sequence to reconstruct the three-dimensional shape of the object under test. This application, through the combined effect of the above steps, effectively improves the problems of insufficient measurement accuracy and low reconstruction integrity in the structural light 3D measurement of complex surfaces such as metals and ice layers, reduces phase distortion, point cloud voids and contour discontinuities, and improves the reliability of 3D reconstruction of complex reflective surfaces.

[0014] Other features and advantages of this application will be described in detail in the following detailed description section. Attached Figure Description

[0015] Figure 1 This is a flowchart illustrating a method for measuring the structure of complex surfaces using light in an embodiment of this application. Figure 2 This is a schematic diagram of the overall architecture of a stripe fusion network provided in the embodiments of this application; Figure 3 This is a schematic diagram of an exposure correction module architecture provided in an embodiment of this application; Figure 4 This application provides a schematic diagram of phase fringe comparison results for multiple sets of complex reflective metal specimens in an embodiment; Figure 5 This is a comparative schematic diagram of stripe grayscale profiles from different methods provided in the embodiments of this application; Figure 6 This is a schematic diagram of metal test objects with different geometric structures and surface reflection characteristics provided in the embodiments of this application; Figure 7 This is a comparative schematic diagram of three-dimensional reconstruction results of a metal plate provided in the embodiments of this application; Figure 8 This is a comparative diagram of the three-dimensional reconstruction results of a dumbbell plate provided in the embodiments of this application; Figure 9 This is a comparative schematic diagram of the three-dimensional reconstruction results of a double-slot metal plate provided in the embodiments of this application; Figure 10 This is a comparative schematic diagram of the three-dimensional reconstruction results of a cylindrical curved metal provided in the embodiments of this application; Figure 11 This is a schematic diagram of a different ice layer sample provided in the embodiments of this application; Figure 12 This is a visual comparison diagram of different stripe images provided in the embodiments of this application; Figure 13 This is a comparative diagram of three-dimensional reconstruction results of frost and ice provided in the embodiments of this application; Figure 14 This is a comparative diagram of the three-dimensional reconstruction results of Mingbing provided in the embodiments of this application; Figure 15 This is a comparative schematic diagram of three-dimensional reconstruction results of mixed ice provided in the embodiments of this application; Figure 16 This is a schematic diagram showing a comparison of ablation test results provided in an embodiment of this application; Figure 17 This is a schematic diagram of a complex surface structure light three-dimensional measurement device provided in the embodiments of this application. Detailed Implementation

[0016] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0017] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified. Details are set forth in the following description for illustrative purposes. It should be understood that those skilled in the art will recognize that this application can be implemented without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid unnecessarily obscuring the description of this application. Therefore, this application is not intended to be limited to the embodiments shown, but rather to be consistent with the broadest scope of the principles and features disclosed herein.

[0018] Figure 1 This is a flowchart illustrating a method for measuring the structure of complex surfaces using light in an embodiment of this application. Figure 1 As shown, this method for measuring complex surface structures using optical three-dimensional measurement can include steps 101-105, which will be described in detail below.

[0019] Step 101: Obtain the training sample set. The training sample set includes the original high-exposure phase-shift fringe sequence, the original low-exposure phase-shift fringe sequence, and the reference diffuse reflection phase-shift fringe sequence acquired after the training object has been treated with a surface developer.

[0020] A phase-shifted fringe sequence refers to a set of multiple sinusoidal coded fringe images generated according to a phase-shifting algorithm. The embodiment in this application is a 12-step phase-shifted fringe sequence, with a fixed phase offset relationship between the fringes of each frame, which is the basis for solving the phase using the phase-shifting method. "Same pose" means that the position and angle of the training object remain unchanged, and the internal and external parameters and relative spatial positions of the projector and camera do not change, ensuring that the pixels of the fringe images acquired under different exposure conditions correspond one-to-one.

[0021] During sample acquisition, the camera projector system calibration parameters were kept constant, and the training object remained stationary. Camera exposure parameters were switched sequentially to acquire the original high-exposure phase-shift fringe sequence and the original low-exposure phase-shift fringe sequence. The original high-exposure phase-shift fringe sequence is a collection of phase-shift fringe images acquired using a longer exposure time. It exhibits a high signal-to-noise ratio in dark areas, but is prone to grayscale saturation truncation in highly reflective areas. The original low-exposure phase-shift fringe sequence is a collection of phase-shift fringe images acquired using a shorter exposure time. It can suppress saturation issues in specular highlight areas, but the signal-to-noise ratio decreases in weakly reflective areas.

[0022] Subsequently, without moving the training object, a thin layer of high diffuse reflectance developer is uniformly sprayed onto its surface, without altering the object's geometry, to obtain a reference diffuse reflectance phase-shifting fringe sequence. This reference diffuse reflectance phase-shifting fringe sequence is obtained by spraying a thin layer of developer onto the training object's surface without changing its pose, eliminating specular reflection effects, and acquiring true, ideal fringes without saturation distortion, which serve as the ground truth label for network training. A sample set consists of the above three sets of fringe sequences paired together. Multiple sets of samples with different shapes and reflectance characteristics are collected in batches to construct a complete training sample set.

[0023] This application uses paired samples acquired under the same orientation to ensure strict alignment of high-exposure phase-shift fringes, low-exposure phase-shift fringes, and reference ground truth pixels. Using the real physically acquired image obtained by spraying developer as the ground truth, distinct from simulated samples, it can realistically incorporate camera noise, projector nonlinear response, and complex reflection characteristics of objects, reducing domain bias between simulation and real-world scenes and improving the network's generalization ability in practical engineering scenarios.

[0024] Step 102: Train the stripe fusion network using the joint loss function to obtain the trained stripe fusion network.

[0025] The joint loss function includes at least image intensity loss, fringe modulation loss, and wrapping phase loss. Image intensity loss constrains the grayscale pixel difference between the fused fringe output and the reference diffuse fringe, ensuring the output fringe grayscale distribution closely approximates the ideal fringe. Fringe modulation loss characterizes the degree of brightness fluctuation in the fringe, constraining the fused fringe to retain a good sinusoidal oscillation amplitude and avoiding fringe contrast decay and blurring. Wrapping phase loss applies error constraints between the wrapping phase obtained from the fused fringe solution and the wrapping phase obtained from the reference ground truth fringe, directly supervising network optimization from the phase dimension, not limited to image visual effects.

[0026] Specifically, the original high-exposure phase-shifted fringe sequences and the original low-exposure phase-shifted fringe sequences from the training sample set are input into the fringe fusion network, and the network predicts and outputs a fused phase-shifted fringe sequence. Image intensity loss, fringe modulation loss, and wrapping phase loss are calculated separately, and then weighted and summed to obtain the joint loss function. Backpropagation is used to iteratively update all network parameters of the fringe fusion network until the loss converges, resulting in the trained fringe fusion network.

[0027] The stripe fusion network comprises an exposure correction module, a multi-branch feature extraction module, a same-exposure SwinTransformer Block (VSTB), a bidirectional cross-exposure SwinTransformer Block (CSTB), and an adaptive weight compensation module. The original high-exposure phase-shifted stripe sequences and the original low-exposure phase-shifted stripe sequences are directly fed into the feature extraction module, while the other path passes through the exposure correction module to obtain the corrected stripe sequence, forming four feature inputs. These inputs undergo same-exposure feature interaction and cross-exposure bidirectional feature fusion, and then detail compensation is achieved through an adaptive weight mask, resulting in a complete fused phase-shifted stripe sequence output end-to-end.

[0028] During training, image intensity loss constrains pixel grayscale consistency. Stripe modulation loss prevents stripe smoothing and contrast loss after fusion. Wrapping phase loss solves the wrapping phase using fused stripes and reference stripes respectively, constraining the phase error and aligning the network optimization objective with the phase solving task, rather than merely pursuing image visual appeal.

[0029] This step employs a multi-dimensional joint loss function, simultaneously constraining the network output from three levels: pixel grayscale, stripe quality, and phase results. This overcomes the defect of "the image looks normal, but the phase solution is distorted" caused by single-pixel loss. A customized four-branch attention network is used to compensate for high-exposure saturation defects and low-exposure dark area noise using the exposure correction module. A two-level attention mechanism then completes the repair of same-exposure defects and the complementarity of cross-exposure information, fully mining the effective information of double-exposure stripes and providing a reliable model foundation for stripe reconstruction on complex reflective surfaces.

[0030] Step 103: Obtain the high-exposure phase-shift fringe sequence and the low-exposure phase-shift fringe sequence of the object under test in the same posture.

[0031] The object under test is one with complex reflective properties, exhibiting both highly specularly reflective areas and weakly reflective areas on its surface, such as polished metal parts or ice surfaces. Similarly, keeping the camera and projector system calibration parameters constant, the object is placed within the measurement field of view and its pose is fixed. The projector projects the same set of phase-shift coded fringes. By switching the camera's high-exposure and low-exposure parameters, high-exposure and low-exposure phase-shift fringe sequences of the object under test are acquired. The acquisition process does not change the object's position or the projected pattern; only the camera exposure time is varied.

[0032] Only two exposures are needed to acquire two sets of phase-shifted fringe sequences, eliminating the need for additional projection of multiple sets of coded patterns. The acquisition process is simple and maintains measurement efficiency. Each set of fringes retains a portion of effective information: the high exposure preserves information in dark areas, while the low exposure suppresses saturation in bright areas, providing complementary raw data for subsequent network fusion.

[0033] Step 104: Input the high-exposure phase-shift fringe sequence and low-exposure phase-shift fringe sequence of the object under test into the trained fringe fusion network, predict and output a complete fused phase-shift fringe sequence.

[0034] The fused phase-shift fringe sequence is a complete set of phase-shift fringe images output by the network. Each frame is a fringe image reconstructed after information fusion. The entire sequence maintains the fixed phase shift relationship between the original phase shifts and can be directly used for phase shift phase calculation. The acquired high-exposure and low-exposure phase-shift fringe sequences are directly input into the already trained and converged fringe fusion network. The network sequentially performs exposure correction, four-way feature extraction, same-exposure VSTB feature interaction, CSTB bidirectional cross-exposure feature fusion, and adaptive weight mask weighting compensation, directly outputting a complete fused phase-shift fringe sequence end-to-end without intermediate manual intervention.

[0035] Thus, by completing fringe reconstruction and fusion end-to-end through the network, the problem of grayscale saturation truncation in bright areas caused by high exposure is suppressed, while the deficiency of insufficient signal-to-noise ratio in dark and weak areas under low exposure conditions is compensated for. The entire output sequence fully preserves the inherent inter-frame phase correspondence of the phase-shifted fringes, avoiding the severing of phase-shift temporal correlation by traditional frame-by-frame fusion methods. The output results can be directly used for subsequent phase calculations.

[0036] Step 105: Based on the fused phase-shifted fringe sequence, calculate the wrapping phase using the phase-shifting method and perform phase unwrapping to reconstruct the three-dimensional shape of the object under test.

[0037] The wrapping phase is obtained by solving the phase shift algorithm. A periodically truncated phase distribution, where the phase value is restricted to... Interval. Phase unrolling is the process of eliminating wrapped phases. The transition is used to recover a continuous absolute phase map. 3D topography reconstruction refers to converting the absolute phase of each pixel into 3D point cloud coordinates based on the principle of triangulation, using pre-calibrated camera-projector system parameters, to obtain the 3D topography of the object's surface.

[0038] Using the fused phase-shifted fringe sequence output from step 104, the full-field encapsulation phase is calculated pixel-by-pixel using the phase-shift solution formula. A phase unwrapping algorithm is then used to unwrap the encapsulated phase, resulting in a continuous absolute phase distribution. Based on pre-calibrated system parameters, the absolute phase of the two-dimensional image pixels is mapped to three-dimensional spatial coordinates, generating a three-dimensional point cloud of the object's surface and completing the three-dimensional topography reconstruction.

[0039] Phase calculations are performed based on the improved fused phase-shifted fringe sequence, reducing phase errors caused by fringe saturation and signal-to-noise ratio degradation, minimizing phase unfolding errors, point cloud holes, and contour distortion, and improving the accuracy and reconstruction integrity of 3D measurements of complex, highly reflective surfaces.

[0040] This application first constructs a training sample set containing the original high-exposure phase-shift fringe sequence and low-exposure phase-shift fringe sequence under the same pose, as well as a reference diffuse reflection phase-shift fringe sequence obtained by developer treatment. This provides a supervisory reference for network training that closely matches real imaging noise and object reflectivity. Then, a joint loss function encompassing image intensity loss, fringe modulation loss, and wrapping phase loss is used to train the fringe fusion network. This constrains the network output from multiple dimensions, including pixel grayscale, fringe contrast, and phase consistency, avoiding the destruction of the inherent inter-frame phase relationship of the phase-shift fringes by solely pursuing visual image effects. During actual measurement, high-exposure and low-exposure phase-shift fringe sequences under the same pose of the object under test are acquired and input into the trained fringe fusion network. The network directly outputs a complete fused phase-shift fringe sequence, fully utilizing the complementary information between the two exposure fringes to suppress overexposure and degradation of fringes caused by complex, highly reflective surfaces. Finally, the wrapping phase is solved and the phase is unfolded based on this fused phase-shift fringe sequence to reconstruct the three-dimensional shape of the object under test. This application, through the combined effect of the above steps, effectively improves the problems of insufficient measurement accuracy and low reconstruction integrity in the structural light 3D measurement of complex surfaces such as metals and ice layers, reduces phase distortion, point cloud voids and contour discontinuities, and improves the reliability of 3D reconstruction of complex reflective surfaces.

[0041] In step 101, the same training object is placed within the measurement field of view. Under a first pose that maintains the relative spatial position of the training object and the measurement device unchanged, the original high-exposure phase-shift fringe sequence and the original low-exposure phase-shift fringe sequence are acquired as input sample pairs. The first pose refers to the pose state where the relative spatial position and angle between the training object, the projector, and the industrial camera are completely fixed. The camera, projector's intrinsic and extrinsic parameters, and system calibration parameters remain constant to ensure a one-to-one mapping of image pixel coordinates across different acquisition stages, preventing pixel misalignment caused by pose shifts.

[0042] While maintaining the initial orientation, the surface of the training object is treated with a developer to give it approximate diffuse reflection characteristics. The developer treatment involves uniformly spraying a thin layer of diffuse reflection developer onto the object's surface without altering its geometric dimensions, thus masking the object's original specular reflection properties and transforming the surface into an approximate Lambertian diffuse reflection surface. This spraying operation only changes the surface's optical reflection properties and does not cause any deformation of the object.

[0043] While maintaining the initial pose, a reference diffuse phase-shift fringe sequence is acquired as a supervised reference sample. This sequence is a 12-step phase-shift fringe sequence acquired after the object has been treated with a developer. This sequence eliminates the specular overexposure of the original object, reproduces the ideal fringe response under the real projection camera imaging chain, and is used as a supervised ground truth sample for network training. The supervised reference sample, the reference diffuse phase-shift fringe sequence acquired after developer treatment, serves as the ground truth label for network training and is used to calculate various loss functions.

[0044] The training sample set is constructed by pixel-level alignment of the original high-exposure phase-shift fringe sequence, the original low-exposure phase-shift fringe sequence, and the reference diffuse phase-shift fringe sequence corresponding to the same training object. Pixel-level alignment is achieved because the first pose remains unchanged throughout the process, and theoretically, the pixels in the image naturally correspond one-to-one. Sub-pixel image registration is then used to correct minor deviations, ensuring that the input sample pairs and the same physical space point in the supervised reference samples strictly correspond to the same pixel coordinate in the image. The input sample pairs are the original high-exposure phase-shift fringe sequence and the original low-exposure phase-shift fringe sequence acquired under the same first pose, and these two are paired as the input data for the network.

[0045] In step 102, the input sample pairs (original high-exposure phase-shifted stripe sequence and original low-exposure phase-shifted stripe sequence) from a set of training samples are first input into the stripe fusion network. The stripe fusion network undergoes exposure correction to obtain the corrected high-exposure sequence and the corrected low-exposure sequence, forming four input branches. After four-branch feature encoding, VSTB same-exposure feature interaction, CSTB bidirectional cross-exposure feature fusion, and CBAM residual compensation, the predicted fused phase-shifted stripe sequence is output.

[0046] Figure 2 This is a schematic diagram of the overall architecture of a stripe fusion network provided in an embodiment of this application. Figure 2 As shown, the input to the stripe fusion network is a high-exposure 12-step phase-shift image sequence. and a low-exposure 12-step phase-shift image sequence The high-exposure phase-shift image sequence is directly fed into the feature encoder to obtain features. Another path passes through the high-exposure correction module to obtain the corrected high-exposure sequence. Then it is fed into the feature encoder to obtain the features. .feature , Input VSTB same-exposure window attention interaction block, output features The low-exposure phase-shift image sequence is directly fed into the feature encoder to obtain features. The other path passes through the low-exposure correction module to obtain the corrected high-exposure sequence. Then it is fed into the feature encoder to obtain the features. .feature , Input VSTB same-exposure window attention interaction block, output features . and Input the CSTB bidirectional cross-exposure window attention fusion block. , They also pass through the CBAM attention module to generate corresponding weight masks. , The CSTB output features are sequentially passed through a fusion encoder and a fusion decoder to obtain the fused features. . Fusing features Weighted mask , The original input branch information is weighted and the residuals are superimposed to form the final 12-step phase-shifted image sequence. . Figure 2 The forward inference data flow of the fringe fusion network is shown. During the network training phase, the fused 12-step phase-shifted image sequence output by the fringe fusion network and the supervised reference samples are fed into the loss calculation module to perform orthogonal phase-shift demodulation, modulation depth calculation, and wrapping phase calculation. The image intensity loss, fringe modulation depth loss, and wrapping phase loss are solved, and the joint loss function is obtained by weighting. Then, the loss function is updated through backpropagation. Figure 2 All trainable parameters are present within the stripe fusion network. The loss calculation and backpropagation process belong to the computational logic of the training phase and are not shown in the architecture diagram.

[0047] Secondly, based on the fused phase-shifted fringe sequence and the supervised reference sample of the predicted output, image intensity loss, fringe modulation loss, and wrapping phase loss are calculated respectively. In one example, the quadrature phase-shift demodulation algorithm is used to demodulate the fused phase-shifted fringe sequence and the supervised reference sample respectively, obtaining the predicted cosine component and the predicted sine component, as well as the true cosine component and the true sine component. The quadrature phase-shift demodulation algorithm is designed for... Phase determination algorithm for step-shift fringe sequences, in this embodiment By weighted summing of the grayscale values ​​of each frame with the sine and cosine basis functions of the phase shift angle, the cosine and sine components of the fringe signal are separated. This is the standard algorithm for determining demodulation and wrapping phase in phase-shift profilometry. The demodulation process involves multiplying each frame of the phase-shift sequence with its corresponding cosine and sine phase shift angle values, summing the results, and then multiplying by a normalization coefficient.

[0048] Based on the predicted cosine and sine components, the predicted fringe modulation amplitude and predicted wrapping phase are calculated. Similarly, based on the true cosine and sine components, the true fringe modulation amplitude and true wrapping phase are calculated. The predicted cosine and sine components are obtained by performing quadrature phase-shift demodulation on the fused phase-shifted fringe sequence output by the network; these are used for subsequent calculations of the predicted modulation index and predicted wrapping phase. The true cosine and sine components are obtained by performing quadrature phase-shift demodulation on the supervised reference sample (reference diffuse phase-shifted fringe sequence), serving as the truth base for the phase and modulation index.

[0049] The fringe modulation amplitude is a physical quantity that characterizes the amplitude of the fringe oscillations, reflecting the effective signal-to-noise ratio of the fringe signal. A higher modulation index (MOI) results in more pronounced sinusoidal fringe characteristics and stronger noise immunity in subsequent phase calculations. If the MOI is attenuated after fusion processing, it will directly increase the phase error. The fringe modulation amplitude is calculated by taking the square root of the sum of the squares of the cosine and sine components. The phase angle is calculated using the four-quadrant arctangent function, based on the negative sine and cosine components.

[0050] Next, three types of losses are calculated: image intensity loss, stripe modulation loss, and wrapping phase loss. Image intensity loss measures the pixel-by-pixel grayscale deviation between the network's output fused stripes and the ground truth stripes. Stripe modulation loss is the pixel-level error between the predicted modulation and the ground truth modulation, constraining the network from smoothing out stripe brightness fluctuations for visual smoothing and protecting the stripe oscillation amplitude. Wrapping phase loss (cosine distance loss) uses the phase cosine distance as a phase difference metric. Specifically, stripe modulation loss is the difference between the modulation of the predicted output fused phase-shifted stripe sequence and the modulation of the supervised reference sample, while wrapping phase loss is the cosine distance between the predicted wrapping phase calculated based on the predicted output fused phase-shifted stripe sequence and the true wrapping phase calculated based on the supervised reference sample.

[0051] Specifically, the pixel-level grayscale difference between the fused phase-shifted fringe sequence and the supervised reference sample is calculated as the image intensity loss. This embodiment employs Charbonnier loss, a smoothing variant of L1 loss, which can suppress the interference of individual abnormal noise points and singular pixels in the image on gradient updates. The difference between the predicted fringe modulation amplitude and the true fringe modulation amplitude is calculated as the fringe modulation loss. The difference between the predicted wrapping phase and the true wrapping phase is calculated as the wrapping phase loss. Because the wrapping phase exists... For periodic jumps, directly subtracting phase values ​​will introduce large spurious errors at the phase jump boundaries. (Cosine distance) Can be eliminated The computational defects caused by the jump actually reflect the angular deviation between the two phases.

[0052] Finally, the image intensity loss, stripe modulation loss, and wrapping phase loss are weighted and summed to obtain the joint loss function, which is then used for backpropagation to update the model parameters of the stripe fusion network. The fusion result of the phase-shifted stripe sequences should not only approximate the reference sequence in the grayscale intensity domain but also maintain the consistency of stripe modulation amplitude and wrapping phase. Using only pixel-level reconstruction loss may yield visually smooth results but cannot directly constrain the sinusoidal response relationship between phase-shifted frames. Therefore, this embodiment of the application combines the image intensity loss, stripe modulation amplitude loss, and wrapping phase loss to impose a phase-shift consistency constraint on the network output. The joint loss function is the total loss obtained by weighting and summing the image intensity loss, stripe modulation loss, and wrapping phase loss with weight coefficients respectively. The total loss is then backpropagated to the stripe fusion network through the backpropagation algorithm to iteratively update all trainable parameters of the network.

[0053] For example, backpropagation is performed using a joint loss function, and the AdamW optimizer is used to update all model parameters of the stripe fusion network. Gradient norm truncation is set to prevent gradient explosion. Training is iteratively repeated, with the total loss metric monitored on a validation subset. Training stops when the validation set loss tends to converge and no longer decreases significantly, resulting in the trained stripe fusion network. During training, the network input and output are both complete 12-step phase shift sequences. The inherent phase shift relationship between each phase shift frame is preserved throughout the training iterations, and individual stripe frames are not trained as independent images.

[0054] For phase-shifted sequences cosine components Sine component They are represented as follows: ; .in, Indicates the first Frame phase-shifted image, This represents the phase shift step number, where A is the background light intensity. Indicates the stripe tone system, Indicates the phase of the package. This represents noise and non-ideal imaging errors. In the embodiments of this application, N=12.

[0055] Based on the quadrature phase shift demodulation, the cosine components can be obtained. Sine component : ; Furthermore, the fringe modulation amplitude and package phase It can be represented as: ; ;in, To prevent numerically unstable minimal constants.

[0056] Let the fusion phase shift sequence and developer reference sequence predicted by the network be respectively... and Define the spatial pixel domain of a single phase-shifted image. for: ; .

[0057] Image intensity loss Using Charbonnier loss: ;in, The smoothing coefficient is used. The Charbonnier loss is... A smoothed loss form can reduce the impact of local outlier errors on network training.

[0058] To maintain the consistency of fringe contrast between the fused sequence and the reference sequence, fringe modulation loss Defined as: ;in, and These represent the fringe modulation levels calculated from the predicted and reference sequences, respectively. This loss directly constrains the modulation amplitude of the phase-shifted fringes, helping to reduce the fringe contrast attenuation caused by the fusion process.

[0059] Because the package phase has Periodicity means that directly using absolute error may lead to problems. and The boundary position produces an unreasonably large error. Therefore, the embodiments of this application use a cosine form to construct the wrapping phase loss. : ;in, and These represent the package phases calculated from the predicted sequence and the reference sequence, respectively. This form can describe the periodic differences between package phases, avoiding the impact of phase jumps on loss calculation.

[0060] Finally, the joint loss function is expressed as: ;in, , and These represent the weights of image intensity loss, modulation amplitude loss, and wrapping phase loss, respectively. By jointly constraining the grayscale intensity, fringe modulation, and wrapping phase of the phase-shifted sequence, the network output can simultaneously meet the requirements of image reconstruction quality and phase demodulation accuracy, thus providing reliable input for subsequent phase unwrapping and 3D reconstruction.

[0061] This application embodiment simultaneously constructs a triple physical constraint on the phase encompassing the grayscale stripe modulation of the image. It not only optimizes the visual effect of the image but also overcomes the defects caused by the loss of pixel image intensity. That is, the output image has a normal visual appearance, but the stripe modulation attenuation and the inter-frame phase shift relationship are destroyed, resulting in poor phase solution accuracy.

[0062] The wrapping phase loss uses cosine distance to measure phase error, adapting to the periodicity of the wrapping phase and avoiding spurious large loss values ​​at phase transition boundaries. This ensures stable gradients in the loss function and reliable convergence during training, allowing the network to directly optimize for phase solving rather than simply reconstructing image pixels. The modulation loss directly constrains the fringe oscillation amplitude, forcing the network output to retain effective fringe brightness fluctuations. This suppresses excessive smoothing of overexposed and underexposed areas, ensuring a high signal-to-noise ratio for the fused fringes and reducing noise errors in subsequent phase demodulation from the source.

[0063] The entire loss calculation is based entirely on the orthogonal demodulation physical model of phase-shifted fringes, closely aligning with the actual working mechanism of FPP measurements. Combined with the ground truth samples obtained in step 101, compared to simulation labels, it can learn the fringe degradation patterns caused by real camera noise, projection nonlinearity, and complex reflections of objects, improving the network's generalization performance on complex reflective objects such as metal and ice. Training uses the entire phase-shift sequence, maintaining phase constraints between the 12 phase shifts. This differs from the frame-by-frame independent training and fusion scheme, avoiding the disruption of the inherent phase shift correlation between phase-shifted frames and ensuring that the output fused phase-shift sequence can be directly used for subsequent phase demodulation.

[0064] In step 103, firstly, the high-exposure phase-shift fringe sequence and the low-exposure phase-shift fringe sequence of the object under test are input into the exposure correction module to obtain the high-exposure correction sequence and the low-exposure correction sequence, respectively. In structured light multi-exposure imaging, the high-exposure phase-shift fringe sequence and the low-exposure phase-shift fringe sequence have significant complementarity. The high-exposure phase-shift fringe sequence can usually achieve high fringe visibility in dark areas, but it is prone to grayscale saturation in high-reflectivity or bright areas, leading to a decrease in fringe modulation or even loss of phase information. Conversely, the low-exposure phase-shift fringe sequence can effectively suppress overexposure in bright areas, but it often suffers from insufficient grayscale response and low fringe contrast in dark areas. Therefore, before performing multi-exposure feature fusion, it is necessary to adaptively correct different exposure sequences to enhance the effective fringe information in the input data.

[0065] Figure 3 This is a schematic diagram of an exposure correction module architecture provided in an embodiment of this application. Figure 3 As shown, this module consists of a lightweight convolutional residual prediction network and a brightness gating correction strategy. Its goal is to perform targeted intensity adjustments on overexposed and underexposed areas without disrupting the periodic grayscale relationships of the phase-shift sequence. The inputs are a 12-step high-exposure phase-shift image sequence. and a low-exposure 12-step phase-shift image sequence .

[0066] Specifically, a lightweight prediction network can be used to convolve high-exposure phase-shift fringe sequences and low-exposure phase-shift fringe sequences respectively, and bounded residual terms can be predicted based on the hyperbolic tangent function. The bounded residual term is the product of the output value of the lightweight prediction network and a preset residual amplitude control coefficient.

[0067] As an example, the bounded residual term satisfies the following formula: ; ;in, This refers to the exposure correction amount for the high-exposure phase-shift fringe sequence obtained through network learning. This refers to the exposure correction amount for the low-exposure phase-shift fringe sequence obtained through network learning. This is the residual amplitude control factor, which can be set to 0.20 to limit the maximum correction amplitude. This is a high-exposure phase-shifted stripe sequence. This is a low-exposure phase-shifted fringe sequence. This is a residual prediction network composed of convolutional layers. The function constrains the residuals within a finite range, thereby avoiding excessive perturbation to the original phase-shifted sequence.

[0068] To enable the module to adopt different correction strategies based on different brightness areas, embodiments of this application construct bright area gating maps and dark area gating maps respectively. Specifically, a bright area gating weight map is constructed to characterize the overexposure degree of high-exposure areas, and a dark area gating weight map is constructed to characterize the darkness degree of low-exposure areas. The bright area gating weight map is calculated based on the difference between the pixel intensity of the high-exposure phase-shift fringe sequence and a preset bright area threshold, while the dark area gating weight map is calculated based on the difference between the preset dark area threshold and the pixel intensity of the low-exposure phase-shift fringe sequence.

[0069] As an example, the bright area gating weight map satisfies the following formula: ;in, For the bright area gating map, The preset bright area threshold is used. The dark area gating weight map satisfies the following formula: ;in, This is a gated diagram for dark areas. This is the preset dark area threshold.

[0070] The lightweight convolutional residual prediction network consists of multiple convolutional (Conv) layers connected in series, followed by a tanh activation function, which predicts the high-exposure residual term. Low exposure residuals The high-exposure correction unit receives the original high-exposure phase-shift sequence and brightness gating weights. and residual terms This completes exposure correction in the image domain. The correction result is then processed... [0,1] range truncation is applied to output the corrected high-exposure 12-step phase-shift stripe sequence. The low-exposure correction unit receives the original low-exposure phase-shift sequence and dark area gating weights. and residual terms This completes the intensity correction of the underexposed image. The correction result is then processed... [0,1] range truncation is applied to output the corrected low-exposure 12-step phase-shift fringe sequence. .

[0071] Based on the grayscale distribution of the normalized phase-shifted image, the embodiments of this application empirically set both to... and . This indicates that the value is limited to... Within the range. For high-exposure phase-shifted stripe sequences, when the pixel intensity exceeds... hour, It gradually increases with increasing pixel intensity. For low-exposure phase-shift fringe sequences, when the pixel intensity is lower than... hour, It gradually increases as pixel intensity decreases. Therefore, the gating map allows correction operations to focus on potentially overexposed and underexposed areas.

[0072] Next, the bounded residual terms corresponding to the high-exposure phase-shift fringe sequence are weighted using a bright area gating weight map, and the weighted result is superimposed on the high-exposure phase-shift fringe sequence to generate a high-exposure correction sequence. Similarly, the bounded residual terms corresponding to the low-exposure phase-shift fringe sequence are weighted using a dark area gating weight map, and the weighted result is superimposed on the low-exposure phase-shift fringe sequence to generate a low-exposure correction sequence.

[0073] As an example, the high-exposure correction sequence satisfies the following formula: ;in, This is a high-exposure correction sequence. The residual term obtained from the high-exposure branch prediction. This is an element-wise multiplication. The low-exposure correction sequence satisfies the following formula: ;in, This is a low-exposure correction sequence. This is the residual term obtained from the low-exposure branch prediction.

[0074] For high-exposure phase-shifted stripe sequences, when a certain region has high brightness... When the value is large, the module tends to reduce the grayscale of that area, thereby alleviating overexposure. For low-exposure phase-shift fringe sequences, when the brightness of a certain area is low, When the value of is large, the module tends to enhance the grayscale in that area, thereby improving the visibility of dark area fringes. Through the above exposure correction process, the network can obtain two sets of compensation sequences before entering the backbone fusion network. and Compared to directly using the original high-exposure phase-shift fringe sequences and low-exposure phase-shift fringe sequences, the corrected sequence can provide a more stable brightness distribution and richer local fringe information.

[0075] Subsequently, the high-exposure phase-shift fringe sequence, high-exposure correction sequence, low-exposure phase-shift fringe sequence, and low-exposure correction sequence are input into a four-branch encoder to obtain the original high-exposure features, high-exposure correction features, original low-exposure features, and low-exposure correction features, thus fully utilizing the complementary information under different exposure states. In multi-exposure structured light images, the high-exposure phase-shift fringe sequence and the low-exposure phase-shift fringe sequence contain effective fringe information from different regions. The high-exposure phase-shift fringe sequence can enhance the fringe response in dark areas, but it is prone to saturation in areas with strong reflections. The low-exposure phase-shift fringe sequence can preserve details in bright areas, but the signal in dark areas is weak. Therefore, relying solely on the original high- and low-exposure phase-shift fringe sequences for fusion is insufficient to simultaneously preserve details in bright areas and fringe quality in dark areas.

[0076] To fully utilize the complementary relationship between the original exposure information and the corrected exposure information, this embodiment of the application feeds the high-exposure correction sequence and low-exposure correction sequence generated by the exposure correction module, along with the original input high-exposure phase-shift fringe sequence and low-exposure phase-shift fringe sequence, into a four-branch coding network. The high-exposure phase-shift fringe sequence and the low-exposure phase-shift fringe sequence are respectively... , After exposure correction, the result was obtained. , The input set of a four-branch coding network can be represented as: Compared to methods that only use high and low exposure inputs, this design can simultaneously retain both the original observation information and the correction compensation information, giving the network a stronger information selection capability in the subsequent feature fusion process.

[0077] Subsequently, the four input sequences are fed into their respective encoding branches for feature extraction. Each encoding branch first uses convolutional layers to extract local stripe texture, edge, and grayscale variation features. Then, Patch Embedding maps the convolutional features to labeled sequences, and Basic Swin Transformer Blocks (BSTB) are used to model spatial correlation within the window. Finally, Layer Normalization is applied to obtain the encoded features. The four-way feature representation is as follows: ;in, This represents the four-branch coding process. , , and These represent the feature representations corresponding to the four inputs. Through this four-branch coding structure, the network can learn effective features from high exposure, low exposure, and the correction results of both, providing a richer feature foundation for subsequent same-exposure interaction and cross-exposure fusion.

[0078] Then, feature correction is performed on the original high-exposure features and the original low-exposure features using same-exposure attention interaction to obtain high-exposure corrected features and low-exposure corrected features. Specifically, same-exposure attention interaction is used to perform homologous feature interaction on the original high-exposure features and the high-exposure corrected features, and on the original low-exposure features and the low-exposure corrected features, respectively, to obtain high-exposure interactive features and low-exposure interactive features.

[0079] To jointly utilize the original exposure sequence, the corrected exposure sequence, and complementary fringe information under different exposure conditions, this application proposes a feature interaction and fusion module based on window attention. This module mainly consists of a Basic Swing Transformer (BSTB), a Same Exposure Interaction (VSTB), and a Cross Exposure Interaction (CSTB). As an example, within a local window, the input features are mapped to generate a query matrix, a key matrix, and a value matrix. The product of the query matrix and the transpose of the key matrix is ​​calculated, and the result is scaled by dividing by the square root of the feature dimension. Then, a relative position bias parameter is superimposed to preserve the spatial structure information of the fringe. The result after the bias is superimposed is then subjected to Softmax normalization to obtain the attention weight matrix. Finally, the attention weight matrix is ​​multiplied by the value matrix to obtain the attention output features.

[0080] The attention output features are then residually concatenated with the original input features. The attention output features generated using the high-exposure correction features compensate for the original high-exposure features, resulting in high-exposure interactive features. Similarly, the attention output features generated using the low-exposure correction features compensate for the original low-exposure features, resulting in low-exposure interactive features. For example, BSTB performs multi-head self-attention within a local window to extract contextual information about phase-shift fringes. Its calculation form is as follows: ;in, , and These represent the query, key, and value matrices, respectively. The feature dimension of a single attention head. This indicates a relative positional offset. Because the attention calculation is confined to a local window, this module can model spatial correlations within the stripe region while controlling computational complexity. During the same exposure interaction phase, VSTB supplements the corresponding original exposure features with correction features, the process of which is represented as follows: ; ;in, and These represent the original high-exposure features and the high-exposure correction features, respectively. and These represent the original low-exposure features and the low-exposure correction features, respectively. This represents the attention interaction module with the exposure window. Through this process, exposure compensation information in the correction sequence can be selectively introduced into the corresponding original features.

[0081] Next, using cross-exposure attention interaction, bidirectional feature fusion is performed on the high-exposure interaction features and low-exposure interaction features to obtain a fused feature map. Using the high-exposure interaction features as query input and the low-exposure interaction features as key and value input, cross-exposure attention calculation is performed within a local window to supplement the unsaturated fringe information in high-reflectivity areas using the low-exposure interaction features. Using the low-exposure interaction features as query input and the high-exposure interaction features as key and value input, cross-exposure attention calculation is performed within a local window to enhance the weak fringe response in low-reflectivity areas using the high-exposure interaction features. The outputs of the two cross-exposure attention calculations are then feature-aggregated to generate the fused feature map. For example, the fused feature map satisfies: ;in, This represents a fusion operation consisting of bidirectional cross-exposure window attention and subsequent feature aggregation. This process represents the fusion feature. Low-exposure features supplement unsaturated fringe information in high-reflectance regions, while high-exposure features enhance weak fringe responses in low-reflectance regions. Finally, the fused features are fed into subsequent feature refinement and reconstruction modules to generate the base fused phase-shift sequence. This process is consistent with the VSTB co-exposure interaction, CSTB bidirectional cross-exposure interaction, and channel aggregation structure in the network implementation.

[0082] After window attention feature interaction and fusion, the network obtains fused features containing complementary information from high and low exposures. However, during multi-layer feature encoding, interaction, and decoding, some local fringe details may be weakened, especially unsaturated fringes in high-reflectivity regions and weak response information in low-reflectivity regions. To reduce the detail loss caused by the feature reconstruction process, the CBAM attention mechanism is used to generate high-exposure residual compensation weights and low-exposure residual compensation weights based on high-exposure correction features and low-exposure correction features, respectively, to adaptively weight and compensate the basic fused feature map, obtaining a compensated fused feature map. The network then predicts and outputs a complete fused phase-shifted fringe sequence to adaptively supplement the reliable fringe information in the correction sequence to the basic fusion result.

[0083] CBAM recalibrates the input features sequentially from both channel and spatial dimensions. Channel attention enhances feature responses related to fringe reconstruction, while spatial attention highlights local regions with higher information reliability. Unlike directly superimposing the correction sequence onto the decoding result, the proposed module generates corresponding attention weights based on the feature responses of the high and low exposure branches, thereby suppressing interference from unreliable exposure regions.

[0084] Specifically, the high-exposure attention prediction branch in the CBAM attention residual compensation module is used to recalibrate the high-exposure correction features in terms of channels and space, and then a high-exposure residual compensation weight map is generated by mapping with the Sigmoid function. Similarly, the low-exposure attention prediction branch in the CBAM attention residual compensation module is used to recalibrate the low-exposure correction features in terms of channels and space, and then a low-exposure residual compensation weight map is generated by mapping with the Sigmoid function.

[0085] Next, the high exposure correction feature is multiplied element-wise with the high exposure residual compensation weight map to obtain the high exposure compensation feature term. Similarly, the low exposure correction feature is multiplied element-wise with the low exposure residual compensation weight map to obtain the low exposure compensation feature term. Let the high and low exposure features after exposure interaction be respectively... and The corresponding attention weights are expressed as follows: ; ;in, and These represent the high and low exposure attention prediction branches composed of CBAM and convolutional mapping layers, respectively; σ(·) represents the Sigmoid function. and These represent the residual compensation weights for the high and low exposure correction sequences, respectively. Both attention prediction branches output weight maps with the same number of channels as the 12-step phase-shift sequence, enabling the network to adaptively adjust the compensation intensity for different phase-shift frames and spatial locations. In the network implementation, CBAM first completes channel and spatial feature recalibration, and then generates a 12-channel attention map through convolutional layers and the sigmoid function.

[0086] Finally, the basic fused feature map, the high-exposure compensation feature term, and the low-exposure compensation feature term are superimposed and summed to obtain the compensated fused feature map. The compensated fused feature map is then input into the hyperbolic tangent function for numerical constraints and transformed to a preset grayscale range through a convolutional layer to obtain the complete fused phase-shifted stripe sequence. As an example, the fused phase-shifted stripe sequence satisfies the following formula: ;in, To fuse the phase-shifted stripe sequences, To fuse feature maps, For high exposure correction features, For low exposure correction features, For high exposure residual compensation weight, This represents the weight for low-exposure residual compensation. The formula indicates that the final output not only consists of the basic fusion result generated by the decoder, but also further incorporates attention residual compensation terms from both the high-exposure and low-exposure correction sequences. Specifically, the high-exposure compensation term helps preserve relatively stable fringe information in dark areas, while the low-exposure compensation term helps recover unsaturated detail information in bright areas.

[0087] Finally, the network uses the hyperbolic tangent function to constrain the output and transforms it through a linear mapping. Within the grayscale range. This ensures the numerical stability of the fused phase-shift sequence. Through the above design, the CBAM module can further compensate for local fringe details based on the basic feature reconstruction and enhance the network's ability to select reliable information in different exposure areas. This process is consistent with the basic sequence reconstruction, two-way attention-weighted residual superposition, and Tanh output normalization operations in the code.

[0088] In one specific embodiment, to verify the effectiveness of the proposed dual-exposure twelve-step phase-shift fringe sequence fusion method, a binocular fringe projection three-dimensional measurement platform was constructed. The system consists of a DLP projector, two industrial cameras, a fixed-focus lens, a rigid support, a planar calibration plate, and a main control computer. The projector projects twelve sinusoidal phase-shift fringes onto the surface being measured, and the two cameras simultaneously acquire deformed fringe images from different perspectives. All optical components are fixed on the rigid support to ensure relative position and orientation stability during the acquisition process.

[0089] The image resolution of the left and right cameras is The projector has [number] pixels and is equipped with a fixed-focus lens with a focal length of 15mm. The projection resolution of the projector is [resolution]. The baseline distance between the two cameras is approximately 120mm, and the system working distance is approximately 640mm. During the acquisition process, the camera's automatic exposure and automatic gain functions were turned off, while the lens aperture, projection brightness, and camera gain remained constant. Only the exposure time was changed to obtain a 12-step phase shift sequence for high and low exposures. Before the experiment, binocular calibration of the left and right cameras was completed to obtain the camera intrinsic parameters, distortion coefficients, and the rotation matrix and translation vector of the binocular system. After epipolar correction, phase demodulation and phase unrolling were performed on the phase shift sequences of the left and right views output by the network, and the binocular correspondence was established based on the absolute phase. Finally, the 3D point cloud of the measured object was recovered by combining the system calibration parameters and the triangulation principle. The proposed network is implemented based on the PyTorch deep learning framework and was trained and tested on a workstation equipped with an NVIDIA GeForce RTX 4090 GPU. The network was trained using the AdamW optimizer, with the initial learning rate and weight decay set to [value missing]. And by using a cosine annealing strategy, the learning rate is gradually decayed to The training batch size is set to 1, the number of training epochs is 300, and the training input image patch size is set to... Pixels. To improve the stability of the training process, the upper bound of the gradient norm is set to 1.0. The feature embedding dimension of the model is set to 64, and the local attention window size is set to [missing value]. The number of heads for multi-head attention is set to 8. Weights are assigned to image intensity, modulation amplitude, and wrapping phase loss. , and Set them to 1:2:1 respectively.

[0090] The experimental dataset consists of different types of highly reflective objects, including metal specimens, mixed ice, and frost ice, covering typical cases such as local saturation, non-uniform reflection, weak fringe modulation, and missing phase information. For each measurement scene, 12-step phase-shift sequences were acquired for both high and low exposure. While maintaining the measurement position and object orientation, a 12-step phase-shift sequence after developer spraying was acquired as a supervisory reference. Each sample consists of a high-exposure sequence, a low-exposure sequence, and a corresponding developer reference sequence. The dataset contains 220 samples, divided into training, validation, and test sets in a 7:2:1 ratio.

[0091] First, the quality of the fringe image is evaluated based on high dynamic range imaging. To evaluate the ability of the proposed method to recover degraded fringes, embodiments of this application compare the fusion results, high-exposure fringes, and low-exposure fringes with reference fringes acquired after developer treatment. Figure 4 As shown, Figure 4 This is a schematic diagram illustrating the phase fringe comparison results of multiple sets of complex reflective metal specimens provided in an embodiment of this application. The first row shows the phase-shifted fringe image of specimen A, the second row shows the phase-shifted fringe image of specimen B, and the third row shows the phase-shifted fringe image of specimen C. The first column shows the original phase-shifted fringe image acquired with high exposure, the second column shows the original phase-shifted fringe image acquired with low exposure, the third column shows the phase-shifted fringe image output by an existing comparison method, and the fourth column shows the fused phase-shifted fringe image output by the fringe fusion network of this invention.

[0092] High-exposure stripes exhibit significant grayscale saturation and stripe peak truncation in highly reflective areas, while low-exposure stripes, although avoiding partial saturation, suffer from weak grayscale response in dark areas, resulting in a noticeable decrease in stripe contrast and detail. In contrast, the method described in this application suppresses saturation in bright areas while preserving stripe information in dark areas, and the restored result is more consistent with the developer reference stripes in terms of grayscale distribution, stripe continuity, and periodic structure.

[0093] To further analyze the recovery of the stripe grayscale response under different exposure conditions, this application embodiment selects two horizontal profile lines in the same phase-shifted frame for comparison. For example... Figure 5 As shown, Figure 5 This is a comparative schematic diagram of striped grayscale profiles from different methods provided in the embodiments of this application. The first row shows the scan line positions, from left to right: overexposed original image, underexposed original image, and the output image of the HDR fusion network of this application. Each image is labeled with two horizontal lines, the upper one being... Below is The second line is the dark area (normal background area). The grayscale profile of the pixel row. The third row shows the overexposed reflective areas. The grayscale profile of a pixel row. Among them, Passing through areas of strong local reflection, Passing through low-brightness areas. Figure 5 The grayscale profiles of the proposed method, high-exposure input, and low-exposure input at the aforementioned locations are presented, with the striped image after developer treatment used as an approximate diffuse reflection reference. To ensure consistency in the comparison, all curves use the same pixel range and grayscale coordinate range, with the horizontal axis representing the pixel column number and the vertical axis representing the image grayscale value. The blue curves, from left to right, represent the grayscale waveforms of the overexposed original image, the underexposed original image, and the output image of the HDR fusion network proposed in this application. The red curve represents the reference true value waveform obtained by matte spraying developer. In the cross-section, the overall grayscale and modulation amplitude of the low-exposure stripes are significantly reduced, and some periodic responses approach noise levels. In contrast, the method of this application embodiment can recover more continuous periodic grayscale changes and is closer to the reference curve in terms of peak-valley distribution and modulation change trends. At the cross-section, the high-exposure fringes exhibit obvious peak saturation and plateauing, leading to compression of the peak-to-valley difference and distortion of the fringes' approximate sinusoidal response. The grayscale curve obtained by the method in this embodiment does not show large-scale saturation plateaus, and its fringe period, peak-to-valley positions, and overall trend are more consistent with the reference curve. The recovery curve obtained by the method in this embodiment also does not show large-scale saturation plateaus, and its fringe period, peak-to-valley positions, and overall trend are more consistent with the reference curve. The results show that the proposed method can utilize complementary information between different exposure sequences to simultaneously alleviate saturation clipping in strong reflection regions and modulation amplitude attenuation in low-brightness regions, providing a more stable fringe input for subsequent phase demodulation.

[0094] like Figure 6 As shown, Figure 6This document presents schematic diagrams of metal objects with different geometric structures and surface reflectivity characteristics as provided in the embodiments of this application. To further verify the effectiveness of the proposed method in actual 3D measurement scenarios, the embodiments of this application can select four objects with different geometric structures and surface reflectivity characteristics (from left to right and from top to bottom): metal plate, dumbbell plate, double narrow metal groove, and cylindrical curved metal (from left to right and top to bottom) for 3D reconstruction experiments. Comparison methods include the original high-exposure sequence, the original low-exposure sequence, the traditional exposure fusion method Mertens, the deep learning-based MEF-Net, the Transformer-based SwinFusion, and the method proposed in this paper. For Mertens, MEF-Net, and SwinFusion, stripe images with the same phase shift index under high and low exposure conditions are used as input, and fusion results are generated frame by frame. The resulting 12 fused images are then combined to form a complete phase shift sequence. The method in the embodiments of this application directly uses the 12-step phase shift sequence of high and low exposure as input to jointly recover the complete fused phase shift sequence. To ensure the fairness of the comparison, the phase shift sequences generated by different methods all employ the same phase demodulation, phase unrolling, system calibration, and point cloud reconstruction process. Except for the different generation methods of the input phase shift sequence, all other 3D reconstruction parameters remain the same.

[0095] Figure 7 This is a schematic diagram comparing the three-dimensional reconstruction results of a metal plate provided in the embodiments of this application. Figure 8 This is a schematic diagram comparing the three-dimensional reconstruction results of a dumbbell plate provided in an embodiment of this application. Figure 9 This is a schematic diagram comparing the three-dimensional reconstruction results of a double-slot metal plate provided in the embodiments of this application. Figure 10 This is a comparative schematic diagram showing the results of three-dimensional reconstruction of a cylindrical curved metal surface provided in an embodiment of this application. For example... Figure 7 , Figure 8 , Figure 9 and Figure 10 As shown, from top to bottom and left to right, the reconstruction results are obtained using the original high-exposure stripe sequence, the original low-exposure stripe sequence, the Mertens method, the MEF-Net method, the SwinFusion method, and the method of this embodiment. Figure 7In the high-exposure image (351,922 points), there is significant missing data in the central area. In the low-exposure image (283,341 points), there is significant missing data at the upper edge and on the left side. The Mertens fusion result (418,417 points) shows a relatively complete surface overall, but there are local reconstruction anomalies on the left edge. The MEF-Net fusion result (423,493 points) shows a relatively complete overall reconstruction, but there are slight artifacts on the right side. The SwinFusion fusion result (416,601 points) shows obvious vertical stripes and local reconstruction anomalies on the surface. The method of this application (425,920 points) reconstructs a complete surface with good preservation of edges and local details. Figure 8 In the high-exposure image (204,916 points), the overall outline is relatively complete, but speckle noise and edge defects exist in some central areas. In the low-exposure image (197,924 points), there are obvious reconstruction gaps near the central hole and outer contour, resulting in poor overall integrity. In the Mertens fusion result (213,211 points), the overall shape of the target can be basically recovered, but reconstruction anomalies still exist in the central hole area and local edges. In the MEF-Net fusion result (254,952 points), the overall reconstruction is relatively complete, but the recovery of local surface details is insufficient, and slight artifacts exist. In the SwinFusion fusion result (251,572 points), the overall outline is basically complete, but there are obvious stacking artifacts in some areas, affecting the expression of surface details. In the method of this application embodiment (256,688 points), the overall reconstruction result is complete, the boundary of the central hole is clear, and the surface texture and character details are well preserved. Figure 9 In the high-exposure image (156,855 points), the reconstruction result shows significant speckle noise and obvious missing areas in the middle region. In the low-exposure image (129,010 points), the upper edge region shows significant missing areas, resulting in insufficient surface integrity. The Mertens fusion result (173,412 points) has a relatively complete overall outline, but slight stripe artifacts and reconstruction anomalies still exist in local areas. The MEF-Net fusion result (174,763 points) can recover the overall shape, but there are obvious vertical artifacts in local areas, and the reconstruction error is large near the bottom. The SwinFusion fusion result (173,660 points) shows some stripe artifacts and local uneven reconstruction phenomena on the surface. The method of this application embodiment (171,863 points) has a complete overall reconstruction result, clear double-slot boundaries, and good preservation of surface details. Figure 10In the high-exposure image (77,175 points), a large area of ​​reconstruction is missing in the upper region, accompanied by local discrete points. In the low-exposure image (87,546 points), the overall contour can be basically recovered, but there are some defects on both sides. The Mertens fusion result (99,252 points) shows that the surface is relatively complete overall, but there is obvious noise and reconstruction anomalies in some areas. The MEF-Net fusion result (98,435 points) shows that the overall shape is basically complete, but there are obvious local distortions and texture artifacts on the surface. The SwinFusion fusion result (99,592 points) shows good overall surface continuity, but there is still texture noise and reconstruction errors in some areas. The method of this application embodiment (101,573 points) shows complete and continuous surface reconstruction with less local noise and better preservation of surface details.

[0096] Depend on Figures 7 to 10 It can be seen that the exposure quality of the input image and the fusion method directly affect the integrity of the point cloud and the surface reconstruction quality. For high-exposure and low-exposure images, due to information saturation or lack of detail in local areas, the reconstruction results show varying degrees of point cloud loss, edge discontinuity, and local anomalies. Fusion methods such as Mertens, MEF-Net, and SwinFusion can improve the overall reconstruction effect of the target to a certain extent, but some areas still have problems such as fringe artifacts, local distortion, holes, and surface discontinuities. In contrast, the method in this paper obtains relatively complete and continuous 3D surfaces on different structural targets such as metal plates, double-slot metal plates, dumbbell plates, and cylindrical curved metal surfaces, and shows better local structure preservation ability in edges, slots, surface textures, and curved surface areas, while reducing point cloud loss and reconstruction artifacts. The above results show that under the experimental conditions, the method of this embodiment can retain more effective fringe information that can be used for phase demodulation, thereby improving the integrity and local structure preservation ability of the 3D reconstruction results.

[0097] To further quantitatively evaluate the 3D reconstruction accuracy of different methods, this application uses the root mean square error (RMSE) as the evaluation metric. First, the reconstructed point clouds obtained by each method are registered with the reference point cloud obtained after spraying developer to the same coordinate system, and a point cloud correspondence is established within the same region of interest. RMSE is defined as: ;in, The evaluation method yields the first... One measurement point, This represents the corresponding point in the reference point cloud. This represents the number of valid corresponding points used in error calculation. A smaller RMSE indicates a smaller geometric deviation between the measured point cloud and the reference surface, resulting in higher 3D reconstruction accuracy. All methods use the same region of interest, point cloud registration method, and error calculation parameters to ensure fairness in the comparison.

[0098] Table 1 lists the RMSE results of different methods on metal plates, dumbbell plates, double-slot metal plates, and cylindrical curved metal surfaces. Table 1 shows the 3D reconstruction RMSE (mm) of different methods on objects with different reflective properties. Since the size, effective measurement area, and point cloud density of different measured objects vary, this embodiment does not directly compare the absolute point cloud quantity, but rather combines... Figures 7-10 The point cloud holes, edge continuity, and outlier distribution are used to qualitatively evaluate the integrity of the reconstruction.

[0099] Table 1

[0100] Table 1 presents the RMSE of 3D reconstructions on metal plates, dumbbell plates, double-slot metal plates, and cylindrical curved metal surfaces using Mertens, MEF-Net, SwinFusion, and the proposed method. The proposed method achieves the lowest RMSE on all four test objects, demonstrating good 3D reconstruction accuracy under different geometric structures and reflection conditions. For metal plates and dumbbell plates, the RMSEs of the proposed method are 0.13640 mm and 0.3892 mm, respectively, indicating that it effectively reduces phase errors caused by abnormal exposure on highly reflective surfaces. For mixed ice and frost ice, the RMSEs of the proposed method are 0.1164 mm and 0.3892 mm, respectively, showing that the proposed exposure correction and multi-exposure fusion strategy effectively alleviates the distortion of stripe information caused by local overexposure or underexposure on highly reflective surfaces, reducing the resulting phase demodulation error. For double-slot metal plates with complex edge structures, the RMSE of the proposed method is 0.0724 mm. For cylindrical curved metal surfaces with continuous curvature changes, the RMSE is 0.0926 mm, which is lower than that of the corresponding comparative methods, indicating that the proposed method has a good ability to preserve the fringe information of the hole and slot boundaries and curved surface regions. Combined with the 3D point cloud visualization and point cloud quantity results, it can be seen that the proposed method can effectively reduce local point cloud missingness, boundary discontinuities, and reconstruction artifacts while reducing geometric reconstruction errors, resulting in a more complete and continuous 3D surface. The above quantitative and qualitative results show that the proposed method can improve the utilization rate of effective fringe information under complex reflection conditions, thereby enhancing the stability of phase recovery of phase-shifting surface structured light and the geometric integrity of 3D reconstruction.

[0101] Figure 11 This is a schematic diagram of a different ice layer sample provided in an embodiment of this application. Figure 11As shown, compared to opaque metal surfaces, ice layers exhibit more complex transmission, reflection, and scattering characteristics. When phase-shifted structured light is projected onto the surface of an ice layer, some of the incident light enters the interior of the ice and undergoes transmission and scattering. This means that the fringe information received by the camera not only includes surface reflection components but is also affected by internal light transmission, resulting in reduced fringe contrast, uneven modulation distribution, and localized intensity anomalies. Figure 12 This is a visual comparison diagram of different stripe images provided in the embodiments of this application. For example... Figure 12 As shown, due to the combined effects of ice layer transmission, reflection, and scattering characteristics, it is difficult to simultaneously ensure the effective acquisition of fringe information in different regions under a single exposure condition. For example... Figure 14 As shown, there are significant differences in the fringe response of the ice surface under high and low exposure conditions. Under high exposure conditions, the fringe information in weak response areas is enhanced, but intensity saturation easily occurs in locally bright areas. Under low exposure conditions, overexposure in bright areas is suppressed, but the fringe contrast and modulation in some weak response areas decrease. After fusion, the fringe information in different areas is effectively complementary, the fringe intensity distribution on the ice surface is more balanced, and the continuity and usability of the fringe are improved. Figure 13 This is a schematic diagram showing a comparison of three-dimensional reconstruction results of frost and ice provided in an embodiment of this application. Figure 14 This is a schematic diagram showing the comparison of three-dimensional reconstruction results of Mingbing provided in the embodiments of this application. Figure 15 This is a comparative schematic diagram of three-dimensional reconstruction results of mixed ice provided in an embodiment of this application. Similarly, as... Figure 13 , Figure 14 and Figure 15 As shown, from top to bottom and from left to right, the reconstruction results are obtained using the original high-exposure stripe sequence, the reconstruction results obtained using the original low-exposure stripe sequence, the reconstruction results obtained using the Mertens method, the reconstruction results obtained using the MEF-Net method, the reconstruction results obtained using the SwinFusion method, and the reconstruction results obtained using the method of the embodiments of this application.

[0102] Depend on Figures 13 to 15It is evident that frost ice, mixed ice, and clear ice, due to their different transmission, scattering, and reflection characteristics, struggle to obtain stable and effective fringe responses across the entire measurement area under a single exposure condition. High-exposure sequences are prone to grayscale saturation in areas with strong local responses, while low-exposure sequences suffer from insufficient fringe modulation and signal-to-noise ratio in areas with weak responses, resulting in a loss of phase information. This manifests in the 3D reconstruction results as sparse point clouds, local voids, boundary discontinuities, and missing surface structures. Mertens, MEF-Net, and SwinFusion can utilize complementary information between high- and low-exposure images to improve fringe availability to some extent, but significant local reconstruction anomalies still exist in areas where the optical properties of the ice layer vary considerably. Frost ice is primarily affected by strong scattering, while mixed ice exhibits more pronounced point cloud loss and surface discontinuities due to significant differences in optical properties across different regions. Clear ice is affected by both transmission and local specular reflection, making it difficult to obtain stable phase information in some areas. In contrast, the method in this application reduces the saturation response in high-exposure areas through exposure correction and enhances the weak fringe information in low-exposure areas, thus more fully preserving the effective phase information in different exposure sequences. Therefore, more continuous and complete 3D surfaces were obtained on all three types of ice layers, and local point cloud defects and reconstruction anomalies were reduced. These results demonstrate that the proposed method can improve the utilization of effective fringe information on complex ice surface layers, thereby improving phase retrieval stability and 3D reconstruction integrity.

[0103] To verify the effectiveness of key modules and physical constraint losses in the network, this application conducted ablation experiments while maintaining consistency in dataset partitioning, training parameters, and other network structures. The results are as follows: Figure 16 As shown, from left to right and top to bottom, the results are: the 3D reconstruction results after removing the exposure correction module, the 3D reconstruction results after removing the CBAM attention residual compensation module, the 3D reconstruction results after removing modulation amplitude loss and wrapping phase loss, and the 3D reconstruction results of the method in this application. The removal of the exposure correction module involves replacing the high and low exposure correction modules with an identity mapping, i.e., letting ( ), ( While retaining the four-branch coding structure and subsequent feature fusion process, the CBAM attention residual compensation module is removed by replacing the CBAM attention head with a conventional convolutional prediction head without channel-spatial recalibration, while keeping the weight map generation and residual fusion methods unchanged. & It is Setting all values ​​to 0 removes modulation amplitude loss and wrapping phase loss, retaining only image intensity loss.

[0104] Depend on Figure 16As shown, after removing ERM, the deviation between the 3D reconstruction result and the reference true value increases, with the 3D RMSE increasing from 0.11398 mm to 0.27613 mm. This indicates that the exposure correction module can effectively alleviate information distortion under different exposure conditions and improve the fringe recovery quality in high-reflectance and low-brightness areas. After removing CBAM, the 3D RMSE further increases to 0.13936 mm. The increase in 3D RMSE after removing CBAM indicates that the CBAM module can adaptively adjust the residual compensation intensity of high and low exposure correction sequences through channel-space joint recalibration, thereby improving the ability to preserve local fringe details and the accuracy of 3D reconstruction. Furthermore, when the modulation amplitude loss and wrapping phase loss are removed, the deviation between the recovered phase and the reference phase increases significantly. The Wrapped Phase RMSE increases from 0.04805 rad to 0.08794 rad, while the 3D RMSE increases to 0.41722 mm. This indicates that relying solely on image intensity constraints is insufficient to guarantee the physical consistency of the recovered fringes, while modulation amplitude and wrapping phase constraints can effectively improve the phase recovery accuracy and the reliability of subsequent 3D reconstruction. These results validate the effectiveness of ERM, CBAM, and physical constraint losses in improving fringe recovery quality and 3D measurement accuracy.

[0105] Based on this, this application proposes a dual-exposure twelve-step phase-shifting fringe sequence fusion method to address the problems of local overexposure, underexposure, and phase distortion that easily occur on complex highly reflective ice layers and metal surfaces in phase-shifting surface structured light measurements. This method is based on complementary information in high- and low-exposure fringe sequences, using an exposure correction module to suppress saturation residuals in the high-exposure sequence and enhance weak fringe responses in the low-exposure sequence. Furthermore, it combines multi-branch feature extraction, same-exposure information interaction, and cross-exposure attention fusion to recover effective fringe information in abnormally exposed areas. During training, intensity, modulation, and wrapping phase are used to jointly constrain the network output to balance the quality of the fused image with the reliability of subsequent phase demodulation. Experimental results on different metal ice samples show that the proposed method can reduce local point cloud loss and fringe-related phase errors, improving the integrity and stability of 3D reconstruction of highly reflective surfaces. Although this method achieves good reconstruction results on complex reflective surfaces, for completely transparent or strongly transmissive materials, as well as complex surfaces with severe occlusion, deep concave structures, and multiple reflections, the fringe signal is still easily affected by transmission, refraction, and shadows, and there is still room for improvement in reconstruction accuracy. In the future, we will combine polarization suppression, multi-view measurement, adaptive projection, and transparent medium imaging models to further improve the generalization ability and measurement robustness of the method in complex industrial scenarios.

[0106] Figure 17 This is a schematic diagram of a complex surface structure optical three-dimensional measurement device provided in an embodiment of this application. Figure 17As shown in the embodiment of this application, a complex surface structure light three-dimensional measurement device 1700 may be provided, which may include a first acquisition module 1701, a training module 1702, a second acquisition module 1703, a prediction module 1704 and a reconstruction module 1705.

[0107] The first acquisition module 1701 is used to acquire a training sample set, which includes the original high-exposure phase-shift fringe sequence, the original low-exposure phase-shift fringe sequence, and the reference diffuse reflection phase-shift fringe sequence acquired after the training object has been treated with a surface developer.

[0108] The training module 1702 is used to train the stripe fusion network using a joint loss function to obtain a trained stripe fusion network. The joint loss function includes at least image intensity loss, stripe modulation loss, and wrapping phase loss.

[0109] The second acquisition module 1703 is used to acquire the high-exposure phase-shift fringe sequence and the low-exposure phase-shift fringe sequence of the object under test in the same posture.

[0110] The prediction module 1704 is used to input the high-exposure phase-shift stripe sequence and the low-exposure phase-shift stripe sequence of the object under test into the trained stripe fusion network, predict and output a complete fused phase-shift stripe sequence.

[0111] The reconstruction module 1705 is used to reconstruct the three-dimensional shape of the object under test by calculating the wrapping phase and performing phase unwrapping based on the fused phase-shifted fringe sequence.

[0112] The first acquisition module 1701, training module 1702, second acquisition module 1703, prediction module 1704 and reconstruction module 1705 can be used to execute steps 101-105 in the embodiments of the above-mentioned complex surface structure light three-dimensional measurement method. For the specific implementation of these modules and more details, please refer to the corresponding method section, which will not be elaborated here.

[0113] This application also provides a computer-readable storage medium storing a program that can be loaded by a processor and executed by any of the three-dimensional optical measurement methods for complex surface structures in this application.

[0114] Those skilled in the art will understand that all or part of the functions of the various methods in the above embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, which may include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to achieve the above functions. For example, the program can be stored in the memory of a device, and when the program in the memory is executed by the processor, all or part of the above functions can be achieved. In addition, when all or part of the functions in the above embodiments are implemented by computer programs, the program can also be stored in a server, another computer, disk, optical disk, flash drive, or external hard drive, etc., and can be downloaded or copied to the memory of a local device, or the system of the local device can be updated. When the program in the memory is executed by the processor, all or part of the functions in the above embodiments can be achieved.

[0115] The above examples illustrate this application only to aid understanding and are not intended to limit its scope. Those skilled in the art to which this application pertains can make various simple deductions, modifications, or substitutions based on the ideas presented.

Claims

1. A method for three-dimensional optical measurement of complex surface structures, characterized in that, include: A training sample set is obtained, which includes the original high-exposure phase-shift fringe sequence, the original low-exposure phase-shift fringe sequence, and the reference diffuse reflection phase-shift fringe sequence acquired after the training object is treated with a surface developer. The stripe fusion network is trained using a joint loss function to obtain a trained stripe fusion network. The joint loss function includes at least image intensity loss, stripe modulation loss, and wrapping phase loss. Acquire high-exposure phase-shift fringe sequences and low-exposure phase-shift fringe sequences of the object under test in the same orientation; The high-exposure phase-shift stripe sequence and the low-exposure phase-shift stripe sequence of the object under test are input into the trained stripe fusion network to predict and output a complete fused phase-shift stripe sequence. Based on the fused phase-shifted fringe sequence, the wrapping phase is calculated using the phase-shifting method and phase unfolding is performed to reconstruct the three-dimensional shape of the object under test.

2. The method for three-dimensional measurement of complex surface structures using light according to claim 1, characterized in that, The acquisition of the training sample set includes: The same training object is placed within the measurement field of view. Under the first posture that keeps the relative spatial position of the training object and the measurement device unchanged, the original high-exposure phase-shift fringe sequence and the original low-exposure phase-shift fringe sequence are collected as input sample pairs. While keeping the first posture unchanged, the surface of the training object is treated with a developer to make the surface of the training object exhibit approximately diffuse reflection characteristics. While keeping the first posture unchanged, the reference diffuse reflection phase-shifted fringe sequence is collected as a supervision reference sample; The training sample set is constructed by pixel-level alignment of the original high-exposure phase-shift fringe sequence, the original low-exposure phase-shift fringe sequence, and the reference diffuse phase-shift fringe sequence corresponding to the same training object.

3. The method for three-dimensional measurement of complex surface structures using light according to claim 2, characterized in that, The step of training the stripe fusion network using a joint loss function to obtain a trained stripe fusion network includes: The input sample pairs are fed into the stripe fusion network to predict and output a fused phase-shifted stripe sequence. Based on the fused phase-shifted fringe sequence and the supervised reference sample of the predicted output, the image intensity loss, fringe modulation loss and wrapping phase loss are calculated respectively. The image intensity loss, the stripe modulation loss, and the wrapping phase loss are weighted and summed to obtain the joint loss function, and the joint loss function is used for backpropagation to update the model parameters of the stripe fusion network. Wherein, the fringe modulation loss is the difference between the modulation of the fused phase-shift fringe sequence in the prediction output and the modulation of the supervision reference sample, and the wrapping phase loss is the cosine distance between the predicted wrapping phase calculated based on the fused phase-shift fringe sequence in the prediction output and the actual wrapping phase calculated based on the supervision reference sample.

4. The method for three-dimensional measurement of complex surface structures by light according to claim 3, characterized in that, Based on the fused phase-shifted fringe sequence and the supervised reference sample, image intensity loss, fringe modulation loss, and wrapping phase loss are calculated, including: Using an orthogonal phase-shift demodulation algorithm, the fused phase-shifted stripe sequence and the supervised reference sample are demodulated to obtain the predicted cosine component and the predicted sine component, as well as the true cosine component and the true sine component. The demodulation process includes multiplying each frame image in the phase-shifted sequence with the corresponding phase-shift angle cosine value and sine value, summing them up, and then multiplying by a normalization coefficient. Based on the predicted cosine and predicted sine components, the predicted fringe modulation amplitude and predicted wrapping phase are calculated. Based on the actual cosine and actual sine components, the actual fringe modulation amplitude and actual wrapping phase are calculated. The fringe modulation amplitude is calculated by taking the square root of the sum of the squares of the cosine and sine components. The wrapping phase is calculated by using the four-quadrant arctangent function to calculate the phase angle based on the negative sine and cosine components. The pixel-level grayscale difference between the fused phase-shifted stripe sequence and the supervised reference sample is calculated as the image intensity loss; The difference between the predicted fringe modulation amplitude and the actual fringe modulation amplitude is calculated as the fringe modulation loss; The difference between the predicted package phase and the actual package phase is calculated as the package phase loss.

5. The method for three-dimensional measurement of complex surface structures using light according to claim 1, characterized in that, The process involves inputting the high-exposure phase-shift fringe sequence and the low-exposure phase-shift fringe sequence of the object under test into the trained fringe fusion network, predicting and outputting a complete fused phase-shift fringe sequence, including: The high-exposure phase-shift fringe sequence and the low-exposure phase-shift fringe sequence of the object under test are input into the exposure correction module to obtain the high-exposure correction sequence and the low-exposure correction sequence, respectively. The high-exposure phase-shift stripe sequence, the high-exposure correction sequence, the low-exposure phase-shift stripe sequence, and the low-exposure correction sequence are respectively input into a four-branch encoder to obtain the original high-exposure feature, the high-exposure correction feature, the original low-exposure feature, and the low-exposure correction feature; The original high-exposure features and the original low-exposure features are corrected using the same exposure attention interaction to obtain high-exposure corrected features and low-exposure corrected features; The high-exposure correction features and low-exposure correction features are bidirectionally interactively fused using cross-exposure attention interaction, and a basic fused feature map is generated through a fusion decoder. Using the CBAM attention mechanism, high exposure residual compensation weights and low exposure residual compensation weights are generated based on the high exposure correction features and the low exposure correction features, respectively, to adaptively weight the basic fusion feature map, obtain the compensated fusion feature map, and predict and output the complete fusion phase shift stripe sequence.

6. The method for three-dimensional measurement of complex surface structures using light according to claim 5, characterized in that, The step of inputting the high-exposure phase-shift fringe sequence and the low-exposure phase-shift fringe sequence of the object under test into the exposure correction module to obtain the high-exposure correction sequence and the low-exposure correction sequence respectively includes: A lightweight prediction network is used to perform convolution processing on the high-exposure phase-shift stripe sequence and the low-exposure phase-shift stripe sequence respectively, and a bounded residual term is obtained based on the hyperbolic tangent function. The bounded residual term is the product of the output value of the lightweight prediction network and the preset residual amplitude control coefficient. A bright area gating weight map is constructed to characterize the overexposure degree of high-exposure areas, and a dark area gating weight map is constructed to characterize the darkness degree of low-exposure areas. The bright area gating weight map is calculated based on the difference between the pixel intensity of the high-exposure phase-shift stripe sequence and a preset bright area threshold, and the dark area gating weight map is calculated based on the difference between the preset dark area threshold and the pixel intensity of the low-exposure phase-shift stripe sequence. The bounded residual terms corresponding to the high-exposure phase-shift fringe sequence are weighted and constrained using the bright area gating weight map, and the weighted result is superimposed on the high-exposure phase-shift fringe sequence to generate the high-exposure correction sequence. The bounded residual terms corresponding to the low-exposure phase-shift fringe sequence are weighted and constrained using the dark area gating weight map, and the weighted result is superimposed on the low-exposure phase-shift fringe sequence to generate the low-exposure correction sequence.

7. The method for three-dimensional measurement of complex surface structures using light according to claim 6, characterized in that, The bounded residual term satisfies the following formula: ; ; in, This refers to the exposure correction amount for the high-exposure phase-shift fringe sequence obtained through network learning. This refers to the exposure correction amount for the low-exposure phase-shift fringe sequence obtained through network learning. This is the residual amplitude control coefficient. The high-exposure phase-shifted stripe sequence, The low-exposure phase-shifted stripe sequence, This is a residual prediction network composed of convolutional layers; The bright area gating weight map satisfies the following formula: ; in, For the bright area gating map, Set the preset bright area threshold; The dark area gating weight map satisfies the following formula: ; in, This is a gated diagram for dark areas. Set the preset dark area threshold; The high-exposure correction sequence satisfies the following formula: ; in, This is a high-exposure correction sequence. The residual term obtained from the high-exposure branch prediction. This is element-wise multiplication; The low-exposure correction sequence satisfies the following formula: ; in, This is a low-exposure correction sequence. This is the residual term obtained from the low-exposure branch prediction.

8. The method for three-dimensional measurement of complex surface structures by light according to claim 5, characterized in that, The process of bidirectionally interacting and fusing the high-exposure correction features and low-exposure correction features using cross-exposure attention interaction, and generating a basic fused feature map through a fusion decoder, includes: Using same-exposure attention interaction, the original high-exposure feature and the high-exposure correction feature, and the original low-exposure feature and the low-exposure correction feature are respectively subjected to same-source feature interaction to obtain high-exposure interaction features and low-exposure interaction features; By utilizing cross-exposure attention interaction, bidirectional feature fusion is performed on the high-exposure interaction features and the low-exposure interaction features to obtain the fused feature map; Specifically, by utilizing a co-exposure attention interaction mechanism, the high-exposure correction features and the low-exposure correction features are respectively subjected to feature enhancement processing to obtain high-exposure interaction features and low-exposure interaction features, including: Within a local window, the input features are mapped to generate a query matrix, a key matrix, and a value matrix, respectively. Calculate the product of the query matrix and the transpose of the key matrix, and scale the product by dividing it by the square root of the feature dimension. Then, add the relative position offset parameter to preserve the spatial structure information of the stripes. The result after superposition bias is subjected to Softmax normalization to obtain the attention weight matrix, and the attention weight matrix is ​​multiplied by the value matrix to obtain the attention output features; The attention output feature is residually connected with the original input feature, and the attention output feature generated by the high exposure correction feature is used to compensate the original high exposure feature to obtain the high exposure interactive feature. The attention output feature generated by the low exposure correction feature is used to compensate the original low exposure feature to obtain the low exposure interactive feature. The method of utilizing cross-exposure attention interaction to perform bidirectional feature fusion on the high-exposure interaction features and the low-exposure interaction features to obtain the fused feature map includes: Using the high-exposure interaction features as query input and the low-exposure interaction features as key and value input, cross-exposure attention calculation is performed within a local window to supplement the unsaturated stripe information in the high-reflectivity area using the low-exposure interaction features. Using the low-exposure interaction features as query input and the high-exposure interaction features as key and value input, cross-exposure attention calculation is performed within a local window to enhance the weak stripe response in low-reflection areas using the high-exposure interaction features. The output results of the two cross-exposure attention calculations are aggregated to generate the fused feature map.

9. The method for three-dimensional optical measurement of complex surface structures according to claim 5, characterized in that, The method utilizes the CBAM attention mechanism to generate high-exposure residual compensation weights and low-exposure residual compensation weights based on the high-exposure correction features and the low-exposure correction features, respectively, to adaptively weight and compensate the basic fusion feature map, obtaining a compensated fusion feature map, and predicting and outputting the complete fusion phase-shift fringe sequence, including: The high exposure correction features are recalibrated in channels and space using the high exposure attention prediction branch in the CBAM attention residual compensation module, and a high exposure residual compensation weight map is generated by mapping with the Sigmoid function. The low exposure attention prediction branch in the CBAM attention residual compensation module is used to recalibrate the low exposure correction features in terms of channel and space, and a low exposure residual compensation weight map is generated by mapping with the Sigmoid function. The high exposure correction feature is multiplied element-wise with the high exposure residual compensation weight map to obtain the high exposure compensation feature term. The low exposure correction feature is multiplied element-wise with the low exposure residual compensation weight map to obtain the low exposure compensation feature term. The base fusion feature map, the high exposure compensation feature term, and the low exposure compensation feature term are superimposed and summed to obtain the compensated fusion feature map; The compensated fused feature map is input into the hyperbolic tangent function for numerical constraint, and then mapped and transformed to a preset grayscale range through a convolutional layer to obtain the complete fused phase-shifted stripe sequence. The fused phase-shifted stripe sequence satisfies the following formula: ; in, The fused phase-shifted stripe sequence, For the fused feature map, For high exposure correction features, For low exposure correction features, For high exposure residual compensation weight, Weights for low-exposure residual compensation.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program that can be loaded by a processor and executed as described in any one of claims 1 to 8, the method for optical three-dimensional measurement of complex surface structures.