Part three-dimensional profile detection method and system based on multi-exposure image fusion

By constructing a hierarchical causal graph model and using counterfactual prediction, the problems of phase decoding failure and point cloud missingness in 3D contour detection of parts in high dynamic range scenarios are solved, achieving efficient and robust 3D contour detection, applicable to metal parts and dark plastic parts.

CN123032849APending Publication Date: 2026-11-03ANHUI UNIVERSITY OF ARCHITECTURE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611217731.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-12
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

Existing methods for detecting 3D contours of parts based on multi-exposure image fusion struggle to balance overexposure of highlights and underexposure of shadows in high dynamic range scenarios, leading to phase decoding failure, missing point clouds, or contour distortion. Furthermore, they lack causal modeling and counterfactual reasoning capabilities, failing to meet the demands of intelligent manufacturing for real-time performance and cross-material robustness.

Method used

By constructing a hierarchical causal graph model, performing quantitative analysis based on phase calculation error, combining exposure marginal effect for adaptive weighted fusion, and using counterfactual prediction method to correct the initial point cloud, a causal fusion image and a corrected 3D point cloud are generated.

Benefits of technology

It significantly improves the integrity, accuracy, and robustness of 3D contour detection on the surface of complex industrial parts. It is applicable to metal parts, dark plastic parts, and workpieces with mixed materials, reduces system deployment and maintenance costs, reduces phase jump and wrapping errors, and generates geometrically complete and curvature-continuous 3D contours.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123032849A_ABST
    Figure CN123032849A_ABST
Patent Text Reader

Abstract

The application discloses a part three-dimensional contour detection method and system based on multi-exposure image fusion, and relates to the technical field of contour detection.The method comprises the following steps: determining image surface reflectivity according to a multi-exposure image sequence and exposure environment parameters, and constructing a layered causal graph model; performing quantitative analysis based on phase solution error based on the layered causal graph model to obtain an exposure marginal effect; under a multi-scale decomposition framework, combining the exposure marginal effect to perform adaptive weighted fusion on the multi-exposure image sequence to generate a causal fusion image; performing structured light phase decoding based on the causal fusion image to obtain initial point cloud, and correcting the initial point cloud by using a counterfactual prediction method to obtain modified three-dimensional point cloud, and constructing a part three-dimensional contour.The application promotes multi-exposure fusion from simple pixel-level weighting to semantic-level reconstruction with physical interpretability, and significantly improves the integrity, precision and robustness of three-dimensional contour detection of complex industrial part surfaces.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of contour detection technology, and more specifically, to a method and system for three-dimensional contour detection of components based on multi-exposure image fusion. Background Technology

[0002] 3D contour inspection of components is a core component of quality inspection in intelligent manufacturing, and its accuracy and efficiency directly determine product yield and production line cycle time. However, the surface reflectivity of industrial components such as metal parts and dark plastics varies drastically, making it difficult to balance overexposure of highlights and underexposure of shadows with a single exposure, leading to phase decoding failure, missing point clouds, or contour distortion. Therefore, 3D contour inspection based on multi-exposure image fusion has become a key technology to overcome the bottleneck in high dynamic range scenes. By fusing complementary information under different exposure conditions, the integrity, accuracy, and robustness of complex workpiece surface reconstruction can be significantly improved, which is crucial for ensuring the reliability of intelligent quality inspection.

[0003] However, existing methods for detecting 3D contours of parts based on multi-exposure image fusion rely solely on grayscale statistics or fixed thresholds to assess exposure quality. This fails to differentiate between overexposed highlights and underexposed shadows, often misassigning high weights to invalid pixels or treating real textures as noise suppression, resulting in brightness banding at the boundaries between light and dark areas in the fused image. Furthermore, the use of fixed weights in multi-scale fusion often leads to the obscuring of clear highlights by saturated white spots and the incorrect preservation of noise artifacts in shadows, causing phase jumps and accumulated wrapping errors. This results in large areas of voids in the reconstructed point cloud at abrupt curvature changes. Simultaneously, point cloud correction relies solely on passive interpolation filtering, which can only fill in neighboring averages when stripes disappear or phase confusion occurs, leading to curvature discontinuities and jagged boundaries. Overall, these methods lack causal modeling and counterfactual reasoning capabilities, limiting fusion to pixel stitching and failing to proactively infer ideal 3D structures. New materials require recalibration, resulting in long detection cycles and failing to meet the real-time and cross-material robustness requirements of intelligent manufacturing.

[0004] There are currently no effective solutions to the problems in the relevant technologies. Summary of the Invention

[0005] To address the problems in related technologies, this invention proposes a method and system for detecting the three-dimensional contours of components based on multi-exposure image fusion, in order to overcome the aforementioned technical problems existing in the existing related technologies.

[0006] Therefore, the specific technical solution adopted by the present invention is as follows:

[0007] According to one aspect of the present invention, a method for detecting three-dimensional contours of components based on multi-exposure image fusion is provided, the method comprising:

[0008] The surface reflectance of the image is determined based on the multi-exposure image sequence and exposure environment parameters, and a hierarchical causal graph model is constructed. Based on the hierarchical causal graph model, a quantitative analysis based on phase solution error is performed to obtain the exposure marginal effect.

[0009] Within the multi-scale decomposition framework, an adaptive weighted fusion of multi-exposure image sequences is performed by combining the exposure marginal effect to generate a causal fusion image.

[0010] Structured light phase decoding is performed based on causal fusion images to obtain an initial point cloud. The initial point cloud is then corrected using counterfactual prediction to obtain a corrected 3D point cloud. The 3D contour of the component is then constructed based on the corrected 3D point cloud.

[0011] Furthermore, the surface reflectance of the image is determined based on the multi-exposure image sequence and exposure environment parameters, and a hierarchical causal graph model is constructed. Based on this model, a quantitative analysis based on phase calculation error is performed, revealing that the exposure marginal effect includes:

[0012] For each pixel in the multi-exposure image sequence, the unsaturated exposure value with the highest signal-to-noise ratio is selected as the effective observed brightness. The effective observed brightness is divided by the exposure environment parameters under the exposure conditions to obtain the normalized radiance.

[0013] The normalized radiance is spatially smoothed using a smoothing filter to obtain the surface reflectance of the image.

[0014] All image surface reflectances are used as confusion control variables, and a hierarchical causal graph model is constructed by combining exposure environment parameters and phase calculation errors;

[0015] Based on the hierarchical causal graph model, hierarchical optimization is performed to obtain the optimized hierarchical discretization strategy. Then, the effect estimation analysis of the optimized hierarchical discretization strategy is performed to obtain the exposure marginal effect.

[0016] Furthermore, by using the surface reflectance of all images as a confusion control variable and combining exposure environment parameters and phase calculation errors, a hierarchical causal graph model is constructed, including:

[0017] The reflectance of all image surfaces is discretized in layers according to a preset reflectance level threshold, resulting in reflectance levels and pixel subsets of each level.

[0018] Using a subset of pixels at each level as a layer unit, the reflectivity conditions are fixed within each reflection level, and four-step phase-shift decoding is performed to obtain the layer phase calculation error under each exposure condition.

[0019] By constructing layered nodes using reflectivity levels as confusion control variables, setting exposure environment parameters as processing variables and phase calculation error as result variables, and determining the directed edges of the layered nodes based on the optical imaging mechanism, a layered causal graph model is obtained.

[0020] Furthermore, based on the hierarchical causal graph model, hierarchical optimization is performed to obtain the optimized hierarchical discretization strategy. Then, effect estimation analysis is conducted on the optimized hierarchical discretization strategy to obtain the exposure marginal effect, which includes:

[0021] Hybrid path identification is performed on the hierarchical causal graph model to obtain a set of candidate backdoor paths, and an optimized hierarchical discretization strategy is generated based on the set of candidate backdoor paths.

[0022] The intra-layer effect estimate is determined based on the optimized hierarchical discretization strategy, and the global unbiased average treatment effect is generated by combining the optimized hierarchical weights.

[0023] The global unbiased averaging effect is compared with the error level under the reference exposure conditions, and the marginal change of each exposure condition relative to the reference exposure conditions is quantified based on the comparison results to obtain the exposure marginal effect under each exposure condition.

[0024] Furthermore, hybrid path identification is performed on the hierarchical causal graph model to obtain a set of candidate backdoor paths. Based on the set of candidate backdoor paths, an optimized hierarchical discretization strategy is generated, including:

[0025] A topological traversal is performed on the hierarchical nodes and directed edges in the hierarchical causal graph model, and all non-causal backdoor paths from exposure environment parameters to phase calculation errors are identified to obtain a set of candidate backdoor paths.

[0026] Given a reflectivity level, the candidate backdoor path set is tested for path blocking and the effectiveness of adjustment variables is verified according to the directed separation criterion to obtain the identifiability verification results.

[0027] Using the identifiability verification results as constraints, and combining the physical response relationship between image surface reflectivity and phase calculation error in the optical imaging mechanism, the discretization boundary is determined. Then, using the discretization boundary as the dividing point, the continuous image surface reflectivity in the full dynamic range is divided into mutually exclusive hierarchical intervals, resulting in the optimized hierarchical discretization strategy.

[0028] Furthermore, the intra-layer effect estimate is determined based on the optimized hierarchical discretization strategy, and the globally unbiased average treatment effect is generated by combining the optimized hierarchical weights, including:

[0029] Within each pixel subset of the optimized hierarchical discretization strategy, the backdoor path is blocked under a fixed reflectivity condition, and the mean phase solution error for each exposure condition is calculated to obtain the intra-layer effect estimate.

[0030] The proportion of pixel subsets at each level in the total pixels of the multi-exposure image sequence in the optimized hierarchical discretization strategy is statistically analyzed, and the proportion results are normalized to obtain the optimized hierarchical weights.

[0031] The intra-layer effect estimate and the optimized hierarchical weights are weighted and aggregated to obtain the global unbiased average treatment effect.

[0032] Furthermore, within the multi-scale decomposition framework, adaptive weighted fusion of multi-exposure image sequences is performed in conjunction with the exposure marginality effect to generate causal fusion images, including:

[0033] The exposure marginal effect is normalized to obtain the normalized marginal effect, and the normalized marginal effect is used as the causal fusion weight.

[0034] Within the multi-scale decomposition framework of shear wave transform, multi-exposure image sequences are decomposed into multi-scale and multi-directional sub-bands in each direction. Adaptive weighted superposition is then performed within each sub-band using causal fusion weights as fusion coefficients to obtain the multi-scale sub-band coefficient matrix.

[0035] By combining the multi-scale subband coefficient matrix and exposure invariance constraints, inverse shear wave transformation is performed to reconstruct the causal fusion image.

[0036] Furthermore, structured light phase decoding is performed based on the causal fusion image to obtain an initial point cloud, and the initial point cloud is corrected using a counterfactual prediction method to obtain a corrected 3D point cloud, including:

[0037] The wrapping phase is extracted from the fusion stripes of the causal fusion image using a four-step phase-shifting method. The wrapping phase is then unfolded to obtain an absolute phase map. Triangulation of the absolute phase map is performed using calibration parameters to obtain an initial point cloud.

[0038] A point cloud topology map is constructed based on the initial point cloud, and counterfactual depth prediction is performed on the point cloud topology map to obtain the counterfactual predicted depth. The initial point cloud is then corrected based on the counterfactual predicted depth to obtain the corrected point cloud data.

[0039] Outlier removal is performed on the corrected point cloud data based on statistical filtering to obtain denoised point cloud data. Surface fitting is then performed on the denoised point cloud data to obtain the corrected 3D point cloud.

[0040] Furthermore, a point cloud topology map is constructed based on the initial point cloud, and counterfactual depth prediction is performed on the point cloud topology map to obtain the counterfactual predicted depth. The initial point cloud is then corrected based on the counterfactual predicted depth to obtain the corrected point cloud data, including:

[0041] The points in the initial point cloud are used as graph nodes, and the edge structure is constructed based on spatial proximity relationships. The edge credibility is calculated according to the causal fusion weights corresponding to each graph node, and a point cloud topology graph with credibility is generated.

[0042] The depth and phase features of neighborhood graph nodes are aggregated using a message passing mechanism in the point cloud topology graph, and the aggregation result is used as the initial embedding of graph nodes. In the graph convolutional layer, the counterfactual depth mapping learning under the optimal exposure condition is carried out using a message passing learning mechanism with edge credibility weighting, so as to obtain the counterfactual predicted depth of each graph node.

[0043] Low-confidence nodes are identified based on the discrepancy between the counterfactual predicted depth and the actual decoded depth. The observed depth of the low-confidence nodes is then replaced with the counterfactual predicted depth to obtain the corrected point cloud data.

[0044] According to another aspect of the present invention, a three-dimensional contour detection system for components based on multi-exposure image fusion is provided, the system comprising:

[0045] The quantization analysis module is used to determine the surface reflectance of the image based on the multi-exposure image sequence and exposure environment parameters, and to construct a hierarchical causal graph model. Based on the hierarchical causal graph model, quantization analysis based on phase solution error is performed to obtain the exposure marginal effect.

[0046] The image weighted fusion module is used to adaptively weight and fuse multi-exposure image sequences within a multi-scale decomposition framework, taking into account the exposure marginal effect, to generate a causal fusion image.

[0047] The point cloud correction module is used to perform structured light phase decoding based on causal fusion images to obtain an initial point cloud, and then use counterfactual prediction to correct the initial point cloud to obtain a corrected 3D point cloud. The 3D contour of the component is then constructed based on the corrected 3D point cloud.

[0048] The beneficial effects of this invention are as follows:

[0049] 1. This invention fundamentally overcomes the technical bottleneck of traditional structured light 3D detection in high dynamic range scenarios by using a hierarchical causal graph model and counterfactual prediction. This bottleneck is caused by the inability of a single exposure to simultaneously cover overexposure of highlights and underexposure of shadows, resulting in phase decoding failure, missing point clouds, or contour distortion. By introducing causal inference theory and counterfactual prediction mechanism, multi-exposure fusion is upgraded from simple pixel-level weighting to semantic-level reconstruction with physical interpretability. This significantly improves the integrity, accuracy, and robustness of 3D contour detection on the surface of complex industrial parts. It is especially suitable for actual production line environments with drastic changes in reflectivity, such as metal parts, dark plastic parts, and mixed-material workpieces.

[0050] 2. This invention, through quantitative analysis, abandons the blind reliance of traditional methods that solely depend on image grayscale statistics or empirical thresholds to assess exposure quality. Instead, it explicitly models the relationship chain between exposure parameters, surface reflectivity, and phase calculation errors by constructing a hierarchical causal graph model. This allows the quantitative analysis of exposure marginal effects to go beyond superficial judgments of local brightness saturation, delving into the physical mechanisms of optical imaging. It can accurately identify which regions' phase errors are caused by systematic deviations due to underexposure or overexposure rather than random noise, thus providing a priori confidence with clear physical meaning for subsequent fusion. This effectively avoids improper fusion weight allocation due to incorrect attribution. Furthermore, this causal model has excellent cross-scene transfer capabilities, adaptively resolving exposure degradation modes under different reflectivity distributions without requiring recalibration for each new material, significantly reducing system deployment and maintenance costs.

[0051] 3. This invention achieves synergistic optimization fusion of exposure margin effects and image detail information within a multi-scale decomposition framework through adaptive weighted fusion. Unlike the fixed-weight fusion strategies in traditional Laplacian pyramids or wavelet transforms, this method injects the obtained causal confidence as an adaptive weight into the fusion process of each scale sub-band. This ensures that in low-frequency approximation components, high-confidence exposed images dominate global structure recovery, while in high-frequency detail components, the weights are dynamically adjusted according to local exposure margin effects to preserve edge sharpness and texture information. This prevents phase fringes lost due to overexposure in highlight areas from being incorrectly filled by low-quality images, and avoids artifacts in shadow areas from polluting the fusion results due to low signal-to-noise ratio. The generated causal fusion image not only presents a natural and continuous tone transition visually, but more importantly, its phase encoding information maintains mathematical consistency and physical authenticity globally, providing a high-quality input source for subsequent decoding and significantly reducing phase jumps and wrapping errors caused by fusion artifacts.

[0052] 4. This invention introduces 3D point cloud correction through counterfactual prediction, completely changing the previous passive repair paradigm of simply filtering, smoothing, or interpolating to fill holes in the initial point cloud. It uses the initial point cloud obtained from causal fusion image decoding as the observation basis and uses a pre-trained graph neural network model to simulate the counterfactual state of the geometric shape that the region should present under ideal exposure conditions. Through joint reasoning of the node neighborhood topology and edge credibility, it actively infers and fills in missing or distorted 3D coordinates. Especially in extreme failure scenarios such as the complete disappearance of stripes due to high light saturation or phase confusion caused by multiple reflections on the inner wall of deep holes, it can still generate reasonable point clouds that conform to physical constraints based on the geometric context and material priors of the surrounding reliable areas. This makes the constructed 3D contour not only geometrically complete and without breaks or holes, but also with continuous curvature and clear boundaries. At the same time, since the counterfactual correction process is embedded in the end-to-end network, no additional post-processing steps are required, providing a solution with both theoretical depth and engineering practical value for the quality inspection of intelligent manufacturing. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1 This is a flowchart of a three-dimensional contour detection method for components based on multi-exposure image fusion according to an embodiment of the present invention;

[0055] Figure 2 This is a schematic diagram of a three-dimensional contour detection system for parts based on multi-exposure image fusion according to an embodiment of the present invention.

[0056] Figure 3 This is a sample image of a multi-exposure image sequence according to an embodiment of the present invention;

[0057] Figure 4 This is the first set of uncorrected phase maps according to an embodiment of the present invention;

[0058] Figure 5 This is the first set of corrected phase diagrams according to an embodiment of the present invention;

[0059] Figure 6 This is the second set of uncorrected phase maps according to an embodiment of the present invention;

[0060] Figure 7 This is the second set of corrected phase diagrams according to an embodiment of the present invention;

[0061] Figure 8 This is the third set of uncorrected phase maps according to embodiments of the present invention;

[0062] Figure 9 This is the third set of corrected phase diagrams according to an embodiment of the present invention;

[0063] Figure 10 This is a comparison image of point cloud reconstruction before and after correction according to an embodiment of the present invention;

[0064] Figure 11 This is a flowchart of contour detection according to an embodiment of the present invention.

[0065] In the picture:

[0066] 1. Quantitative analysis module; 2. Image weighted fusion module; 3. Point cloud correction module. Detailed Implementation

[0067] To further illustrate the various embodiments, the present invention provides accompanying drawings, which are part of the disclosure of the present invention. These drawings are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these drawings, those skilled in the art should be able to understand other possible implementation methods and the advantages of the present invention.

[0068] According to embodiments of the present invention, a method and system for detecting three-dimensional contours of components based on multi-exposure image fusion are provided.

[0069] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments, such as... Figure 1 As shown, according to an embodiment of the present invention, a method for detecting the three-dimensional contour of components based on multi-exposure image fusion is provided, the method comprising:

[0070] The surface reflectance of the image is determined based on the multi-exposure image sequence and exposure environment parameters, and a hierarchical causal graph model is constructed. Based on the hierarchical causal graph model, a quantitative analysis based on phase solution error is performed to obtain the exposure marginal effect.

[0071] Specifically, the surface reflectance of the image is determined based on the multi-exposure image sequence and exposure environment parameters, and a hierarchical causal graph model is constructed. Based on this model, a quantitative analysis based on phase calculation error is performed to obtain the exposure marginal effects, including:

[0072] For each pixel in the multi-exposure image sequence, the unsaturated exposure value with the highest signal-to-noise ratio is selected as the effective observed brightness. The effective observed brightness is divided by the exposure environment parameters under the exposure conditions to obtain the normalized radiance.

[0073] The normalized radiance is spatially smoothed using a smoothing filter to obtain the surface reflectance of the image.

[0074] All image surface reflectances are used as confounding control variables, and a hierarchical causal graph model is constructed by combining exposure environment parameters and phase calculation errors.

[0075] Specifically, a hierarchical causal graph model is constructed by using the surface reflectance of all images as a confusion control variable and combining exposure environment parameters and phase calculation errors, including:

[0076] The reflectance of all image surfaces is discretized in layers according to a preset reflectance level threshold, resulting in reflectance levels and pixel subsets of each level.

[0077] Using a subset of pixels at each level as a layer unit, the reflectivity conditions are fixed within each reflection level, and four-step phase-shift decoding is performed to obtain the layer phase calculation error under each exposure condition.

[0078] By constructing layered nodes using reflectivity levels as confusion control variables, setting exposure environment parameters as processing variables and phase calculation error as result variables, and determining the directed edges of the layered nodes based on the optical imaging mechanism, a layered causal graph model is obtained.

[0079] Based on the hierarchical causal graph model, hierarchical optimization is performed to obtain the optimized hierarchical discretization strategy. Then, the effect estimation analysis of the optimized hierarchical discretization strategy is performed to obtain the exposure marginal effect.

[0080] Specifically, based on the hierarchical causal graph model, hierarchical optimization is performed to obtain the optimized hierarchical discretization strategy. Then, effect estimation analysis is conducted on the optimized hierarchical discretization strategy to obtain the exposure marginal effect, which includes:

[0081] Hybrid path identification is performed on the hierarchical causal graph model to obtain a set of candidate backdoor paths, and an optimized hierarchical discretization strategy is generated based on the set of candidate backdoor paths.

[0082] Specifically, the hierarchical causal graph model is subjected to hybrid path identification to obtain a set of candidate backdoor paths. Based on the set of candidate backdoor paths, an optimized hierarchical discretization strategy is generated, including:

[0083] A topological traversal is performed on the hierarchical nodes and directed edges in the hierarchical causal graph model, and all non-causal backdoor paths from exposure environment parameters to phase calculation errors are identified to obtain a set of candidate backdoor paths.

[0084] Given a reflectivity level, the candidate backdoor path set is tested for path blocking and the effectiveness of adjustment variables is verified according to the directed separation criterion to obtain the identifiability verification results.

[0085] Using the identifiability verification results as constraints, and combining the physical response relationship between image surface reflectivity and phase calculation error in the optical imaging mechanism, the discretization boundary is determined. Then, using the discretization boundary as the dividing point, the continuous image surface reflectivity in the full dynamic range is divided into mutually exclusive hierarchical intervals, resulting in the optimized hierarchical discretization strategy.

[0086] The intra-layer effect estimate is determined based on the optimized hierarchical discretization strategy, and the global unbiased average treatment effect is generated by combining the optimized hierarchical weights.

[0087] Specifically, the intra-layer effect estimation is determined based on the optimized hierarchical discretization strategy, and the globally unbiased average treatment effect is generated by combining the optimized hierarchical weights, including:

[0088] Within each pixel subset of the optimized hierarchical discretization strategy, the backdoor path is blocked under a fixed reflectivity condition, and the mean phase solution error for each exposure condition is calculated to obtain the intra-layer effect estimate.

[0089] The proportion of pixel subsets at each level in the total pixels of the multi-exposure image sequence in the optimized hierarchical discretization strategy is statistically analyzed, and the proportion results are normalized to obtain the optimized hierarchical weights.

[0090] The intra-layer effect estimate and the optimized hierarchical weights are weighted and aggregated to obtain the global unbiased average treatment effect.

[0091] The global unbiased averaging effect is compared with the error level under the reference exposure conditions, and the marginal change of each exposure condition relative to the reference exposure conditions is quantified based on the comparison results to obtain the exposure marginal effect under each exposure condition.

[0092] Specifically, in the quantitative analysis of the exposure marginal effect based on the hierarchical causal graph model, the data processing flow begins with pixel-by-pixel preprocessing of a multi-exposure structured light image sequence containing 12 frames with exposure times gradually increasing from 0.5ms to 20ms. The exposure environment parameters include not only the precisely calibrated exposure times for each frame (e.g., 0.5ms, 1ms, 2ms, 4ms, 6ms, 8ms, 10ms, 12ms, 14ms, 16ms, 18ms, 20ms), but also the aperture coefficient f / 5.6 and the light source power density of 3.2W / cm². 2 Ambient light irradiance 0.15W / m 2 In addition to the camera gain of 1.8dB and other joint calibration parameters, these parameters together constitute the normalized exposure factor E. k =t k ×(A ref / A k ) 2 ×(P k / P ref )×(G k / G ref That is, the normalized exposure factor is obtained by linearly superimposing exposure times t. k The aperture value A used when shooting the kth frame. k and the selected reference aperture value A ref Correcting for changes in the aperture's light-transmitting area, the actual output power density P of the structured light source at the time of acquisition in the k-th frame is used. k and reference light source power density P ref The proportional compensation for light source intensity fluctuations is achieved through the analog / digital gain value G of the camera in the k-th frame. k and reference gain value G refLinear correction of camera gain differences maps the brightness differences between frames in a multi-exposure sequence caused by variations in optical and electronic parameters to an equivalent radiometric scale based on a reference frame. This ensures that the calculated normalized radiometric brightness reflects only the intrinsic reflectivity of the object's surface, unaffected by changes in non-target variables during acquisition. For each spatial coordinate (x, y), all 12 frames of grayscale values ​​are iterated. k (x,y), based on the sRGB response curve, saturated pixels with grayscale values ​​> 4090 and low-quality observations with a signal-to-noise ratio below 18dB are removed. The grayscale value with the highest effective signal intensity in the remaining frames is selected as the effective observation brightness L of that pixel. eff (x,y), L eff (x,y) divided by the normalized exposure factor E of the corresponding frame k To obtain the normalized radiance R norm (x,y)=L eff (x,y) / E k Then, a Gaussian smoothing filter with σ=3.0 is used to smooth R. norm Spatial convolution is performed on (x,y) to suppress shot noise and high-frequency texture interference. The output is the image surface reflectivity ρ(x,y), which reflects the intrinsic optical properties of the object. Its value range is truncated to [0.02, 0.98] to avoid extreme values ​​affecting subsequent statistical stability. Figure 3 As shown, a partial sequence of multi-exposure structured light images is presented.

[0093] Based on the global histogram distribution of ρ(x,y) at a resolution of 2048×2048, and combined with the nonlinear inflection point characteristics of phase calculation error with reflectivity in the optical imaging mechanism, five reflection level thresholds {0.08, 0.22, 0.45, 0.70, 0.98} are preset, and the entire image is divided into five mutually exclusive level subsets S1 to S5. Each subset contains approximately 18%, 24%, 28%, 20%, and 10% of the pixels, respectively. Within each level subset, the reflectivity condition ρ∈S is fixed. i Where i represents the number of levels, standard arctangent decoding is performed on the four-step phase-shift fringe pattern and the phase resolution error ε relative to the high-precision laser scanning true value is calculated. k,i Thus, the exposure conditions E are obtained. k The conditional error distribution at each level; based on this, the reflectivity level Z... i To obfuscate the control variable node, the exposure environment parameter T as the processing variable node, and the phase calculation error Y as the result variable node, a direct causal edge from T to Y and Z are established based on the Lambert-Beer law and the camera noise model. i Point to T, Z i The backdoor hybrid edges pointing to Y form a hierarchical causal graph model with a five-layer parallel structure.

[0094] By optimizing the hybrid path identification and discretization strategy—that is, by using a depth-first search to traverse all non-causal paths from T to Y in the graph—five candidate backdoor paths {Z} are identified. i Pointing to T and Z i Pointing to Y}, given Z i Under the given conditions, the d-separation criterion (i.e., the directed separation criterion) is applied to verify whether the path is blocked, confirming that the path is blocked if and only if Z... i The backdoor path can only be closed when precisely hierarchical control is applied, and then the identifiability verification result is used as a constraint, combining ρ(x,y) and ε. k,i The zeros of the second derivative of the physical response curve are recalibrated to recalibrate the discretization boundary. The original equally spaced division is adjusted to an adaptive non-uniform interval {[0.02,0.09),[0.09,0.24),[0.24,0.48),[0.48,0.72),[0.72,0.98]}, generating an optimized hierarchical discretization strategy. Details are shown in Table 1 below.

[0095] Table 1. Classification and Weighting of Reflectivity Levels

[0096] hierarchy Original threshold Optimized lower limit of the interval Optimized upper limit of interval Pixel ratio weight S1 0.08 0.02 0.09 0.178 S2 0.22 0.09 0.24 0.239 S3 0.45 0.24 0.48 0.281 S4 0.70 0.48 0.72 0.201 S5 0.98 0.72 0.98 0.101

[0097] Effect estimation is performed by calculating E for each exposure condition within each subset of optimization levels. k The mean phase error μ k,i As an estimate of intra-layer effects, ATE i (E k At the same time, the proportion of pixels at each level to the total number of pixels is calculated. i And normalized to hierarchical weights {0.178, 0.239, 0.281, 0.201, 0.101}, for each level ATE i (E k Press w i Weighted summation yields the global unbiased average treatment effect ATE(E) k )=Σw i ·ATE i (E k Select the baseline exposure condition E. ref =8ms corresponds to ATE(E) ref Using 0.032rad as the error baseline, the ATE(E) for the other 11 exposure conditions was compared. k The marginal change ΔATE(E) of each exposure condition relative to the baseline is obtained by subtracting it from the baseline and taking the absolute value. k )=|ATE(E k )−ATE(E ref )|, for example E k =2ms ΔATE=0.087rad, E kAt 15ms, ΔATE = 0.041 rad, E k At 20ms, ΔATE = 0.112rad. This group of ΔATE(E) k This constitutes the final exposure marginal effect vector, which not only characterizes the degree of causal deviation in phase calculation accuracy under different exposure levels, but also directly reflects the residual systematic bias introduced by insufficient control of reflectivity contamination. It provides a physically interpretable and statistically unbiased quantitative basis for the allocation of causal weights in multi-scale fusion, ensuring that the obtained exposure marginal effect meets both the requirements of causal identifiability and the numerical stability and cross-scene generalization capabilities required for engineering implementation. See Table 2 below for details.

[0098] Table 2. Exposure conditions and marginal effects

[0099] Exposure conditions Exposure time (ms) <![CDATA[ATE(E k )(rad)]]> <![CDATA[ΔATE(E k )(rad)]]> E1 0.5 0.118 0.086 E2 1.0 0.104 0.072 E3 2.0 0.119 0.087 E4 4.0 0.089 0.057 Eref 8.0 0.032 0.000 E6 10.0 0.048 0.016 E7 12.0 0.069 0.037 E8 14.0 0.085 0.053 E9 16.0 0.075 0.043 E10 18.0 0.061 0.029 E11 20.0 0.144 0.112

[0100] Within the multi-scale decomposition framework, an adaptive weighted fusion of multi-exposure image sequences is performed by incorporating the exposure marginal effect to generate a causal fusion image.

[0101] Specifically, within the multi-scale decomposition framework, adaptive weighted fusion of multi-exposure image sequences, incorporating exposure marginality effects, generates causal fusion images, including:

[0102] The exposure marginal effect is normalized to obtain the normalized marginal effect, and the normalized marginal effect is used as the causal fusion weight.

[0103] Within the multi-scale decomposition framework of shear wave transform, multi-exposure image sequences are decomposed into multi-scale and multi-directional sub-bands in each direction. Adaptive weighted superposition is then performed within each sub-band using causal fusion weights as fusion coefficients to obtain the multi-scale sub-band coefficient matrix.

[0104] By combining the multi-scale subband coefficient matrix and exposure invariance constraints, inverse shear wave transformation is performed to reconstruct the causal fusion image.

[0105] Specifically, based on the absolute deviation ΔATE(E) of the marginal processing effect of each exposure condition obtained from previous causal inferences, k Perform min-max normalization on it and take its reciprocal to map it to the causal fusion weight w. k =[1−(ΔATE(E k )−minΔATE) / (maxΔATE−minΔATE)] γγ is the error sensitivity adjustment factor, and γ=2.5 is used to enhance the suppression of nonlinearity for high-error exposure frames. For example, when ΔATE is 0.087rad, 0.041rad, and 0.112rad respectively, the weight sequence [0.38, 0.92, 0.15] is obtained after normalization, ensuring that the 15ms optimal exposure frame dominates the fusion while the 20ms overexposed frame is significantly suppressed. The five multi-exposure images, i.e., resolution 2048×2048, are quantized with 12bit and subjected to four layers of non-subsampled shear wave transform (NSST). Each layer is decomposed into 8, 16, 32, and 64 directional subbands, generating a total of 120 sets of subband coefficient matrices C. k,l,d (x,y).

[0106] The weighted fusion coefficient F is calculated pixel-by-pixel within each sub-band. l,d (x,y)=Σ(w k ×C k,l,d (x,y)) / Σw k At the same time, an exposure invariance constraint term λ·|∂F is introduced. l,d (x,y) / ∂E k |² is used as the regularization penalty embedding fusion objective function, where λ=0.03 is adaptively determined by the L-curve method, forcing the fusion result to approach zero with respect to exposure change gradients in the local neighborhood; a hard threshold is applied to the fused sub-band coefficient matrix for noise reduction, the threshold σ is estimated by MAD and verified with the coefficients, i.e., removing cross-scale sign flip anomalies, and a preliminary causal fusion image is obtained by reconstructing through the NSST inverse transform, that is, the NSST coefficients of each scale and direction after processing by the causal fusion strategy are reorganized according to the original decomposition structure to ensure that the spatial positions and indices of the low-frequency sub-band and the high-frequency direction sub-band strictly correspond; the NSST inverse transform is called to perform non-subsampled pyramid reconstruction and Shearlet filter bank inverse synthesis to map the frequency domain coefficients back to the spatial domain; during the reconstruction process, the boundary extension method and data type are maintained in accordance with the forward transform, and the output results are normalized or truncated to obtain a numerically stable and artifact-free preliminary causal fusion image. This image is radiometrically registered with the optimal exposure frame in the original multi-exposure sequence, i.e., 15ms, by solving the linear equation system I fused =α·I ref +β corrects the global gain offset, I fused This represents the output signal value or fused image pixel value after gain and offset correction, where α represents the global gain coefficient, and I... ref α represents the reference strength value, β represents the global offset, and the measured values ​​are α=0.987 and β=12.3.

[0107] Structured light phase decoding is performed based on causal fusion images to obtain an initial point cloud. The initial point cloud is then corrected using counterfactual prediction to obtain a corrected 3D point cloud. The 3D contour of the component is then constructed based on the corrected 3D point cloud.

[0108] Specifically, structured light phase decoding is performed based on causal fusion images to obtain an initial point cloud, and the initial point cloud is corrected using a counterfactual prediction method to obtain a corrected 3D point cloud, including:

[0109] The wrapping phase is extracted from the fusion stripes of the causal fusion image using a four-step phase-shifting method. The wrapping phase is then unfolded to obtain an absolute phase map. Triangulation of the absolute phase map is performed using calibration parameters to obtain an initial point cloud.

[0110] A point cloud topology map is constructed based on the initial point cloud, and counterfactual depth prediction is performed on the point cloud topology map to obtain the counterfactual predicted depth. The initial point cloud is then corrected based on the counterfactual predicted depth to obtain the corrected point cloud data.

[0111] Specifically, a point cloud topology map is constructed based on the initial point cloud, and counterfactual depth prediction is performed on the point cloud topology map to obtain the counterfactual predicted depth. The initial point cloud is then corrected based on the counterfactual predicted depth to obtain the corrected point cloud data, which includes:

[0112] The points in the initial point cloud are used as graph nodes, and the edge structure is constructed based on spatial proximity relationships. The edge credibility is calculated according to the causal fusion weights corresponding to each graph node, and a point cloud topology graph with credibility is generated.

[0113] The depth and phase features of neighborhood graph nodes are aggregated using a message passing mechanism in the point cloud topology graph, and the aggregation result is used as the initial embedding of graph nodes. In the graph convolutional layer, the counterfactual depth mapping learning under the optimal exposure condition is carried out using a message passing learning mechanism with edge credibility weighting, so as to obtain the counterfactual predicted depth of each graph node.

[0114] Low-confidence nodes are identified based on the discrepancy between the counterfactual predicted depth and the actual decoded depth. The observed depth of the low-confidence nodes is then replaced with the counterfactual predicted depth to obtain the corrected point cloud data.

[0115] Outlier removal is performed on the corrected point cloud data based on statistical filtering to obtain denoised point cloud data. Surface fitting is then performed on the denoised point cloud data to obtain the corrected 3D point cloud.

[0116] Specifically, four causal fusion stripe images, after global gain offset correction, are read. These images are stored in 16-bit unsigned integer format with a resolution typically of 2048×2048. A four-step phase-shift algorithm is used to calculate the wrapping phase pixel by pixel, resulting in a floating-point wrapping phase image whose value range is limited to between negative π and positive π. A composite time-phase unfolding strategy combining multi-frequency heterodyne and Gray code is employed to solve the wrapping phase into a continuous absolute phase image. This process needs to handle phase jumps and noise regions. The continuity of the unfolding result is ensured through quality-guided path tracking, i.e., a quality evaluation map of the same size as the wrapping phase image is constructed. The magnitude of the statistical phase gradient change or the sum of the absolute values ​​of the second-order differences in the local neighborhood of each pixel is calculated. The smaller the value, the smoother and more reliable the phase at that point, and the less likely it is to be misjudged due to 2π jumps. All pixels in the quality map are sorted from high to low quality values. The pixel is pushed into a priority queue. Simultaneously, an array of visited markers the same size as the image and an array of period counts that are multiples of the image size are initialized. Initially, the highest quality seed point is marked as visited and its period count is set to zero. The loop iterates through the priority queue, taking the highest quality unprocessed pixel as the current point each time. It then traverses its four- or eight-neighborhood of unvisited adjacent pixels. For each pair of adjacent pixels, the wrap-around phase difference is calculated. If the difference is greater than positive π, a negative transition is identified, and the period count of the adjacent pixel is incremented by one. If the difference is less than negative π, a positive transition is identified, and the period count of the adjacent pixel is decremented by one. Otherwise, the period count remains unchanged. After assigning the period value, the adjacent pixel is immediately marked as visited and inserted into the priority queue based on its quality value. This process is repeated until the queue is empty, meaning all pixels have been visited.

[0117] Throughout the propagation process, because the propagation always proceeds from high-quality areas to low-quality areas, the correct periodic information of high-confidence areas is prioritized and gradually transmitted to low-quality areas such as noise or shadows. This effectively avoids the problems of error accumulation and stripe order disorder in low-quality areas caused by the traditional line-by-line scanning method. In actual engineering implementation, the quality map also needs to be normalized to prevent the sorting instability caused by floating-point precision, and a heap structure is used in the priority queue to ensure that the time complexity of each pop operation is logarithmic. When encountering a completely isolated low-quality area that cannot be reached through neighborhood propagation, an unvisited pixel cluster can be detected separately after the main loop ends. The highest relative quality point within it is used as a new seed to restart a round of local propagation. The period count of all areas is added to the original wrapped phase and multiplied by 2π to obtain a globally continuous absolute phase map, providing unambiguous phase input for subsequent triangulation.

[0118] By combining the pre-calibrated camera intrinsic parameters, distortion coefficients, and extrinsic parameter matrix between the projector and the camera, the absolute phase of each pixel is converted into three-dimensional spatial coordinates based on the principle of triangulation, generating an initial point cloud dataset containing millions of points. At this time, due to the specular reflection of the surface of the metal parts, shadow occlusion, and ambient light interference, the depth values ​​of some areas have obvious deviations or are missing. The topology graph is constructed based on the initial point cloud. Specifically, an octree spatial index is used to quickly find the k nearest neighbors of each point. Typically, k is between 16 and 32. The Euclidean distance is less than a preset threshold as the condition for connecting edges. That is, when constructing the point cloud topology graph based on the octree spatial index, the preset Euclidean distance threshold is not set using a fixed empirical value, but follows an adaptive local density estimation rule. Specifically, a global statistical analysis is performed on the initial point cloud to calculate the average distance from all points to their k nearest neighbors. k is usually between 16 and 32 as the baseline scale parameter. This parameter reflects the overall sampling density and spatial distribution characteristics of the point cloud. The edge connection threshold is set to 1.5 to 2.0 times this baseline scale parameter. The reason for choosing this multiple range is to ensure that each node can be connected to a sufficient number of nearest neighbors to maintain the connectivity of the graph and the integrity of the local geometric description, while avoiding incorrect connection of spatially unrelated distant points due to an excessively large threshold, thereby destroying the true topology of the components.

[0119] In practical engineering implementation, for structured light reconstructed point clouds with a resolution of approximately 2048×2048, the edge threshold obtained after the above adaptive calculation usually falls within the specific value range of 0.3mm to 1.2mm. Among them, the threshold in high-density fine scanning areas tends to be at the lower end of 0.3mm to 0.6mm, while the threshold in sparse edge or shadow transition areas can be relaxed to the higher end of 0.8mm to 1.2mm. To further enhance robustness, a hierarchical threshold strategy can also be introduced. That is, the core skeleton edge is first constructed with a smaller threshold, and the threshold is gradually increased for isolated subgraphs or nodes with a degree below the lower limit to perform secondary edge filling, until the number of connected components in the whole graph drops to the expected level or reaches the maximum allowable threshold upper limit. This provides a reliable spatial neighborhood relationship basis for subsequent message passing and counterfactual depth prediction based on edge credibility. Simultaneously, the fusion weight corresponding to each pixel is inherited from the causal fusion stage. This weight reflects the signal-to-noise ratio and exposure rationality of the position in the original multi-exposure image sequence. It is mapped onto the 3D point cloud as a node attribute, and the credibility of the edge is determined by the harmonic average of the weights of the two end nodes, thereby generating a point cloud topology map with credibility annotations.

[0120] The topology graph is input into a pre-trained graph neural network model, which employs a five-layer edge confidence-weighted graph convolutional architecture. Each layer contains three sub-modules: linear transformation, message aggregation, and residual connection. The input layer receives nine-dimensional node features, namely three-dimensional normalized coordinates, one-dimensional observation depth, one-dimensional absolute phase, one-dimensional fusion weights, and three-dimensional third-order phase gradient statistics. After being mapped to a 64-dimensional hidden space by the first fully connected layer, the features pass through four graph convolutional layers. Within each layer, the hidden states of neighbors and edge features are concatenated and then processed by two layers of multilayer perceptrons (MLPs) to generate message vectors. The vectors are then weighted and aggregated using edge confidence as softmax normalized weights. The aggregation result is added to the current node's hidden state and output as the next layer's hidden representation through layer normalization and Gaussian error linear unit (GELU) activation functions. The final layer maps the 64-dimensional features to a one-dimensional counterfactual predicted depth value through two fully connected layers, namely intermediate corrected linear units (ReLU). Skip connections are retained between all layers to alleviate the oversmoothing problem.

[0121] The pre-trained graph neural network model training data includes: first, ground truth point clouds generated by simulating structured light imaging using digital twins of 2000 industrial parts from a CAD model library in the Blender rendering engine; and second, real scan data collected from actual production lines and calibrated by a high-precision contact coordinate measuring machine. The two types of data are mixed in a 16:1 ratio. During preprocessing, random rotation, translation, scaling, and Gaussian noise injection are performed on the point clouds for data augmentation. Degradation modes such as overexposure / saturation, underexposure / truncation, and stripe breaks are artificially added to the observation depth to simulate low-confidence scenarios. The loss function is a weighted sum of Huber loss and a confidence-aware regularization term. The Huber loss measures the deviation between the predicted depth and the ground truth, while the regularization term penalizes prediction deviations at high-confidence nodes to force the model to prioritize reliable observations. The optimization algorithm uses an adaptive moment estimator optimizer (AdamW) with weighted decay and an initial learning rate of 1e. -4 Combined with cosine annealing scheduling, the weight decay coefficient is 1e. -5 The batch size is set to 32 subgraphs, that is, each subgraph samples 1024 nodes and their two-hop neighborhoods, and a total of 200 epochs are trained.

[0122] Among them, the hidden dimension of the pre-trained graph neural network model is 64, which is a balance between memory usage and expressive power. Through ablation experiments of 32 / 64 / 128, it was confirmed that 64 dimensions have the lowest error on the validation set and the inference speed meets the real-time requirements. The number of graph convolutional layers is 5, which corresponds to the neighborhood range covered by the typical local curvature radius of the component. Less than 4 layers cannot capture enough context, and more than 6 layers will cause oversmoothing and loss of details. The temperature coefficient τ=0.5 in the edge confidence weighting is determined by traversing the range of 0.1 to 2.0 with a step size of 0.1 through grid search. This value concentrates the weights of high confidence edges while fully suppressing the weights of low confidence edges without completely reducing them to zero, thus avoiding gradient breakage. During the training process, the mean absolute error and the accuracy of low confidence node correction are evaluated on an independent validation set every 10 epochs. An early stopping strategy is adopted. When the validation index does not improve for 30 consecutive epochs, the training is terminated and rolled back to the optimal checkpoint.

[0123] The input features of the pre-trained graph neural network model include the normalized 3D coordinates of each node, the observed depth value obtained from actual decoding, and the corresponding absolute phase value. Internally, the network aggregates neighborhood information through a multi-layer message passing mechanism. In each aggregation process, edge confidence is used as a weighting coefficient, making high-confidence neighbors contribute more to the feature update of the current node, while suppressing the contribution of low-confidence neighbors. During the training phase, the network has learned the counterfactual mapping relationship of the depth under optimal exposure conditions using a large amount of synthetic data with real geometric labels. During inference, it outputs the counterfactual predicted depth value for each node. In the correction phase, the absolute residual between the observed depth and the counterfactual predicted depth of each node is calculated, and the mean and standard deviation of the residuals across the entire graph are statistically analyzed. An adaptive threshold is set to the mean plus two standard deviations. When the residual of a node exceeds this threshold and its own fusion weight is less than 0.5, the node is identified as a low-confidence outlier, and its depth value is replaced with the counterfactual predicted depth. The remaining nodes retain their original observed depths, thus generating corrected point cloud data. Statistical outlier filtering is performed on the corrected point cloud. The average distance from each point to its 30 nearest neighbors is calculated, and outliers with an average distance exceeding the global mean plus three standard deviations are removed. Moving least squares is used to fit the surface of the denoised point cloud. A quadratic polynomial basis function is selected for fitting, with the search radius set to three times the average spacing of the point cloud. A Gaussian weighted kernel function is used. The output is a geometrically continuous, outlier-free, and detail-preserving corrected 3D point cloud. (Specific details are as follows...) Figure 10 As shown, a comparison of the point cloud before and after correction is presented. It achieves a closed-loop data processing chain from causal fusion of stripe images to high-precision 3D contours of parts. The entire process requires no manual intervention, and all parameters can be adaptively adjusted according to point cloud density and noise levels, ensuring robustness and consistency of accuracy under different materials and lighting conditions. Figure 4-9The image shows a comparison of three sets of phase corrections, illustrating the distribution of absolute phase and the correction effect under different Gaussian noise levels.

[0124] The corrected 3D point cloud is subjected to statistical outlier filtering and voxel downsampling to remove noise and homogenize density. RANSAC plane fitting is used to remove the background reference plane and extract the effective boundary of the component area. Based on the normal vector consistency criterion, the edge points are subjected to curvature adaptive resampling, and a smooth and continuous 2D contour line is generated by B-spline curve fitting. The contour line is stretched along the normal or combined with the original point cloud depth information to reconstruct the surface, outputting a closed 3D contour model that conforms to CAD standards. At the same time, the curvature radius and dimensional tolerance of each segment are recorded for subsequent detection and comparison.

[0125] like Figure 2 As shown, according to another embodiment of the present invention, a three-dimensional contour detection system for components based on multi-exposure image fusion is provided, the system comprising:

[0126] Quantization analysis module 1 is used to determine the surface reflectance of the image based on the multi-exposure image sequence and exposure environment parameters, and to construct a hierarchical causal graph model. Based on the hierarchical causal graph model, quantitative analysis based on phase solution error is performed to obtain the exposure marginal effect.

[0127] Image weighted fusion module 2 is used to adaptively weight and fuse multi-exposure image sequences under the multi-scale decomposition framework, taking into account the exposure marginal effect, to generate a causal fusion image;

[0128] Point cloud correction module 3 is used to perform structured light phase decoding based on causal fusion image to obtain initial point cloud, and to correct the initial point cloud using counterfactual prediction method to obtain corrected 3D point cloud. The 3D contour of component is constructed based on the corrected 3D point cloud.

[0129] like Figure 11 The diagram illustrates the complete online detection process for the 3D contour of a ring-shaped workpiece. During actual contour detection, structured light is projected onto the workpiece from a central projection device, while industrial cameras on both sides simultaneously acquire images. The detection is completed via three parallel processing branches, yielding progressively larger sample images, multi-exposure sample images, and multi-exposure sample fringe patterns. Superpixel segmentation is performed on different exposure areas of the multi-exposure sample images. These multi-exposure images are then fused to obtain an ideal fringe pattern. Multi-scale stereo matching is used to calculate the 3D point cloud data, achieving high-precision online detection of the workpiece's 3D contour.

[0130] In summary, by utilizing the above-mentioned technical solution of this invention, this invention fundamentally overcomes the technical bottleneck of traditional structured light 3D detection in high dynamic range scenarios, which suffers from phase decoding failure, point cloud loss, or contour distortion due to the inability of a single exposure to simultaneously address highlight overexposure and shadow underexposure. By introducing causal inference theory and counterfactual prediction mechanism, multi-exposure fusion is elevated from simple pixel-level weighting to semantic-level reconstruction with physical interpretability, significantly improving the integrity, accuracy, and robustness of 3D contour detection on complex industrial parts surfaces. It is particularly suitable for metal parts, dark plastic parts, and mixed materials. In real-world production line environments where the reflectivity of workpieces and other materials undergoes drastic changes, this study employs quantitative analysis to overcome the limitations of traditional methods that rely solely on image grayscale statistics or empirical thresholds to assess exposure quality. Instead, it explicitly models the relationship between exposure parameters, surface reflectivity, and phase calculation errors using a hierarchical causal graph model. This allows the quantitative analysis of exposure marginal effects to move beyond superficial judgments of local brightness and saturation, delving into the physical mechanisms of optical imaging. It can accurately identify which areas of phase error are caused by systematic deviations due to underexposure or overexposure, rather than random noise, thus providing a physically meaningful confidence level for subsequent fusion. Prior knowledge effectively avoids improper weight allocation in fusion due to incorrect attribution. Furthermore, this causal model possesses excellent cross-scene transferability, adaptively resolving exposure degradation patterns under different reflectivity distributions without requiring recalibration for each new material, significantly reducing system deployment and maintenance costs. Through adaptive weighted fusion, it achieves synergistic optimization of exposure marginal effects and image detail information within a multi-scale decomposition framework. Unlike the fixed-weight fusion strategies in traditional Laplacian pyramids or wavelet transforms, this method injects the obtained causal confidence as adaptive weights into the fusion process of each scale sub-band, ensuring optimal performance in low-frequency approximation components. High-confidence exposure images dominate global structure recovery, while in high-frequency detail components, weights are dynamically adjusted according to local exposure margin effects to preserve edge sharpness and texture information. This prevents phase fringes lost due to overexposure in highlight areas from being incorrectly filled in by low-quality images, and avoids artifacts introduced by low signal-to-noise ratio in shadow areas from polluting the fusion results. The generated causal fusion image not only presents a natural and continuous tone transition visually, but more importantly, its phase encoding information maintains mathematical consistency and physical authenticity globally, providing a high-quality input source for subsequent decoding and significantly reducing phase jumps and wrapping errors caused by fusion artifacts.By introducing counterfactual prediction into 3D point cloud correction, this approach completely changes the previous passive repair paradigm of merely filtering, smoothing, or interpolating to fill holes in the initial point cloud. It uses the initial point cloud obtained from causal fusion image decoding as the observation basis and employs a pre-trained graph neural network model to simulate the counterfactual state of the region's geometry under ideal exposure conditions. Through joint reasoning of the node's neighborhood topology and edge credibility, it actively infers and fills in missing or distorted 3D coordinates. Especially in extreme failure scenarios such as the complete disappearance of fringes due to high light saturation or phase confusion caused by multiple reflections on the inner wall of deep holes, it can still generate a reasonable point cloud that conforms to physical constraints based on the geometric context and material priors of the surrounding reliable areas. This results in a 3D contour that is not only geometrically complete and free of breaks and holes, but also has continuous curvature and clear boundaries. Furthermore, since the counterfactual correction process is embedded in the end-to-end network, no additional post-processing steps are required, providing a solution with both theoretical depth and practical engineering value for the quality inspection process in intelligent manufacturing.

[0131] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for detecting the three-dimensional contour of parts based on multi-exposure image fusion, characterized in that, The method includes: The surface reflectance of the image is determined based on the multi-exposure image sequence and exposure environment parameters, and a hierarchical causal graph model is constructed. Based on the hierarchical causal graph model, a quantitative analysis based on phase solution error is performed to obtain the exposure marginal effect. Within the multi-scale decomposition framework, an adaptive weighted fusion of multi-exposure image sequences is performed by combining the exposure marginal effect to generate a causal fusion image. Structured light phase decoding is performed based on causal fusion images to obtain an initial point cloud. The initial point cloud is then corrected using counterfactual prediction to obtain a corrected 3D point cloud. The 3D contour of the component is then constructed based on the corrected 3D point cloud.

2. The method for detecting three-dimensional contours of components based on multi-exposure image fusion according to claim 1, characterized in that, The process involves determining the image surface reflectance based on multi-exposure image sequences and exposure environment parameters, constructing a hierarchical causal graph model, and performing quantitative analysis based on phase calculation errors using the hierarchical causal graph model to obtain the exposure marginal effects, including: For each pixel in the multi-exposure image sequence, the unsaturated exposure value with the highest signal-to-noise ratio is selected as the effective observed brightness. The effective observed brightness is divided by the exposure environment parameters under the exposure conditions to obtain the normalized radiance. The normalized radiance is spatially smoothed using a smoothing filter to obtain the surface reflectance of the image. All image surface reflectances are used as confusion control variables, and a hierarchical causal graph model is constructed by combining exposure environment parameters and phase calculation errors; Based on the hierarchical causal graph model, hierarchical optimization is performed to obtain the optimized hierarchical discretization strategy. Then, the effect estimation analysis of the optimized hierarchical discretization strategy is performed to obtain the exposure marginal effect.

3. The method for detecting three-dimensional contours of components based on multi-exposure image fusion according to claim 2, characterized in that, The step of constructing a hierarchical causal graph model by using all image surface reflectance as a confusion control variable and combining it with exposure environment parameters and phase calculation errors includes: The reflectance of all image surfaces is discretized in layers according to a preset reflectance level threshold, resulting in reflectance levels and pixel subsets of each level. Using a subset of pixels at each level as a layer unit, the reflectivity conditions are fixed within each reflection level, and four-step phase-shift decoding is performed to obtain the layer phase calculation error under each exposure condition. By constructing layered nodes using reflectivity levels as confusion control variables, setting exposure environment parameters as processing variables and phase calculation error as result variables, and determining the directed edges of the layered nodes based on the optical imaging mechanism, a layered causal graph model is obtained.

4. The method for detecting three-dimensional contours of components based on multi-exposure image fusion according to claim 2, characterized in that, The hierarchical optimization based on the hierarchical causal graph model yields an optimized hierarchical discretization strategy. Effect estimation analysis is then performed on the optimized hierarchical discretization strategy to obtain the exposure marginal effect, which includes: Hybrid path identification is performed on the hierarchical causal graph model to obtain a set of candidate backdoor paths, and an optimized hierarchical discretization strategy is generated based on the set of candidate backdoor paths. The intra-layer effect estimate is determined based on the optimized hierarchical discretization strategy, and the global unbiased average treatment effect is generated by combining the optimized hierarchical weights. The global unbiased averaging effect is compared with the error level under the reference exposure conditions, and the marginal change of each exposure condition relative to the reference exposure conditions is quantified based on the comparison results to obtain the exposure marginal effect under each exposure condition.

5. The method for detecting three-dimensional contours of parts based on multi-exposure image fusion according to claim 4, characterized in that, The process of identifying heterogeneous paths in the hierarchical causal graph model to obtain a set of candidate backdoor paths, and generating an optimized hierarchical discretization strategy based on the set of candidate backdoor paths, includes: A topological traversal is performed on the hierarchical nodes and directed edges in the hierarchical causal graph model, and all non-causal backdoor paths from exposure environment parameters to phase calculation errors are identified to obtain a set of candidate backdoor paths. Given a reflectivity level, the candidate backdoor path set is tested for path blocking and the effectiveness of adjustment variables is verified according to the directed separation criterion to obtain the identifiability verification results. Using the identifiability verification results as constraints, and combining the physical response relationship between image surface reflectivity and phase calculation error in the optical imaging mechanism, the discretization boundary is determined. Then, using the discretization boundary as the dividing point, the continuous image surface reflectivity in the full dynamic range is divided into mutually exclusive hierarchical intervals, resulting in the optimized hierarchical discretization strategy.

6. The method for detecting three-dimensional contours of components based on multi-exposure image fusion according to claim 4, characterized in that, The step of determining the intra-layer effect estimate based on the optimized hierarchical discretization strategy and generating the global unbiased average treatment effect by combining the optimized hierarchical weights includes: Within each pixel subset of the optimized hierarchical discretization strategy, the backdoor path is blocked under a fixed reflectivity condition, and the mean phase solution error for each exposure condition is calculated to obtain the intra-layer effect estimate. The proportion of pixel subsets at each level in the total pixels of the multi-exposure image sequence in the optimized hierarchical discretization strategy is statistically analyzed, and the proportion results are normalized to obtain the optimized hierarchical weights. The intra-layer effect estimate and the optimized hierarchical weights are weighted and aggregated to obtain the global unbiased average treatment effect.

7. The method for detecting three-dimensional contours of components based on multi-exposure image fusion according to claim 1, characterized in that, The process of adaptively weighting and fusing multi-exposure image sequences within a multi-scale decomposition framework, combined with exposure marginal effects, to generate a causal fusion image includes: The exposure marginal effect is normalized to obtain the normalized marginal effect, and the normalized marginal effect is used as the causal fusion weight. Within the multi-scale decomposition framework of shear wave transform, multi-exposure image sequences are decomposed into multi-scale and multi-directional sub-bands in each direction. Adaptive weighted superposition is then performed within each sub-band using causal fusion weights as fusion coefficients to obtain the multi-scale sub-band coefficient matrix. By combining the multi-scale subband coefficient matrix and exposure invariance constraints, inverse shear wave transformation is performed to reconstruct the causal fusion image.

8. The method for detecting three-dimensional contours of components based on multi-exposure image fusion according to claim 1, characterized in that, The structured light phase decoding based on causal fusion image is used to obtain an initial point cloud, and the initial point cloud is corrected using a counterfactual prediction method to obtain a corrected 3D point cloud, including: The wrapping phase is extracted from the fusion stripes of the causal fusion image using a four-step phase-shifting method. The wrapping phase is then unfolded to obtain an absolute phase map. Triangulation of the absolute phase map is performed using calibration parameters to obtain an initial point cloud. A point cloud topology map is constructed based on the initial point cloud, and counterfactual depth prediction is performed on the point cloud topology map to obtain the counterfactual predicted depth. The initial point cloud is then corrected based on the counterfactual predicted depth to obtain the corrected point cloud data. Outlier removal is performed on the corrected point cloud data based on statistical filtering to obtain denoised point cloud data. Surface fitting is then performed on the denoised point cloud data to obtain the corrected 3D point cloud.

9. The method for detecting three-dimensional contours of parts based on multi-exposure image fusion according to claim 8, characterized in that, The process involves constructing a point cloud topology map based on the initial point cloud, performing counterfactual depth prediction on the point cloud topology map to obtain the counterfactual predicted depth, and then correcting the initial point cloud based on the counterfactual predicted depth to obtain corrected point cloud data, including: The points in the initial point cloud are used as graph nodes, and the edge structure is constructed based on spatial proximity relationships. The edge credibility is calculated according to the causal fusion weights corresponding to each graph node, and a point cloud topology graph with credibility is generated. The depth and phase features of neighborhood graph nodes are aggregated using a message passing mechanism in the point cloud topology graph, and the aggregation result is used as the initial embedding of graph nodes. In the graph convolutional layer, the counterfactual depth mapping learning under the optimal exposure condition is carried out using a message passing learning mechanism with edge credibility weighting, so as to obtain the counterfactual predicted depth of each graph node. Low-confidence nodes are identified based on the discrepancy between the counterfactual predicted depth and the actual decoded depth. The observed depth of the low-confidence nodes is then replaced with the counterfactual predicted depth to obtain the corrected point cloud data.

10. A component three-dimensional contour detection system based on multi-exposure image fusion, used to implement the component three-dimensional contour detection method based on multi-exposure image fusion as described in any one of claims 1-9, characterized in that, The system includes: The quantization analysis module is used to determine the surface reflectance of the image based on the multi-exposure image sequence and exposure environment parameters, and to construct a hierarchical causal graph model. Based on the hierarchical causal graph model, quantization analysis based on phase solution error is performed to obtain the exposure marginal effect. The image weighted fusion module is used to adaptively weight and fuse multi-exposure image sequences within a multi-scale decomposition framework, taking into account the exposure marginal effect, to generate a causal fusion image. The point cloud correction module is used to perform structured light phase decoding based on causal fusion images to obtain an initial point cloud, and then use counterfactual prediction to correct the initial point cloud to obtain a corrected 3D point cloud. The 3D contour of the component is then constructed based on the corrected 3D point cloud.