A method for three-dimensional space reconstruction of weld defects based on multi-view ray imaging
By using multi-view ray imaging technology, a ray geometric model and iterative reconstruction algorithm were established to solve the problem of three-dimensional reconstruction of microscale pore groups in ultra-thick plate multi-layer narrow gap welded structures, and to achieve high-precision three-dimensional spatial reconstruction of defects and determination of connectivity.
Patent Information
- Application Number
- CN202610376578.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-25
- Publication Date
- 2026-06-26
Smart Images

Figure CN122289526A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of three-dimensional modeling, and specifically to a method for three-dimensional spatial reconstruction of weld defects based on multi-view ray imaging. Background Technology
[0002] The three-dimensional spatial reconstruction of weld defects involves acquiring a sequence of X-ray images around the same weld region at multiple known geometric poses. Based on the precise calibration of the external parameters between the X-ray source position, detector planar orientation, and the spatial coordinate system of the weldment, a voxelized integral model is established between the X-ray path and the material attenuation coefficient. By mapping the projected grayscale distribution under different viewpoints to line integral constraints along the X-ray path, an underdetermined inverse problem model of the three-dimensional discrete voxel field is constructed. Iterative reconstruction algorithms or algebraic reconstruction techniques are used to inversely solve the voxel attenuation coefficient, thereby forming a three-dimensional density anomaly distribution corresponding to defects such as porosity, slag inclusions, lack of fusion, and cracks within the weld. In this process, artifacts are suppressed by multi-view geometric consistency constraints, reconstruction stability is enhanced by regularization strategies, and boundary trimming and structural segmentation of the reconstructed body are performed in conjunction with weld forming geometric priors. Finally, a three-dimensional defect model with spatial coordinate calibration capability is output to enable subsequent quantitative analysis such as defect volume estimation, spatial positioning, and morphological parameter extraction.
[0003] In extreme high-stress service environments such as nuclear power pressure shells and thick plate structures of deep-sea equipment, microscale pore groups often exist inside ultra-thick plate multi-layer narrow gap welded structures. Their spatial distribution and connectivity directly affect the initiation and propagation path of stress corrosion cracks. However, in conventional two-dimensional X-ray images, pores only appear as independent gray spots, making it difficult to determine their true spatial location in the thickness direction and whether there are micro-connected channels. As a result, it is impossible to accurately assess the migration path of residual gas and potential crack propagation channels. Therefore, it is necessary to construct a high-precision three-dimensional reconstruction method for weld defects in ultra-thick plate multi-layer narrow gap welded structures. Summary of the Invention
[0004] This invention provides a method for three-dimensional spatial reconstruction of weld defects based on multi-view X-ray imaging, which can improve the accuracy of three-dimensional reconstruction of weld defects in ultra-thick plate multi-layer narrow gap welded structures.
[0005] In a first aspect of the present invention, a method for three-dimensional spatial reconstruction of weld defects based on multi-view X-ray imaging is provided, the method comprising: A ray geometry model is established, and the multi-view ray imaging parameters are uniformly calibrated to form a set of geometric parameters. A set of multi-view projection data corresponding to the set of geometric parameters is collected around the weld axis. Preprocessing is performed on the multi-view projection data set, and spatial remapping is performed based on the geometric parameter set to form a linear projection data set; Attenuation coefficient volume data is constructed based on the linearized projection data set and the ray geometry model; In the attenuation coefficient volume data, an initial set of defect voxels is generated by a density threshold model and then a set of pore voxels is formed by three-dimensional connected component analysis and morphological processing. A migration path model that maintains spatial consistency with the attenuation coefficient volume data is established based on the connected network model, wherein the connected network model is constructed based on the set of pore voxels to identify and construct a set of potential connected channel voxels; The migration path model and the weld geometry model are spatially fused to generate a three-dimensional spatial model of the defect, which is then output.
[0006] In a second aspect of the invention, a three-dimensional spatial reconstruction apparatus for weld defects based on multi-view X-ray imaging is provided. The apparatus is used to perform a three-dimensional spatial reconstruction method for weld defects based on multi-view X-ray imaging as described above. The apparatus includes an acquisition module, a processing module, and an output module, wherein: The acquisition module is used to establish a ray geometry model, uniformly calibrate the multi-view ray imaging parameters to form a set of geometric parameters, and collect a set of multi-view projection data corresponding to the set of geometric parameters around the weld axis. The processing module is used to perform preprocessing on the multi-view projection data set and spatial remapping based on the geometric parameter set to form a linearized projection data set. The processing module is used to construct attenuation coefficient volume data based on the linearized projection data set and the ray geometry model; The processing module is used to generate an initial set of defect voxels from the attenuation coefficient volume data through a density threshold model and to form a set of pore voxels through three-dimensional connected domain analysis and morphological processing. The processing module is used to establish a migration path model that maintains spatial consistency with the attenuation coefficient volume data based on the connected network model, wherein the connected network model is constructed based on the set of pore voxels to identify and construct a set of potential connected channel voxels; The output module is used to spatially fuse the migration path model with the weld geometry model to generate a three-dimensional spatial model of the defect and output it.
[0007] In a third aspect of the invention, an electronic device is provided, including a processor, a memory, a user interface, and a network interface, wherein the memory is used to store instructions, the user interface and the network interface are both used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any of the preceding embodiments.
[0008] In a fourth aspect of the invention, a non-transitory computer-readable storage medium is provided, the computer-readable storage medium storing instructions that, when executed, perform the method as described in any of the preceding claims.
[0009] In summary, one or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages: 1. This invention achieves precise multi-view calibration and spatial remapping under the constraints of a unified ray geometry model, ensuring strict geometric consistency of projection data from different perspectives within the weld coordinate system. This reduces systematic errors introduced by beam hardening, scattering, and path length differences under ultra-thick plate conditions from the source. In the attenuation coefficient volume data construction stage, iterative inversion and regularization constraints are employed to suppress reconstruction artifacts and underdeterministic instability, improving the spatial resolution of attenuation distribution inversion in thick-walled regions. In the defect identification stage, a density threshold model based on partitioned statistics combined with 3D connected domain analysis and morphological processing is used to achieve robust voxel-level segmentation and true topological restoration of microscale pore groups. Channel voxel subsets and path impedance parameters are introduced into the connected network model and migration path model to maintain spatial consistency in the expression of defect connectivity and potential migration paths within the voxel mesh and eliminate pseudo-connected channels. Finally, spatial fusion with the weld geometry model achieves solid-level 3D representation and parameterized output, effectively improving the spatial positioning accuracy, morphological restoration accuracy, and connectivity determination accuracy of weld defect 3D reconstruction in ultra-thick plate multi-layer narrow-gap welded structures. Attached Figure Description
[0010] Figure 1 This is a flowchart illustrating a method for three-dimensional spatial reconstruction of weld defects based on multi-view X-ray imaging, as disclosed in an embodiment of the present invention. Figure 2 This is a schematic diagram of a ray geometry model establishment process disclosed in an embodiment of the present invention; Figure 3 This is a schematic diagram of a module of a three-dimensional spatial reconstruction device for weld defects based on multi-view X-ray imaging, as disclosed in an embodiment of the present invention. Figure 4 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present invention.
[0011] Explanation of reference numerals in the attached drawings: 301, acquisition module; 302, processing module; 303, output module; 401, processor; 402, communication bus; 403, user interface; 404, network interface; 405, memory. Detailed Implementation
[0012] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0013] In the description of the embodiments of the present invention, words such as "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "for example" or "for instance" in the embodiments of the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Rather, the use of words such as "for example" or "for instance" is intended to present the relevant concepts in a specific manner.
[0014] In the description of the embodiments of the present invention, the term "multiple" means two or more. For example, multiple systems means two or more systems, and multiple screen terminals means two or more screen terminals. Furthermore, 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 indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0015] A sequence of radiographic images was acquired around the same weld area under multiple known geometric poses. Based on the precise calibration of the X-ray source position, detector planar orientation, and the external parameters of the weldment spatial coordinate system, a voxelized integral model between the X-ray path and the material attenuation coefficient was established. The projected grayscale distribution under different viewpoints was transformed into line integral constraints along the X-ray path, and an inverse problem model of a three-dimensional discrete voxel field was constructed. The voxel attenuation coefficient was inverted through iterative reconstruction algorithms or algebraic reconstruction techniques. Combining multi-view geometric consistency constraints and regularization strategies, artifacts were suppressed and stability was improved. At the same time, weld forming geometric priors were introduced for boundary trimming and structural segmentation, thereby forming a three-dimensional density anomaly distribution model corresponding to defects such as porosity, slag inclusions, lack of fusion, and cracks inside the weld. This solves the problem that two-dimensional X-ray images are difficult to identify the three-dimensional connectivity and potential migration paths of micro-scale porosity groups in ultra-thick plate multi-layer narrow gap welded structures, and achieves quantitative evaluation objectives such as defect volume estimation, spatial positioning, and connectivity network analysis.
[0016] This embodiment discloses a method for three-dimensional spatial reconstruction of weld defects based on multi-view X-ray imaging, referring to... Figure 1 This includes the following steps S110-S160: S110, establish a ray geometry model, uniformly calibrate the multi-view ray imaging parameters to form a set of geometric parameters, and collect a set of multi-view projection data corresponding to the set of geometric parameters around the weld axis.
[0017] This invention discloses a method for three-dimensional spatial reconstruction of weld defects based on multi-view X-ray imaging, which is applied to a server. The server includes, but is not limited to, electronic devices such as mobile phones, tablets, wearable devices, and PCs (Personal Computers), and can also be a backend server running a method for three-dimensional spatial reconstruction of weld defects based on multi-view X-ray imaging. The server can be implemented using a standalone server or a server cluster composed of multiple servers.
[0018] First, a ray geometry model is constructed to describe the spatial relationship between the ray source location, the detector plane location, the detector pixel coordinate system, and the weld coordinate system. (Refer to...) Figure 2 The ray geometry model is a spatial representation model of a ray imaging system. Its core is establishing the ray path equation from the ray source emission point through the inspected weld area to the detector pixel. A high-precision spatial calibration fixture is used to arrange calibration bodies in the weld coordinate system. Calibration images are acquired through multi-pose imaging, and an extrinsic parameter solving algorithm is used to calculate the three-dimensional coordinates and attitude parameters of the ray source position and the detector plane position in the weld coordinate system. Here, the ray source position represents the spatial coordinates of the ray emission focus in the weld coordinate system; the detector plane position represents the coordinates of the center point of the detector imaging plane and its normal direction; the detector pixel coordinate system represents the two-dimensional coordinate representation system of the pixel array on the detector plane; and the weld coordinate system represents a three-dimensional spatial reference system established based on the weld axis and the weld cross-section normal. By solving the ray path equation from the ray source position to any pixel in the detector pixel coordinate system, a set of ray equations is formed in the ray geometry model, ensuring that each subsequent projected grayscale value corresponds to a defined spatial ray path.
[0019] Multi-view X-ray imaging parameters are uniformly calibrated to form a geometric parameter set. Multi-view X-ray imaging parameters refer to the spatial transformation parameters between the X-ray source position, detector plane position, and the detector pixel coordinate system and weld coordinate system under different imaging postures. Driven by a turntable or robotic arm, the X-ray source and detector are rotated or oscillated around the weld axis according to a preset angle sequence. The spatial calibration operation is repeated in each imaging posture. The extrinsic parameter matrix corresponding to the current posture is solved using a calibration volume reconstruction algorithm, thereby obtaining the X-ray source position vector, detector plane posture matrix, and pixel coordinate mapping matrix for each viewpoint. These parameters are then uniformly stored as a geometric parameter set. The geometric parameter set ensures that projection data from different viewpoints can be expressed in the same weld coordinate system, thus guaranteeing geometric consistency between multi-view projections.
[0020] After establishing the geometric parameter set, a multi-view projection data set is acquired around the weld axis. The weld axis represents the centerline of the weld along its length, and it is typically used as the longitudinal reference axis in the weld coordinate system. During implementation, the weld to be inspected is fixed at the center of the turntable or the weld axis is kept coincident with the rotation axis. The X-ray source and detector perform angular scanning around the weld axis, and X-ray transmission images are acquired at each known geometric pose, thus forming a multi-view projection data set. The multi-view projection data set refers to a sequence of two-dimensional grayscale images obtained under multiple different X-ray incident angles. Each image records the grayscale distribution in the detector pixel coordinate system after the X-ray penetrates the weld area. Each projection image is matched one-to-one with the corresponding pose parameters in the geometric parameter set, ensuring that each pixel grayscale value can be mapped to a spatial ray path in the weld coordinate system through the ray geometry model.
[0021] During the acquisition process, the X-ray energy parameters, exposure time parameters, and detector gain parameters are kept consistent to ensure the comparability of the multi-view projection data set in terms of grayscale response. At the same time, attitude index and geometric parameter index are added to the projection image of each view, thereby forming a complete multi-view projection data set containing image data and geometric parameter data.
[0022] S120 performs preprocessing on the multi-view projection data set and spatial remapping based on the geometric parameter set to form a linearized projection data set.
[0023] In one possible implementation, preprocessing is performed on the multi-view projection data set and spatial remapping is performed based on the geometric parameter set to form a linearized projection data set. Specifically, this includes: acquiring a system dark-field image set and a system flat-field image set corresponding to the multi-view projection data set; performing dark-field correction processing on each projection image in the multi-view projection data set under exposure parameter conditions consistent with the multi-view projection data set to obtain a processed projection image; performing flat-field correction processing based on the processed projection image and the system flat-field image set to form a flat-field corrected image set; performing logarithmic linearization processing on the flat-field corrected image set to obtain a linear attenuation projection value; and combining geometric parameters... The path length information from the X-ray source to the weld region in the data set is used to compensate the linear attenuation projection values, forming a linearized attenuation projection image set. Based on the spatial transformation relationship between the X-ray source position, detector plane position, detector pixel coordinate system, and weld coordinate system in the geometric parameter set, a spatial mapping matrix is constructed. Based on the spatial mapping matrix, spatial remapping is performed on each pixel in the linearized attenuation projection image set to convert the detector pixel coordinates into X-ray parameter expressions in the weld coordinate system to generate a set of X-ray equations. Based on the set of X-ray equations, geometric distortion correction and sub-pixel interpolation resampling processing are performed on the linearized attenuation projection image set to form a linearized projection data set.
[0024] Specifically, the system dark-field image set and the system flat-field image set are used to isolate the detector's fixed bias, dark current drift, and pixel gain inhomogeneity from the multi-view projection data set, thus ensuring that subsequent grayscale changes are primarily caused by X-ray attenuation in the weld area. The system dark-field image set refers to multiple frames obtained with the X-ray beam off and the detector operating in the same condition as the formal acquisition. The dark-field reference is obtained by averaging the pixels or through robust statistics. The system flat-field image set refers to multiple frames obtained with the X-ray beam on and the X-ray path not passing through the weldment, and with exposure parameters consistent with the formal acquisition. The flat-field reference is obtained by averaging the pixels and is used to characterize the spatial inhomogeneity of the X-ray beam and the differences in detector pixel response. Exposure parameters include tube voltage, tube current, exposure time, pulse frequency, and detector integration time, ensuring that the dark-field reference and the flat-field reference are within the same response curve range as the multi-view projection data set, avoiding systematic errors introduced by response nonlinearity during correction.
[0025] Dark field correction subtracts a fixed bias term from the pixel grayscale of the projected image, thus obtaining the processed projected image. Each projected image in a multi-view projection dataset corresponds to a view index. Dark field correction is performed independently for each view index but uses the same dark field reference, typically a dark field image obtained by averaging the pixels of the dark field image set. The expression for dark field correction is:
[0026] in, This represents the grayscale value of the original projected image at pixel coordinates (u,v) from the k-th viewpoint, and its value comes from the digital output of the detector. This represents the gray value of the dark field image at (u,v), and its value is determined by the statistical results of the system's dark field image set at (u,v). This represents the grayscale value of the processed projected image after dark field correction. This formula describes that the detector output consists of the true transmission response plus a fixed bias. Dark field correction eliminates the fixed bias through pixel-level subtraction, making the grayscale baseline consistent across different viewing angles.
[0027] Flat-field correction normalizes the spatial distribution of beam intensity and pixel gain differences, thus forming a flat-field corrected image set, ensuring consistent relative responses across different pixels. The flat-field reference needs to undergo dark-field normalization first to prevent dark-field bias from amplifying noise in the denominator. Flat-field correction performs pixel-level division on the processed projected image for each viewpoint and can introduce normalization coefficients to maintain a uniform dynamic range in the output. The expression for flat-field correction is:
[0028] in, The value represents the grayscale value of the flat field image at (u,v), and its value is determined by the statistical results of the system's flat field image set at (u,v); C represents the normalization coefficient, which is used to map the corrected result to a preset grayscale range, and its value can be selected as the flat field mean or the preset full-scale scaling factor. This represents the grayscale value of the flat-field corrected image at the k-th viewpoint. This formula reflects that the pixel-level transmission response is proportional to the incident intensity. Flat-field correction eliminates the difference between beam current and pixel gain by dividing by the incident intensity reference, so that the same material thickness produces a consistent normalized response at different pixels.
[0029] Logarithmic linearization transforms the multiplicative relationship in the transmission intensity domain into an additive relationship in the attenuation domain, thus converting the two-dimensional grayscale distribution into a linear integral constraint along the ray path. The pixel response after flat-field correction can be considered as an approximation of the ratio of transmission intensity to incident intensity. The linear attenuation projection value is obtained through a negative logarithm, making it approximately proportional to the material's linear attenuation coefficient integrated along the path. The expression for logarithmic linearization is:
[0030] in, This represents the linearly attenuated projection value of the k-th viewpoint at (u,v); The lower limit cutoff constant is used to avoid amplifying noise in near-zero values by logarithmic operations. Its value is determined by the detector quantization noise level and the minimum reliable response. Logarithmic linearization uses the exponential decay law to map the transmittance to the path integral, so that subsequent reconstruction can directly use the line integral model to establish voxel constraints.
[0031] Compensation processing is used to correct the nonlinear deviation of beam hardening effect related to path length under ultra-thick plate conditions, making the linear attenuation projection value more consistent with the single-energy linear integral assumption. Beam hardening effect manifests as the selective absorption of different energy components in the material, leading to a change in the equivalent attenuation coefficient with thickness, thus... The integral with the true path is no longer linear; the path length information from the ray source to the weld region in the geometric parameter set provides an estimate of the equivalent length or equivalent thickness of the ray traversing the weld region for each pixel, which can be used to construct a compensation function related to the path length. The expression for the compensation process is:
[0032] in, This represents the compensated linear attenuation projection value; This represents the path length of the ray passing through the weld region at (u,v) from the k-th viewpoint. The value is calculated from the intersection of the ray geometry model and the weld geometry model. The polynomial compensation coefficients are obtained by fitting calibration data from wedge-shaped test blocks, stepped test blocks, or reference parts of the same material; M represents the compensation order, which is set according to the thickness range and the degree of nonlinearity. This formula uses the nonlinear term of the path length to absorb the systematic deviation caused by beam hardening into the compensation model, making the compensated projected value closer to the linear integral in the large thickness range, thereby improving the accuracy and consistency of subsequent volume data inversion.
[0033] The spatial mapping matrix is used to associate the detector pixel coordinate system and the weld coordinate system within the same spatial framework, ensuring that the ray path corresponding to each pixel can be uniquely represented in the weld coordinate system. The set of geometric parameters provides the ray source position, detector plane position, the scale relationship between the detector pixel coordinate system and the physical coordinates of the detector plane, and the orientation of the detector plane in the weld coordinate system. The spatial mapping matrix is typically represented as a homogeneous matrix, containing rotation and translation components. It is used to transform physical points on the detector plane from detector coordinate representation to weld coordinate representation, while preserving the extrinsic parameter differences of the viewpoint index. The structural expression of the spatial mapping matrix is:
[0034] in, This represents the spatial mapping matrix of the k-th viewpoint; The rotation matrix describes the directional relationship between the detector's planar coordinate axes and the weld coordinate system's coordinate axes; its values are obtained through calibration. This represents the translation vector, used to describe the position of the origin of the detector plane coordinate system in the weld coordinate system. Its value is obtained through calibration. This matrix establishes a rigid body transformation relationship between points on the detector plane and points in the weld coordinate system, providing a unified coordinate transformation operator for the subsequent geometric generation of ray equations.
[0035] Pixel spatial remapping maps each pixel in the linearized attenuated projected image set to a ray parameter expression in the weld coordinate system, thereby generating a set of ray equations that geometrically aligns the projected values with the voxel path integral constraints. Pixel coordinates (u, v) are first converted to physical coordinates on the detector plane using pixel spacing and principal point position parameters, and then transformed back to the weld coordinate system using a spatial mapping matrix to obtain the ray's incident point or passing point in the weld coordinate system. The ray source position is also represented by a coordinate vector in the weld coordinate system; both together determine the ray direction. The expression for the ray equation is:
[0036] in, The parametric equations of the ray corresponding to the k-th viewpoint and pixel (u,v) in the weld coordinate system are represented. This represents the position vector of the ray source from the k-th viewpoint, and its value is given by the set of geometric parameters; The vector represents the position vector of the physical point on the detector plane corresponding to pixel (u,v) in the weld coordinate system, and its value is determined by the pixel physical mapping and spatial mapping matrices; s represents the ray parameter, used to traverse spatial points along the ray direction. This formula binds each pixel projection value to a unique path in the weld coordinate system. The ray equation set consists of the ray equations of all viewpoints and all pixels, and is the geometric basis for the subsequent construction of projection and back-projection operators.
[0037] Geometric distortion correction and subpixel-level interpolation resampling are used to unify linearized attenuated projection image sets from different viewpoints onto a consistent pixel geometry and sampling grid. This avoids pixel correspondence shifts caused by detector distortion, assembly tilt, and viewpoint differences, thus forming a linearized projection data set that can be directly used for volume data inversion. Geometric distortion correction uses the calibrated pixel distortion model to perform anti-distortion mapping on pixel coordinates, ensuring that the projection position of the same physical point in the detector pixel coordinate system conforms to the ideal imaging model. Subpixel-level interpolation resampling resamples the image on the continuous coordinates after anti-distortion. Interpolation is performed to generate projected values on a uniform target pixel grid. Common interpolation kernels are bilinear or higher-order interpolation kernels to suppress interpolation ringing while preserving edge response. The resampling expression can be written as:
[0038] in, This indicates the target pixel coordinates of the k-th viewpoint after resampling. The projection value at that location; This represents the set of source pixel coordinates involved in the interpolation, determined by the anti-distortion mapping; This represents the interpolation weights, whose values are determined by the interpolation kernel function. and The relative positions determine and satisfy normalization constraints. By performing distortion correction and resampling on all viewpoints, each projected image satisfies the uniform sampling definition in pixel geometry, while the set of ray equations remains unchanged in the weld coordinate system, ultimately... The ray equations are bound to the corresponding viewpoint set to form a linearized projection data set for subsequent attenuation coefficient volume data inversion.
[0039] S130, attenuation coefficient volume data is constructed based on linearized projection data set and ray geometry model.
[0040] In one possible implementation, attenuation coefficient volume data is constructed based on a linearized projection data set and a ray geometry model. Specifically, this includes: determining the reconstructed volume range in the weld coordinate system according to the weld geometry model, and setting the voxel sampling interval to construct a voxel grid; initializing initial volume data on the voxel grid and binding attenuation coefficient state values to each voxel; constructing a projection operator based on the ray geometry model, and mapping the initial volume data to a simulated projection data set corresponding to the linearized projection data set in the viewpoint index and detector pixel index through the ray equation and ray traversal weight set; performing pixel-by-pixel alignment comparison between the simulated projection data set and the linearized projection data set to generate a residual projection set; and weighting the residual projection set in conjunction with the observation weight set to obtain a weighted projection set. The process involves: 1) Constructing a back-projection operator based on a ray geometry model; 2) Propagating the weighted projection set back to the voxel mesh along the ray path; 3) Generating a voxel update set based on the ray traversal weight set; 4) Iteratively updating the initial volume data based on the voxel update set to obtain updated volume data; 5) Applying physical and regular constraints to the updated volume data to limit the non-negativity and spatial continuity of the attenuation coefficient state values; 6) Performing a convergence determination based on the energy change amplitude of the residual projection set and the voxel change amplitude of the updated volume data after each iteration. If the preset convergence condition is met, the attenuation coefficient volume data is output; otherwise, the updated volume data is used as the input for the next iteration, and the projection operator, residual projection set generation, back-projection operator, and iterative update steps are repeated to obtain the attenuation coefficient volume data.
[0041] Specifically, the weld geometry model provides the geometric boundaries and spatial scale of the weld region in the weld coordinate system, thereby confining the reconstruction calculation to the spatial volume related to the defect, reducing computational load and minimizing interference from irrelevant regions on the regularization constraints. The reconstruction volume is obtained by expanding the bounding volume of the weld geometry model. The expansion direction covers the target weld length segment along the weld axis and the weld metal region and adjacent base metal region along the weld cross-section normal direction. Boundary margins are reserved for the weld toe neighborhood to avoid boundary artifacts caused by outer surface truncation entering the defect region. The voxel sampling interval defines the spatial resolution of the three-dimensional discrete voxel field. Its value is determined based on the detector pixel size, ray geometric magnification, achievable angular sampling density, and the minimum size of the target defect. The voxel sampling interval is kept no greater than a preset proportional threshold of the minimum size of the target defect, and isotropic or anisotropic configuration is adopted according to the weld axis and cross-section directions while satisfying storage and computation constraints. The voxel mesh is determined by the reconstructed volume range and the voxel sampling interval. Its data structure includes the voxel origin coordinates, voxel sampling interval, and three-dimensional index size, which are used to map the voxel indexes one by one to spatial coordinates in the weld coordinate system.
[0042] Initial volume data is used to provide an initial solution for iterative reconstruction and control the convergence path of the underdetermined inverse problem. The initial volume data is stored as a three-dimensional array on a voxel mesh, with each voxel corresponding to an attenuation coefficient state value. The attenuation coefficient state value represents the estimated equivalent linear attenuation coefficient at that voxel location, reflecting the attenuation intensity of the material on rays. It is subsequently updated continuously through data consistency constraints to approximate the true distribution. The initial volume data can be initialized with constants, making the attenuation coefficient state values of all voxels the prior mean of the weld metal background attenuation, or initialized with coarse data from fast analytical reconstruction, ensuring that the initial volume data already contains the main density distribution structure of the weld region, thereby reducing the number of iterations and lowering the risk of getting trapped in local optima. When using constant initialization, to avoid excessively large projection operator residuals caused by initial solution bias, a region mask consistent with the weld geometry model can be applied to the initial volume data, allowing the weld metal region and the base material region to use different prior constants to match material differences.
[0043] The projection operator maps the attenuation coefficient state values in the voxel mesh to a simulated projection data set with viewpoint and pixel indices consistent with the linearized projection data set. Its core is performing a discrete path integral on each pixel ray. The ray equation, given by the ray geometry model, determines the spatial orientation of the ray path corresponding to each pixel in the weld coordinate system. The ray traversal weight set characterizes the length ratio or overlap ratio of the ray path traversing each voxel in the voxel mesh, thus discretizing the continuous path integral into a voxel-weighted sum. The simulated projection data set corresponds one-to-one with the linearized projection data set in its index structure, allowing direct residual calculation at each viewpoint and pixel index position. The expression for discrete projection is:
[0044] in, Indicates the simulated projection data set at the th Simulated linear attenuation projection values at each viewpoint and pixel (u,v); Represents a set of voxel indices; This represents the decay coefficient state value for voxel index n, with values derived from initial or updated voxel data. This represents the weight of the ray and voxel n in the ray crossing weight set. The value is obtained by calculating the crossing geometry of the ray equation and the voxel mesh and reflects the crossing length or overlap ratio. This formula approximates the continuous line integral as a weighted sum of voxels. The weights bear the discretization accuracy of the geometric projection, and the attenuation coefficient state value bears the unknown quantity to be determined for material attenuation.
[0045] The residual projection set is used to characterize the fitting error of the current volume data to the observed projection. It is generated by subtracting the simulated projection data set and the linearized projection data set pixel-wise under the same viewpoint and pixel indices, thus transforming the inverse problem into an optimization process that minimizes the residual. Pixel-wise alignment comparison requires that the simulated projection and the observed projection use the same pixel geometry and the same viewpoint index. Therefore, the geometric distortion correction and resampling of the preceding linearized projection data set directly affect the physical meaning of the residual projection set. The expression for the residual projection set is:
[0046] in, This represents the residual projection value of the residual projection set at the k-th viewpoint and pixel (u,v); This represents the linearly decayed projection value of the linearized projected dataset at the same index; This represents the simulated projection value. This formula makes explicit the difference between the observed line integral constraint and the predicted line integral of the current volume data, providing a driving signal for the subsequent back-projection operator.
[0047] The observation weight set is used to characterize the confidence differences of different pixel observations, in order to suppress the negative impact of scattering, saturation, metallic boundary fringes, and low signal-to-noise ratio regions on volume data updates. The observation weight set can be jointly determined by the detector noise model, flat-field correction residuals, beam hardening residual indices, and boundary distances to the weld geometry model. This ensures that pixels near the weld outer surface boundary with drastic gradient oscillations receive lower weights, saturated or dead pixels receive near-zero weights, and pixels with higher signal-to-noise ratios receive higher weights. Weighting processing transforms the residual projection set into a weighted projection set through pixel-level multiplication, thus allowing observations with higher confidence to contribute more to volume data updates for the same residual amplitude. The expression for weighting processing is:
[0048] in, This represents the weighted residual of the weighted projection set at the k-th viewpoint and pixel (u,v); This represents the weight coefficient of the observation weight set at the same index. The range of values is determined by the preset confidence mapping rule and is usually limited to [0,1] or normalized to a certain scale. This represents the residual projection value. This formula embeds the observation reliability into the error term, making the iterative update more consistent with the strategy of prioritizing reliable observations for fitting.
[0049] The backprojection operator is used to propagate the weighted projection set back to the voxel mesh along the ray path, generating a voxel update set. Essentially, it is the adjoint or approximate adjoint operator of the projection operator. The backprojection operation relies on the ray geometry model to determine the ray path corresponding to each pixel, and on the ray traversal weight set to distribute the pixel residual signal to the voxels along the path according to the traversal weight, so that the voxel update amounts are spatially concentrated in the voxel region that caused the residual. The expression for the voxel update set can be written as:
[0050] in, Represents the voxels in the set of voxel updates. Update volume; Indicates the ray crossing weight; This represents the weighted projection value; the summation range covers all view indexes and pixel indices. This formula reassigns the residual signal of each ray to the voxels it traverses, making the voxel update reflect which voxels caused the inconsistency between observation and prediction, thereby driving the attenuation coefficient state value to adjust in the direction of reducing residuals.
[0051] Iterative updates are used to correct the initial volume data based on the set of voxel updates to obtain updated volume data, gradually approximating the attenuation coefficient distribution that satisfies the observation line integral constraint. Iterative updates typically employ step size control to avoid oscillations or divergences. The step size can be constant, decrease with each iteration, or be determined by line search. Adaptive step sizes can be set for different voxels to accommodate the different noise levels in the weld metal region and the base metal region. The expression for iterative updates is:
[0052] in, This represents the state value of the decay coefficient of voxel n during the t-th iteration; This represents the updated attenuation coefficient state value; The step size parameter represents the iteration step size in the t-th iteration, and its value is determined by the convergence stability requirement and the residual descent rate. This represents the voxel update amount. This formula embodies the idea of gradient-based update driven by residuals. The voxel update amount provides the update direction, and the step size parameter controls the update magnitude.
[0053] Physical constraints are used to ensure that the attenuation coefficient state value conforms to the physically feasible region of material attenuation, avoiding negative attenuation or abnormally high attenuation caused by noise. Non-negativity constraints are achieved by performing voxel-by-voxel truncation on the updated volume data, ensuring that the attenuation coefficient state value is not less than a preset lower bound; an upper bound can also be set if necessary to prevent abnormal peaks caused by metal boundary artifacts from contaminating subsequent threshold segmentation. The expression for the non-negativity constraint is:
[0054] in, This represents the updated attenuation coefficient state value. Regularization constraints are used to limit the spatial continuity of the updated volume data and suppress fringe artifacts. Spatial continuity means that the attenuation coefficient state value in the weld metal region should not exhibit unfounded high-frequency oscillations between adjacent voxels, while allowing local abrupt changes in the defect region. Regularization constraints can be implemented through neighborhood smoothing, total variation constraints, or anisotropic diffusion, correlating the smoothing strength with the distance to the weld geometry model boundary and the voxel gradient amplitude, thereby preserving the structure of the boundary and defect edges. Taking total variation constraints as an example, its objective term expression is:
[0055] in, This represents the volume data composed of the state values of all voxel decay coefficients; the first term is the data consistency term, which makes the simulated projection approximate the observed projection. This represents the regularization weight parameter, whose value is used to balance data consistency and spatial continuity; The first term represents the discrete gradient vector at voxel n, whose value is calculated by the neighborhood difference of the voxel; the second term is the total variation term, used to suppress noise and preserve edges. This formula improves reconstruction stability and reduces artifacts by introducing a spatial gradient penalty into the optimization objective, thereby reducing high-frequency oscillations while satisfying projection constraints in the updated volume data.
[0056] Convergence criteria are used to determine whether the iterative reconstruction has reached a stable state, avoiding excessive iteration that could amplify noise or waste computational resources. The energy variation amplitude of the residual projection set is used to evaluate the degree of improvement in data consistency; the residual energy is typically taken as the sum of squares or weighted sum of squares of the residual projection set. The voxel variation amplitude of the updated volume data is used to evaluate whether the volume data update tends to stabilize; the voxel variation amplitude can be taken as the norm of the difference between adjacent iteration volume data. Preset convergence conditions can be jointly constructed by the relative decrease in residual energy being less than a threshold and the relative decrease in voxel variation being less than a threshold, to simultaneously constrain the stability of both the projection domain and the voxel domain. The expression for residual energy is:
[0057] in, This represents the weighted residual energy in the t-th iteration; These are weighted projection values. The expression for the magnitude of voxel variation is:
[0058] in, This represents the relative voxel change magnitude in the t-th iteration; and These represent the volume data of two adjacent iterations; This is a stabilizing term used to avoid zero denominators and is determined by the volume data magnitude. When the convergence condition is met, the attenuation coefficient volume data is output, maintaining the voxel mesh structure and spatial consistency with the ray geometry model. If the convergence condition is not met, the updated volume data is used as the input volume data for the next iteration. The steps of generating the simulated projection data set using the projection operator, generating the residual projection set, weighting, generating the voxel update set using the back projection operator, and iterative updates are repeated until convergence is achieved, thus obtaining attenuation coefficient volume data that satisfies the linearized projection data set constraints and has a stable spatial structure.
[0059] S140, in the attenuation coefficient volume data, an initial set of defect voxels is generated through a density threshold model, and a set of pore voxels is formed through three-dimensional connected domain analysis and morphological processing.
[0060] In one possible implementation, an initial set of defect voxels is generated from the attenuation coefficient volume data using a density threshold model, and then a set of porosity voxels is formed through three-dimensional connected component analysis and morphological processing. Specifically, this includes: constructing a weld metal region mask and a base metal region mask based on the weld geometry model in the weld coordinate system, and mapping them to the voxel mesh corresponding to the attenuation coefficient volume data to form a background statistical voxel set and a candidate analysis voxel set; calculating the attenuation coefficient distribution statistics on the background statistical voxel set and forming a set of partitioned statistical parameters; constructing a density threshold model based on the partitioned statistical parameter set and determining a defect threshold set; and applying the defect threshold set to... The candidate analysis voxel set is subjected to voxel-by-voxel discrimination, and voxels that meet the conditions are marked as defect voxels to generate an initial defect voxel set. The initial defect voxel set is then subjected to three-dimensional connected component analysis according to the preset voxel neighborhood relationship, noise connected components are eliminated based on the volume and size constraints of the connected components, and morphological closing and morphological opening operations are performed on the corresponding voxel mesh to form a set of processed defect connected components. The set of processed defect connected components is then subjected to porosity confirmation based on sphericity constraints, compactness constraints, and attenuation consistency constraints. Voxels contained in defect connected components that meet the porosity confirmation conditions are marked as porosity voxels to form a set of porosity voxels.
[0061] Specifically, the weld metal region mask and the base metal region mask are used to spatially divide the attenuation coefficient volume data into regions for estimating the background distribution and regions for defect discrimination, thus avoiding the inclusion of base metal boundary artifacts or unstable reconstruction regions near the weld outer surface into the threshold statistics. The weld geometry model includes the three-dimensional shape boundary of the weld metal region and the weld axis position. Discretizing the weld geometry model into a voxel mesh in the weld coordinate system yields the weld metal region mask. With the parent material area mask voxel index For a voxel position in the corresponding voxel grid, the mask value is either 0 or 1. The background statistical voxel set consists of voxels within the weld metal region mask that satisfy the condition of being far from the weld outer surface region and the weld toe neighborhood region. It is used to estimate the background distribution of the attenuation coefficient of defect-free weld metal. The candidate analysis voxel set consists of voxels within the weld metal region mask that cover the full thickness of the weld. It can be limited to a segment in the weld axis direction that is consistent with the coverage range of the multi-view projection, thereby ensuring that subsequent voxel-by-voxel discrimination and connected component analysis are completed under the same spatial reference.
[0062] The attenuation coefficient distribution statistics on the background statistical voxel set are used to characterize the normal distribution pattern of weld metal in the attenuation coefficient volume data and provide a basis for adaptive determination of the threshold. The attenuation coefficient state value at voxel index n is denoted as... Global and regional statistics are calculated within the background statistical voxel set. Regionalization is constructed based on the cross-sectional location, thickness layering, or distance from the outer surface of the weld geometry model, ensuring that depth-related offsets caused by beam hardening residue and scattering under ultra-thick plate conditions are absorbed by the regionalization. The regional statistical parameter set contains at least the background mean. Background standard deviation Background quantiles and background extreme value cutoff interval Where q represents the partition index and p represents the quantile. The expressions for the background mean and background standard deviation are:
[0063] in, This represents a subset of the background statistical voxels within the q-th partition. Indicates the number of its voxels; This represents the state value of the voxel decay coefficient. Quantiles. Used to robustly characterize the tail of the background distribution, avoiding the influence of a small number of artifact voxels on threshold determination; quantile values are determined by... Inside The ordered statistics were obtained.
[0064] The density thresholding model is used to convert the statistical parameters of the background attenuation coefficient distribution into a defect threshold set, enabling defect discrimination to have zonal adaptive capabilities and simultaneously suppressing spurious low-attenuation voxels caused by boundary artifacts and scattering fringes. The density thresholding model consists of a zonal index mapping module, a background statistical parameter input interface, a threshold generation rule set, and a threshold output interface. The zonal index mapping module determines the zonal index q(n) based on the spatial location and stratification rules corresponding to the voxel index n. The background statistical parameter input interface reads the values of the voxel index q(n) for that zonal index. , and Threshold generation rule set outputs low decay threshold With gradient suppression threshold The threshold output interface provides each voxel with a threshold pair consistent with its partition. A low-attenuation threshold is used to identify voxels that are significantly lower than the background, and a gradient suppression threshold is used to exclude stripe-like low-attenuation oscillations generated along metallic boundaries. The expression for the low-attenuation threshold is:
[0065] in, This is the threshold coefficient, and its value is determined based on the resolvable contrast of the smallest pore on the target and the noise level. The gradient suppression threshold can be obtained from background gradient statistics, and the discrete gradient magnitude is calculated for the voxel mesh. And the gradient quantile is obtained within the background statistical voxel set as the threshold:
[0066] in, Indicates the first Gradient magnitude within partition Quantiles The value is used to control the suppression intensity of high gradient fringes. The defect threshold set consists of all partitions. It is composed of and bound to the partition index mapping module to enable voxel-level threshold calls.
[0067] Voxel-by-voxel discrimination is performed within the candidate analysis voxel set. Each voxel is marked as defective using partition thresholds provided by the density threshold model, thus forming an initial defective voxel set. For any candidate analysis voxel index n, its partition index q(n) is first determined, and the corresponding low decay threshold and gradient suppression threshold are read. Then, the voxel's decay coefficient state value μ(n) and discrete gradient magnitude g(n) are calculated. A voxel is marked as defective when both the low decay condition and the gradient suppression condition are met. The expression for the discrimination rule is:
[0068] Where d(n) is the defect marker, which takes the value of 0 or 1; This is an indicator function; it takes the value 1 if the condition is true, and 0 otherwise. is the state value of the voxel decay coefficient; g(n) is the voxel gradient magnitude; and Output from the density threshold model. The initial defect voxel set consists of all voxels that satisfy d(n)=1 and belong to the candidate analysis voxel set, and retains the voxel index, weld coordinate system coordinates, attenuation coefficient state value and partition index of each voxel to support subsequent connected body feature calculation and traceability analysis.
[0069] Three-dimensional connected component analysis is used to aggregate the initial set of defect voxels into defect connected components, allowing subsequent noise removal and morphological processing to be performed at the connected component level rather than at the individual voxel level, thereby improving robustness to microscale pore groups. Preset voxel neighborhood relations are used to define connectivity, which can be selected as 6-neighborhood, 18-neighborhood, or 26-neighborhood. Under ultra-thick plate conditions, to avoid bridging nearby noise into spurious connectivity, the preset voxel neighborhood relations are often configured to 6-neighborhood, with finite bridging performed in the subsequent morphological closing operation stage. Connected component analysis performs a disjoint-set data structure or breadth-first search on all defect voxels in the voxel mesh, dividing mutually neighboring defect voxels into the same defect connected component, and generating a connected component identifier and voxel list for each defect connected component. The volume of the connected component is calculated from the number of voxels and the voxel volume, while the size of the connected component is calculated from the bounding box side length or principal axis length. Volume and size constraints are used to remove tiny isolated connected components caused by reconstruction noise or residual fringes. The expressions for the volume and size of the connected component are:
[0070] Where c represents a defective connected component; This indicates the number of voxels in the connected component; Voxel sampling interval; The volume of the connected volume; Let V(c) be the three-axis length vector of the bounding box of the connected volume, and its value is calculated from the extreme difference of the coordinates of the voxels of the connected volume. This satisfies the condition that V(c) is less than the minimum volume threshold or... Connectives smaller than the minimum size threshold are identified as noisy connectedives and removed. The remaining connectedives constitute the set of defective connectedives before processing.
[0071] Morphological closing and opening operations are used to perform structural cleansing on a set of connected volumes with defects before processing on a voxel mesh. Closing operations fill tiny voids within connected volumes and bridge minor fractures caused by discrete sampling. Opening operations remove burrs and isolated tendrils from the surface of connected volumes, thus obtaining a set of connected volumes with processed defects. A morphological closing operation consists of a dilation operation followed by an erosion operation, and a morphological opening operation consists of an erosion operation followed by a dilation operation. The structuring element on the voxel mesh is defined as a circle with a radius of... The neighborhood set is determined by a radius that is consistent with the voxel sampling interval and the minimum target channel width, to avoid excessive smoothing that could lead to the merging of multiple independent pores. Closing and opening operations are applied to the defect-marked voxel binary field d(n) while maintaining the connectivity identifier, allowing for recalculation. This ensures that after morphological processing, a second connected component analysis is performed to obtain the final processed defect connected component set, guaranteeing consistency between the connected component topology and the morphological results.
[0072] Porosity identification distinguishes between porous and non-porous connected bodies in a set of defective connected bodies, preventing slender structures like inclusions or unfused sheet-like structures from being misidentified as pores. Sphericity constraint evaluates the degree to which the connected body's shape approximates a sphere, using the connected body's volume and surface area to construct a sphericity index. Compactness constraint evaluates the internal filling rate and boundary complexity of the connected body, suppressing slender and rough-boundary structures. Attenuation consistency constraint evaluates the uniformity of the attenuation coefficient state values within the connected body and its deviation from the background, suppressing low-attenuation banded structures formed by stripe artifacts. The sphericity index can be defined as:
[0073] in, is the sphericity index, with values closer to 1 indicating a closer approximation to a sphere; V(c) is the volume of the connected volume; A(c) is the surface area of the connected volume, which can be estimated by voxel surface triangulation or based on voxel facet counting. The compactness index can be obtained by normalizing the bounding box volume.
[0074] in, As an indicator of firmness; Let be the bounding box volume. The attenuation consistency index can be constructed from the coefficient of variation of the attenuation coefficient within the connected volume and the background deviation:
[0075] in, This is a decay consistency index; the smaller the value, the more uniform the internal structure. and Each is the interior of a connected body The mean and standard deviation are obtained from the statistical analysis of the connected voxel list; This is a stable term. The stomatal confirmation condition is achieved by imposing threshold constraints on the above indicators, when... Greater than the sphericity threshold Greater than the tightness threshold and When the value is less than the consistency threshold, the defective connected body is identified as a pore connected body, and a pore identifier and pore centroid coordinates are bound to the pore connected body. The pore centroid coordinates are obtained by averaging the voxel coordinates of the connected body or by weighting the values according to the attenuation coefficient, so as to enhance the robustness to non-uniform sampling.
[0076] The stomatal voxel set consists of voxels contained in all connected stomatal vessels. For each connected stomatal vessel, all voxels in its voxel list are marked as stomatal voxels and bound with the same stomatal identifier. This ensures that the stomatal voxel set retains both voxel-level spatial structure and stomatal-level grouping information. A one-to-one correspondence is maintained between the stomatal voxel set and the set of connected vessels with processing defects. This allows subsequent identification of potential connected channel voxel sets to use stomatal identifiers as node sources, stomatal boundary voxels as boundary constraints, and attenuation coefficient volume data as the basis. The gradient magnitude g(n) is used as the basis for channel reachability discrimination, thereby realizing a continuous processing link from threshold segmentation to connectivity aggregation, morphological purification and porosity confirmation under the same weld coordinate system and voxel mesh.
[0077] S150, based on the connected network model, establishes a migration path model that maintains spatial consistency with the volumetric data of the attenuation coefficient.
[0078] In one possible implementation, before establishing a migration path model that maintains spatial consistency with the attenuation coefficient volume data based on the connected network model, the method further includes: performing boundary extraction processing on the pore voxel set in the voxel grid to form a pore boundary voxel set, and calculating the pore centroid coordinates and pore bounding box range to generate a pore index structure; performing candidate pore pair screening based on the pore index structure to construct a candidate pore pair set, and generating a local search volume in the voxel grid after intersection and clipping with the weld metal region mask for each candidate pore pair; extracting a channel candidate voxel set from the attenuation coefficient volume data within the local search volume according to the gradient stability condition; and extracting a channel candidate voxel set for each candidate pore pair from the channel candidate voxel set. Within the defined feasible domain, a 3D connected path search is performed to generate candidate channel paths. When a candidate channel path satisfies the minimum length constraint, channel voxel solidification is performed on the candidate channel path to form a subset of channel voxels, thereby generating a set of potential connected channel voxels. Channel parameter quantization is performed on each subset of channel voxels to obtain target parameters, including path length parameter, channel cross-sectional area parameter, channel minimum attenuation parameter, channel tortuosity parameter, and channel confidence parameter. Using pore identifiers as nodes and the connection relationships corresponding to the subsets of channel voxels as edges, the target parameters are bound to the edges as edge attributes, and the pore volume parameters and pore centroid coordinates are bound to the nodes as node attributes, thereby forming a connected network model.
[0079] Specifically, the pore boundary voxel set is used to define the outer surface of each pore in the voxel mesh, allowing subsequent channel searches to use the boundary as the start and end constraint instead of all pore voxels. This reduces the state space of the path search and avoids false short circuits caused by paths entering the interior of pores. Boundary extraction performs neighborhood determination on the defect markers of the pore voxel set in the voxel mesh. The preset voxel neighborhood relationship uses 6-neighborhood or 18-neighborhood. When a pore voxel has a non-pore voxel in its neighborhood, it is marked as a boundary voxel, and the pore boundary voxel set is obtained by pooling them together, maintaining the binding relationship between the boundary voxels and the pore markers. The pore centroid coordinates are used as the representative position of the pore in the weld coordinate system. The value is obtained by averaging the voxel coordinates under the same pore marker or by averaging the values according to the attenuation coefficient weight. The pore bounding box range is used to quickly estimate the spatial occupancy range of the pore. The value is obtained by constructing the minimum and maximum values of the three axes of the voxel coordinates under the same pore marker. The stomatal index structure is used to support fast proximity queries. Its implementation can be achieved by mapping voxel grid coordinates to hash buckets or by using a three-dimensional spatial index tree. The stomatal centroid coordinates are used as index keys and the stomatal bounding box range, stomatal boundary voxel set references and stomatal volume parameters are stored, so that subsequent candidate stomatal pair filtering can replace global pairwise combination enumeration with nearest neighbor search.
[0080] The candidate porosity pair set is used to limit the porosity combinations that require channel search to avoid combination explosion when the number of porosities is large. Candidate porosity pair filtering is performed on the porosity index structure. For each porosity identifier, neighboring porosity identifiers are retrieved within a preset search radius. Joint filtering is performed based on a centroid spacing threshold, a bounding box minimum spacing threshold, and a weld metal region mask constraint. The centroid spacing threshold excludes porosity pairs that are too far apart to have micro-connected channels. The bounding box minimum spacing threshold excludes porosity pairs separated by significantly thick metal. The weld metal region mask constraint ensures that the area where the porosity pair connection lies primarily falls within the weld metal region rather than the base metal region or the outer surface neighborhood. For each retained candidate pore pair, a local search volume is generated in the voxel mesh. The local search volume is obtained by taking the union of the bounding boxes of the two pores and expanding it in three axes to cover the spatial corridor of the potential channel. Then, it is intersected and clipped with the weld metal region mask so that the local search volume only retains the voxel index set within the weld metal region. This restricts the channel search to a geometrically reasonable spatial range and reduces the interference of the outer surface artifact region on the channel search.
[0081] The candidate voxel set for channels is used to construct the feasible region for the 3D connected path search. The gradient stability condition is used to remove high-gradient voxels caused by scattering fringes, metallic boundary ringing, or reconstructed fringes from the attenuation coefficient volume data, making the feasible region closer to the spatial distribution of real low-density channels. The gradient stability condition calculates the discrete gradient magnitude for each voxel within the local search volume and compares it with a partitioned gradient threshold. The gradient threshold can be based on the gradient statistics from the density threshold model stage or re-estimated within the local search volume to adapt to local thickness and scattering environment. The expression for the discrete gradient magnitude is:
[0082] Where g(n) represents the gradient magnitude at voxel index n; The volume data representing the attenuation coefficient is in the voxel index. The attenuation coefficient state value at that location; Indicates the unit step index of the voxel mesh in the three axes; This represents the voxel sampling interval. The gradient stability condition can be defined as... or Voxels that meet the conditions are included in the channel candidate voxel set, and their attenuation coefficient state value and distance marker to the weld metal region boundary are retained for subsequent path cost calculation and boundary suppression.
[0083] 3D connected path search is used to find a sequence of voxels connecting the boundary voxel sets of the two ends of a candidate pore pair within a feasible region defined by the candidate pore set, thereby generating candidate channel paths. The starting set of the path search is defined as the voxel set of the boundary voxels of the first pore in the candidate pore pair, and the ending set is defined as the voxel set of the boundary voxels of the second pore. The search is performed under the preset voxel neighborhood relationship of the voxel grid, and a path cost is introduced to achieve a preference for paths that are more likely to be real channels. The path cost assigns weights to voxels at each step of the migration. The weights are constructed by the decay coefficient state value, gradient magnitude, and boundary distance, so that the path tends to select voxels with lower decay, more stable gradient, and farther away from the boundary of the weld metal region, in order to suppress false channels generated by boundary artifacts. The single-step cost can be expressed as:
[0084] Where c(n) represents the cost when the voxel index n is used as a path node; The cutoff range for the attenuation coefficient state values within the local search volume is used for normalization; Gradient threshold; Voxel index The shortest distance to the boundary of the weld metal region mask is calculated using distance transformation. These are weighting coefficients, whose values are used to balance low decay preference, gradient stability preference, and boundary suppression preference. For stability, candidate channel paths are obtained using weighted shortest path search or weighted breadth-first search. The output is a voxel index sequence, along with arc length estimates and path node attribute sequences, for subsequent minimum length constraint testing and channel voxel solidification.
[0085] The minimum length constraint is used to eliminate apparent connectivity caused by extremely close proximity between vents and false short-path detections caused by local noise bridging. The length of the candidate channel path is calculated using the spatial arc length corresponding to the path voxel index sequence. The expression for arc length calculation is:
[0086] in, Indicates the path length of the candidate channel path; The first candidate channel path Voxel index; x(n) represents the voxel center coordinates of voxel index n in the weld coordinate system; N represents the number of path nodes. When The channel voxel solidification process is triggered on time. Channel voxel solidification expands candidate channel paths from a sequence of single-voxel skeletons into a subset of channel voxels with finite cross-sections, characterizing the actual spatial occupancy of the channels and enhancing their connectivity robustness within the voxel mesh. The solidification process includes performing local dilation and connectivity repair on the candidate channel paths. Local dilation is achieved by applying a structuring element radius centered on the candidate channel path nodes. The expansion operation yields a candidate set of expanded voxels. The structuring element radius is determined based on the target minimum channel diameter and the voxel sampling interval, and is constrained by the maximum radius. Connectivity repair performs shortest-length bridging on broken segments within the expanded voxel set to ensure a unique connected component exists from the starting stomatal boundary voxel set to the ending stomatal boundary voxel set. The channel voxel subset is bound to the stomatal identifiers at the opposite ends of the candidate stomatals and to the local search volume index to support the traceability of subsequent parameter quantization, thereby generating a potential connected channel voxel set.
[0087] Channel parameter quantization transforms a subset of channel voxels into target parameters that can be used for network modeling and subsequent transfer path search, making channels comparable and weighted at the graph structure level. The path length parameter can be directly taken from the candidate channel paths. Alternatively, the arc length can be refitted onto the skeleton of the channel voxel subset; the channel cross-sectional area parameter describes the effective passage capacity of the channel. Its calculation involves constructing a cross-sectional sampling plane orthogonal to the tangential direction of the skeleton at the skeleton nodes of the channel voxel subset, and converting the number of voxels belonging to the channel voxel subset within the cross-sectional sampling plane into an area. The minimum or median value from multiple sampling locations is taken as the channel cross-sectional area parameter to reflect the bottleneck effect. The expression for the cross-sectional area parameter is:
[0088] in, Indicates the channel cross-sectional area parameter; Represents the set of cross-sectional sampling position indices; Indicates the first The set of pixels that are determined to be channel voxels within a cross-sectional sampling plane, and their values are determined by the overlap between the cross-sectional plane and the voxel grid; The sampling interval of the voxel plane corresponding to the cross-sectional plane. The minimum attenuation parameter of the channel is used to describe the degree of minimum attenuation within the channel. Its value is obtained by taking the robust minimum value of the attenuation coefficient state value within a subset of the channel voxels to avoid single-point noise dominance. A low quantile can be used instead of the minimum value.
[0089] in, Indicates the minimum attenuation parameter of the channel; Indicates the channel voxel subset of Quantiles Used to control the suppression of noise extrema. The channel tortuosity parameter describes the degree to which the path deviates from a straight line, and is taken as the ratio of the path length parameter to the distance between the centroids of the two vents:
[0090] in, Indicates the channel tortuosity parameter; These represent the centroid coordinates of the candidate stomata at both ends of the stomata pair, respectively. For stability. The channel confidence parameter is used to comprehensively score the authenticity of the channel. Its value is jointly constructed by the degree of gradient stability satisfaction, the stability of the channel cross-sectional area parameter, the degree of distance of the channel voxel subset from the boundary of the weld metal region, and the cost distribution of the candidate channel path. It can be normalized to [0,1] to serve as the weight input for subsequent network pruning and migration impedance calculation.
[0091] The connected network model expresses the connectivity between stomata using a graph structure. Its structure consists of a set of nodes, edges, node attributes, edge attributes, and anchoring information. Each node in the node set corresponds to a stomata identifier. The node attribute set includes at least the stomata volume parameter and the stomata centroid coordinates. The stomata volume parameter is obtained by summing the stomata voxel sets, and the stomata centroid coordinates are obtained from the coordinate statistics of the stomata voxel sets. Each edge in the edge set corresponds to a connection represented by a subset of channel voxels. The edge endpoints are the stomata identifiers at both ends of the candidate stomata pair. The edge attribute set includes path length, channel cross-sectional area, minimum channel attenuation, channel tortuosity, and channel confidence parameters. The anchoring information set maintains spatial consistency between the graph structure and the voxel structure. Each node is bound to a reference to the stomata boundary voxel set and the stomata bounding box range. Each edge is bound to a reference to a subset of channel voxels and a candidate channel path reference, ensuring that any edge and node can be traced back to a specific voxel set in the voxel mesh. During the construction of the connected network model, pore identifiers are written into the node set and node attribute set, and the connection relationships corresponding to the channel voxel subsets are written into the edge set and edge attribute set. Simultaneously, a fusion rule is applied to duplicate edges. When multiple channel voxel subsets exist for the same pore identifier pair, the primary edge is selected based on the channel confidence parameter, and other edges are retained as candidate edge records to ensure network topology stability and prevent loss of multi-channel information. Through this graph structure, the subsequent migration path model can perform weighted path search at the graph structure level. Simultaneously, by leveraging the anchoring information set, the path results are mapped back to the voxel grid where the attenuation coefficient volume data resides, achieving a migration path expression that maintains spatial consistency with the attenuation coefficient volume data.
[0092] In one possible implementation, a migration path model is established based on the connected network model, maintaining spatial consistency with the attenuation coefficient volume data. Specifically, this includes: solidifying node anchoring and edge anchoring information in the connected network model to establish a correspondence between pore identifiers and pore voxel sets, and between channel voxel subsets and potential connected channel voxel sets in the voxel mesh; constructing a migration edge weight model based on target parameters, and generating migration impedance parameters by combining local attenuation gradient markers in the attenuation coefficient volume data with weld metal region masks; determining the outer surface region and weld toe neighborhood region in the weld geometry model and mapping them to the voxel mesh to form a surface voxel set; and constructing a terminal discrimination rule based on the surface voxel set. Then, a set of terminal vent identifiers is generated to form terminal anchoring information. For each vent identifier in the connected network model other than the terminal vent identifier, a weighted shortest path search is performed based on the migration impedance parameter to generate the main migration path, and a set of secondary migration paths is generated under the constraints of preset multiples and upper limits of hop count. The main migration path and the set of secondary migration paths are solidified into graph path representation and voxel path representation, respectively. The path attenuation profile is extracted from the attenuation coefficient volume data of the voxel path representation and continuity verification is performed. The set of path risk parameters is calculated for the migration path set that passes the verification, and the migration path set, the set of path risk parameters, the node anchoring information and the edge anchoring information are solidified together into a migration path model.
[0093] Specifically, the node anchoring information and edge anchoring information are used to firmly bind the graph structure elements of the connected network model to the spatial carriers in the voxel mesh. This ensures that any subsequent path search results based on the graph structure can unambiguously trace back to the set of pore voxels, the subset of channel voxels, and the set of potential connected channel voxels. The node anchoring information uses the pore identifier as the primary key and records the reference to the pore voxel subset, the reference to the pore boundary voxel set, the pore centroid coordinates, the pore bounding box range, and the pore volume parameters corresponding to that pore identifier. These references are then pointed to the voxel index list in the voxel mesh, giving the node anchoring information both spatial coordinate and voxel index representations. Edge anchoring information uses the edge identifier as the primary key, recording the identifiers of the two vents connected by the edge, the reference of the corresponding channel voxel subset, the reference of the candidate channel path, and the reference of the target parameter. The reference of the channel voxel subset and the reference of the candidate channel path are uniformly placed in the voxel grid index field, thereby ensuring that the edge anchoring information and the potential connected channel voxel set are established in a verifiable correspondence in the voxel grid. The correspondence is verified by calculating the spatial intersection or shortest adjacency distance between the channel voxel subset and the boundary voxel sets of the two vents. When the channel voxel subset and the boundary voxel set of either vent do not meet the preset adjacency threshold, the edge is marked as an unusable edge and is subject to stronger penalties or directly removed in the subsequent edge weight model.
[0094] The migration edge weight model maps the target parameters and local features in the attenuation coefficient volume data to migration impedance parameters, ensuring that each edge in the connected network model has a comparable migration cost, characterizing the priority migration difficulty of residual gas in the channel. Target parameters include path length, channel cross-sectional area, minimum attenuation, tortuosity, and confidence. Local attenuation gradient labels are calculated from the attenuation coefficient volume data and used to reflect the structural stability around the channel. A weld metal region mask provides spatial distance constraints to the outer surface boundary to suppress boundary artifacts. The migration impedance parameter is calculated once for each edge and bound to its edge attributes, allowing subsequent weighted shortest path searches to be optimized directly on the migration impedance parameter. The expression for the migration impedance parameter is:
[0095] in, L(e) represents the migration impedance parameter of edge e; L(e) represents the path length parameter, which is derived from the arc length of the candidate channel path or the arc length of the channel skeleton; A(e) represents the channel cross-sectional area parameter, which is obtained from cross-sectional sampling statistics and reflects the channel bottleneck capability. This represents the channel tortuosity parameter, which is the ratio of the path arc length to the distance between the centroids of the two pores at both ends; This represents the minimum attenuation parameter of the channel, and its value is the lower quantile of the attenuation coefficient state value within the channel voxel subset. The channel confidence parameter is constructed and normalized by the degree of gradient stability satisfaction, cross-sectional stability, and boundary distance. This represents a local decay gradient penalty term, the value of which can be determined by the quantile or mean of the gradient magnitude within the neighborhood of a subset of channel voxels. This represents the boundary suppression term, whose value can be constructed from the reciprocal of the minimum distance from the channel voxel subset to the boundary of the weld metal region mask; to This represents the weighting coefficient, whose value is set through calibration tests, playback of historical defect samples, or robust empirical rules. This represents the stability term, and its value is chosen to avoid a denominator of zero and to be consistent with the order of magnitude of the voxel sampling interval. This formula maps longer, narrower, more tortuous, less reliable, and closer channels to high-gradient unstable regions and boundaries to a higher migration impedance parameter, thereby causing the shortest path search to favor more transferable and reliable channels.
[0096] The outer surface region and weld toe neighborhood region are used to define the outward termination semantics of residual gas migration, giving the path set output by the migration path model a clear venting direction and enabling outward expansion analysis of stress corrosion risk. In the weld geometry model, the outer surface region typically corresponds to the set of outer boundary patches of the weld shape and the base metal shape. The weld toe neighborhood region corresponds to the adjacent area at the interface between the weld metal and the base metal outer surface, which is often a sensitive area for corrosive media entry and crack initiation in extremely high-stress environments. When mapping the outer surface region and weld toe neighborhood region to a voxel mesh, the weld geometry model is voxelized and sampled to obtain the voxel index set intersecting with the outer surface region and marked as the surface voxel set. Simultaneously, the weld toe neighborhood region is expanded outward according to a preset neighborhood thickness and mapped to the voxel mesh to ensure that the terminal discrimination does not miss any cases due to voxel discretization. The surface voxel set stores the voxel index representation and the weld coordinate system coordinate representation for subsequent terminal discrimination rule calls.
[0097] Terminal discrimination rules are used to filter out terminal porosity identifier sets from the porosity identifier set that have spatial reachability relationships with the surface voxel set. This ensures that the migration path search has a clear target node set and maintains spatial constraints consistent with the voxel mesh. The terminal discrimination rules include both proximity and reachability discrimination. Proximity discrimination is achieved by calculating the spatial intersection or shortest distance relationship between the porosity bounding box range and the surface voxel set. Reachability discrimination is achieved by verifying whether there are voxel channels satisfying the weld metal region mask constraints when the porosity boundary voxel set reaches the surface voxel set along the weld seam outward normal or along the weld toe neighborhood direction. This excludes porosities completely surrounded by thick metal but accidentally approaching the outer surface projection artifact. Terminal anchoring information uses the terminal porosity identifier as the primary key, recording its corresponding nearest surface voxel subset, nearest distance, voxel index summary of the reachability determination path, and association marker with the weld toe neighborhood region. This solidifies the terminal porosity identifier set and the surface voxel set into a traceable terminal constraint within the voxel mesh.
[0098] The primary and secondary migration path sets represent the preferred migration channels and uncertain alternative channels from any non-terminal pore marker to the set of terminal pore markers. For each pore marker in the connected network model other than the terminal pore markers, it is treated as a source node. Any terminal pore marker in the terminal pore marker set is used as a candidate target node. A weighted shortest path search is performed with the migration impedance parameter as the edge weight to obtain the primary migration path with the minimum total cost, and its target node is determined as the optimal terminal node. The weighted shortest path search can use Dijkstra's algorithm or the A algorithm. The heuristic function of the A algorithm can be the product of the Euclidean distance from the source node to the target node and the lower bound of the edge weight to accelerate the search. The secondary migration path set is used to preserve the possibility of multiple paths. A preset multiple threshold is set for the total cost of the primary migration path, and a hop count upper limit is set for the number of edges on the path. Several alternative paths that satisfy the constraints are obtained through enumeration or approximate search. The preset multiple is used to limit the migration impedance parameter of the alternative paths from being too high and losing its engineering significance, and the hop count upper limit is used to suppress long-chain noise paths that appear in large-scale networks. The main migration path is expressed as a sequence of nodes and a sequence of edges, and the set of secondary migration paths is expressed as a set of sequences of nodes and edges of multiple paths, while maintaining the reference relationship with node anchoring information and edge anchoring information to support subsequent voxel-level mapping.
[0099] Graph path representation and voxel path representation are used to solidify migration paths simultaneously in graph structure and spatial voxel form, ensuring that paths can be used for both network-level statistics and optimization, as well as voxel-level visualization, profile extraction, and continuity verification. Graph path representation solidifies the node sequence, edge sequence, total cost, and terminal node identifier for each path, where the node sequence consists of pore identifiers and the edge sequence consists of edge identifiers. Voxel path representation maps the edge sequence of each path to a channel voxel subset sequence and splices them in path order to form a path voxel set. It also retains the candidate channel path skeleton voxel index sequence corresponding to each channel voxel subset, giving the path a continuous spatial trajectory representation. During the splicing process, voxel path representation performs a consistency check on the endpoint adjacency of adjacent channel voxel subsets. If adjacent channel voxel subsets do not meet the preset adjacency threshold in the voxel grid, a bridging verification mark is inserted and the process is carefully checked in subsequent continuity verification stages to avoid spatially broken paths due to insufficient edge anchoring information.
[0100] Path attenuation profiles and continuity checks are used to verify the physical consistency of voxel path representations in attenuation coefficient volume data, preventing false connected channels caused by noise bridging, excessive morphological closing operations, or boundary artifacts from entering the migration path model. The path attenuation profile extracts attenuation coefficient state values along the voxel index sequence of the voxel path representation to form a one-dimensional sequence, and simultaneously extracts gradient magnitude sequences and boundary distance sequences. Continuity checks are performed by verifying whether the attenuation coefficient state values maintain a sufficient proportion within a preset low attenuation range, whether there are high attenuation breaks exceeding a preset length, and whether the gradient magnitude meets the gradient stability threshold at most nodes. A path risk parameter set is calculated for the migration path set that passes the continuity check. This set quantifies the migration capability and potential stress corrosion propagation risk of the path, and includes at least the total migration impedance, minimum cross-sectional area, bottleneck location coordinates, path confidence aggregation value, and path coverage connected branch identifiers. The path confidence aggregation value can be aggregated by multiplying or weighted averaging edge confidence values to reflect the dominant role of weak links in the path on overall reliability. The expression for the aggregated path confidence value is:
[0101] in, Representing a path The aggregated confidence score; Representing an edge Channel confidence parameters; This represents the edge sequence of the path. When the migration path model is solidified, the set of migration paths that have passed continuity verification, the set of path risk parameters, node anchoring information, and edge anchoring information are written into a unified data structure. The graph path representation and voxel path representation of each path are saved simultaneously, so that the migration path model can perform shortest path queries, branch statistics, and risk ranking at the graph structure level, as well as spatial positioning, profile playback, and fusion output with the weld geometry model at the voxel mesh level.
[0102] The connected network model's structure uses a pore node-channel edge-anchored reference framework to form a graph data structure. The node set is indexed by pore identifiers and bound to pore voxel subset references, pore boundary voxel set references, pore centroid coordinates, and pore volume parameters. The edge set is indexed by edge identifiers and bound to end pore identifiers, channel voxel subset references, candidate channel path references, and path length parameters, channel cross-sectional area parameters, channel minimum attenuation parameters, channel tortuosity parameters, and channel confidence parameters. Anchored references solidify the voxel index representation of each node and edge in the voxel grid, ensuring a one-to-one correspondence between the graph structure and the spatial structure. Furthermore, it allows for the selection of primary edges and the retention of candidate edges for repeated and parallel edges based on channel confidence parameters, thus preserving multi-channel uncertainty information while maintaining topological stability.
[0103] The migration path model is structured around a composite data structure with edge weight mapping, terminal constraints, path sets, consistency checks, and risk parameters as its framework. The migration edge weight model maps the edge attributes of the connected network model to the local attenuation gradient labels of the attenuation coefficient volume data and the boundary suppression information derived from the weld metal region mask as migration impedance parameters and binds them to the edges. The terminal anchoring information solidifies the spatial reachability relationship between the terminal pore identifier set and the surface voxel set. The migration path set is stored in both graph path representation and voxel path representation and references each other with node anchoring information and edge anchoring information. The continuity check results and path attenuation profiles are written into the model as path quality labels. The path risk parameter set provides comparable quantitative indicators for each retained path and supports subsequent risk-based sorting and threshold filtering. This ensures that the migration path model maintains spatial consistency with the attenuation coefficient volume data at both the graph structure level and the voxel structure level.
[0104] S160 spatially fuses the migration path model with the weld geometry model to generate a 3D spatial model of the defect and outputs it.
[0105] In one possible implementation, the migration path model and the weld geometry model are spatially fused to generate a three-dimensional defect space model and output it. Specifically, this includes: mapping the pore voxel set to a pore entity set, mapping the voxel path expression in the migration path model to a channel entity set; binding the pore entity set and the channel entity set to the migration path model, and embedding them into the weld geometry model to perform structural assembly processing to form a three-dimensional defect space model.
[0106] Specifically, when mapping a set of pore voxels to a set of pore entities, the pore voxel set is first grouped according to pore identifiers, so that each pore identifier corresponds to a subset of pore voxels. A three-dimensional binary occupancy field is then constructed in the voxel mesh for each subset of pore voxels to characterize the spatial occupancy range of the pore in the weld coordinate system. Subsequently, isosurface extraction is performed on the three-dimensional binary occupancy field to generate a pore surface mesh. The isosurface extraction uses a fixed isosurface threshold and the voxel center coordinates as sampling points to ensure strict spatial consistency between the output pore surface mesh and the voxel mesh. After isosurface extraction, hole repair and self-intersection correction are performed on the pore surface mesh to eliminate deviations. The topological cracks caused by scattered sampling are addressed by performing mesh simplification to control the number of facets in the 3D surface mesh while ensuring that the principal curvature features of the pore surface are not smoothed out. After geometry generation, each pore surface mesh is bound with a pore identifier, pore volume parameter, pore centroid coordinates, and pore bounding box range. The pore volume parameter is calculated from the number of voxels and the volume of voxels in the pore voxel subset and verified to be consistent with the surface mesh. The pore centroid coordinates are obtained by statistically analyzing the coordinates of the pore voxel subset and used as the spatial anchor point of the pore surface mesh, thereby forming a set of pore entities and ensuring that each pore entity can be traced back to the voxel index expression of the pore voxel set.
[0107] When mapping voxel path representations to channel entity sets, the edge sequence is first extracted from each graph path representation in the migration path model, and the edge sequence is mapped to a channel voxel subset sequence to obtain the path voxel set of that path. Simultaneously, the path voxel set is split into several channel voxel subsets according to edge identifiers to preserve the attribute binding boundaries at the channel segment level. Then, skeleton extraction is performed on each channel voxel subset to obtain the channel centerline voxel sequence. Skeleton extraction uses 3D thinning or distance transform extremum line extraction to ensure the centerline voxel sequence maintains single connectivity in the voxel mesh and remains adjacent to the voxel sets at both ends of the ventilator boundary. After obtaining the centerline voxel sequence, cross-sectional fitting is performed on the channel voxel subsets with the centerline voxel sequence as the axis. Cross-sectional fitting statistically analyzes the cross-sectional area occupied by the channel voxels in the normal plane along the tangential direction of the centerline and obtains the equivalent radius sequence. Then, the equivalent radius sequence is obtained along the centerline voxel... The element sequence performs tubular surface reconstruction to generate channel tubular meshes, where the local radius of the tubular mesh is obtained by interpolation of the equivalent radius sequence, ensuring that the channel tubular mesh spatially occupies the same area as the channel voxel subset. After the channel tubular mesh is generated, the mesh length is reparameterized and self-intersected, so that the channel tubular mesh forms an end face structure that can be spliced with the vent surface mesh at the vent adjacent port. Finally, each channel tubular mesh is bound with edge identifiers, vent identifiers at both ends, path length parameters, channel cross-sectional area parameters, channel minimum attenuation parameters, channel tortuosity parameters, channel confidence parameters, and migration impedance parameters. The channel tubular mesh is then linked to the corresponding voxel path expression in the migration path model, thereby forming a channel entity set and ensuring that each channel entity can be traced back to the edge anchoring information and channel voxel subset index expression of the migration path model.
[0108] When binding the pore entity set and channel entity set to the migration path model, a bidirectional index mapping is established between the node anchoring information and edge anchoring information in the migration path model and the pore entity set and channel entity set, respectively. This enables the pore identifier to locate a unique pore entity and further locate the pore voxel subset, and enables the edge identifier to locate a unique channel entity and further locate the channel voxel subset and candidate channel path. Simultaneously, the terminal anchoring information is associated with the channel entity set to mark the channel segment in the channel entity set that reaches the terminal pore identifier as an outward leakage segment, and the path risk parameter set is associated with... The graph path representation establishes associations to bind the risk indicators of each main migration path and secondary migration path set to their corresponding channel entity sequence and pore entity sequence. After binding, a consistency check is performed in the weld coordinate system. The check includes the volume consistency between the pore entity surface mesh and the pore voxel subset occupied field, the connectivity consistency between the channel entity tubular mesh and the channel voxel subset occupied field, and the spatial adjacency consistency between the channel entity end face and the pore entity surface. When any consistency check fails to meet the preset threshold, local reconstruction or local end face refitting is triggered to correct the geometric mismatch of the embedded structure.
[0109] The structural assembly process embeds the pore entity set and channel entity set into the weld geometry model as an embedded defect structure, thereby forming a three-dimensional defect space model while maintaining a unified coordinate representation with the weld geometry model. The structural assembly process first verifies the coordinate consistency between the weld geometry model and the pore and channel entity sets. If there is a transformation between the coordinate system of the weld geometry model and the weld coordinate system, the same coordinate transformation is performed on the pore and channel entity sets to eliminate coordinate deviations. Then, an assembly hierarchy is constructed, with the weld geometry model as the parent entity and the pore and channel entity sets as child entities. The hierarchy records the spatial inclusion and connection relationships between each child entity and its parent entity. The spatial inclusion relationship is confirmed by performing a point presence check on the pore entity surface mesh and the channel entity tubular mesh, confirming their location within the weld geometry model. The connection relationship is confirmed by checking the end face of the channel entity and the pore entity surface mesh. The nearest neighbor pairing or mesh splicing boundary pairing of the grid is confirmed; when it is necessary to obtain a defect cut-off body that can be used for structural integrity analysis, Boolean difference operation is performed on the weld geometry model and the set of pore entities and the set of channel entities to form a weld entity model with defect cavities, and the interface boundary generated by the Boolean operation is retained as a set of defect boundary patches to support subsequent finite element mesh generation; when it is necessary to obtain a defect superposition body for visualization and parameter output, the weld geometry model is kept unchanged and the set of pore entities and the set of channel entities are output in a superimposed display mode. At the same time, the connectivity branch parameters and migration path parameters are written as attribute fields into the entity metadata to ensure that the same 3D model can be used for both engineering analysis and defect visualization interpretation.
[0110] The parameter assembly of the defect 3D spatial model is achieved by solidifying the pore volume parameters, spatial coordinate parameters, connectivity parameters, and migration path parameters in a unified data structure. The pore volume parameters are derived from the voxel counts and volume calculations of the pore voxel sub-collections and are verified for consistency with the pore entity volume. The spatial coordinate parameters include the pore centroid coordinates, the channel centerline coordinate sequence, and the bounding box range in the weld coordinate system. The connectivity parameters are mapped from the connectivity branch identifiers of the connected network model to the pore entity set and the channel entity set to form branch groups. The migration path parameters are composed of the graph path expression, voxel path expression, migration impedance parameters, and path risk parameter set of the migration path model and are bound to the corresponding channel entity sequence. In the output stage, the defect 3D spatial model is output simultaneously as a 3D mesh file and a structured parameter file. The 3D mesh file contains the weld geometry model mesh, the pore entity surface mesh, and the channel entity tubular mesh and retains the entity identifier field. The structured parameter file contains the pore volume parameters, spatial coordinate parameters, connectivity parameters, and migration path parameters and retains the mapping index from the entity identifier to the parameter record, thereby ensuring that the 3D geometric expression and the parameter expression can be cross-retrieved under the same entity identifier system.
[0111] The structure of the defect 3D spatial model consists of a weld body layer, a defect entity layer, a connected topology layer, and a path semantic layer. The weld body layer provides material boundaries and thickness references in a unified weld coordinate system, with the weld geometry model as the core. The defect entity layer is composed of a set of pore entities and a set of channel entities, and maintains a one-to-one backtracking relationship with the voxel mesh through node anchoring information and edge anchoring information. The connected topology layer is derived from the set of nodes and edges of the connected network model and branches and groups the defect entity layer with connected branch parameters. The path semantic layer is derived from the set of main migration paths and secondary migration paths of the migration path model and performs path-level annotation on the set of channel entities and the set of pore entities with migration path parameters and a set of path risk parameters. This enables the model to simultaneously express geometric shape, spatial location, connectivity, and migration direction, and can connect mesh output and parameter output with a unified entity identifier.
[0112] This embodiment also discloses a three-dimensional spatial reconstruction device for weld defects based on multi-view X-ray imaging, referring to... Figure 3 The device includes an acquisition module 301, a processing module 302, and an output module 303. It is used to execute any of the above-described methods for three-dimensional spatial reconstruction of weld defects based on multi-view X-ray imaging, wherein: The acquisition module 301 is used to establish a ray geometry model, uniformly calibrate the multi-view ray imaging parameters to form a set of geometric parameters, and collect a set of multi-view projection data corresponding to the set of geometric parameters around the weld axis. Processing module 302 is used to perform preprocessing on the multi-view projection data set and perform spatial remapping based on the geometric parameter set to form a linearized projection data set; Processing module 302 is used to construct attenuation coefficient volume data based on linearized projection data set and ray geometry model; Processing module 302 is used to generate an initial set of defect voxels from the attenuation coefficient volume data through a density threshold model and form a set of pore voxels through three-dimensional connected component analysis and morphological processing. Processing module 302 is used to establish a migration path model that maintains spatial consistency with the attenuation coefficient volume data based on the connected network model, wherein the connected network model is constructed based on the pore voxel set to identify and construct the potential connected channel voxel set; The output module 303 is used to spatially fuse the migration path model and the weld geometry model to generate a three-dimensional spatial model of the defect and output it.
[0113] It should be noted that the above embodiments of the apparatus are only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0114] This embodiment also discloses an electronic device, as shown in the reference. Figure 4 The electronic device may include: at least one processor 401, at least one communication bus 402, user interface 403, network interface 404, and at least one memory 405.
[0115] The communication bus 402 is used to enable communication between these components.
[0116] The user interface 403 may include a display screen and a camera. Optionally, the user interface 403 may also include a standard wired interface and a wireless interface.
[0117] The network interface 404 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0118] The processor 401 may include one or more processing cores. The processor 401 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 405, and by calling data stored in memory 405. Optionally, the processor 401 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 401 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor 401.
[0119] The memory 405 may include random access memory (RAM) or read-only memory. Optionally, the memory may include a non-transitory computer-readable storage medium. The memory 405 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 405 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 405 may also be at least one storage device located remotely from the aforementioned processor 401. As a computer storage medium, the memory 405 may include an operating system, a network communication module, a user interface 403 module, and an application program for a three-dimensional spatial reconstruction method of weld defects based on multi-view X-ray imaging.
[0120] exist Figure 4 In the electronic device shown, the user interface 403 is mainly used to provide an input interface for the user and to obtain the user input data; while the processor 401 can be used to call an application stored in the memory 405 for a three-dimensional spatial reconstruction method of weld defects based on multi-view X-ray imaging. When executed by one or more processors 401, the electronic device executes one or more methods as described in the above embodiments.
[0121] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, as some steps can be performed in other orders or simultaneously according to the present invention. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0122] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0123] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between apparatuses or units may be electrical or other forms.
[0124] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0125] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0126] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory 405 and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned memory 405 includes various media capable of storing program code, such as a USB flash drive, external hard drive, magnetic disk, or optical disk.
[0127] The present invention also discloses a non-transitory computer-readable storage medium storing instructions. When executed by one or more processors 401, these instructions cause an electronic device to perform one or more methods as described in the above embodiments.
[0128] The above are merely exemplary embodiments of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of other embodiments of this disclosure upon considering the specification and the disclosure of practical truths. This invention is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.
Claims
1. A method for three-dimensional spatial reconstruction of weld defects based on multi-view X-ray imaging, characterized in that, The method includes: A ray geometry model is established, and the multi-view ray imaging parameters are uniformly calibrated to form a set of geometric parameters. A set of multi-view projection data corresponding to the set of geometric parameters is collected around the weld axis. Preprocessing is performed on the multi-view projection data set, and spatial remapping is performed based on the geometric parameter set to form a linear projection data set; Attenuation coefficient volume data is constructed based on the linearized projection data set and the ray geometry model; In the attenuation coefficient volume data, an initial set of defect voxels is generated by a density threshold model and then a set of pore voxels is formed by three-dimensional connected component analysis and morphological processing. A migration path model that maintains spatial consistency with the attenuation coefficient volume data is established based on the connected network model, wherein the connected network model is constructed based on the set of pore voxels to identify and construct a set of potential connected channel voxels; The migration path model and the weld geometry model are spatially fused to generate a three-dimensional spatial model of the defect, which is then output.
2. The method according to claim 1, wherein, The step of preprocessing the multi-view projection data set and performing spatial remapping based on the geometric parameter set to form a linearized projection data set specifically includes: Obtain the system dark field image set and the system flat field image set corresponding to the multi-view projection data set; Under exposure parameters consistent with the multi-view projection data set, dark field correction processing is performed on each projection image in the multi-view projection data set to obtain a processed projection image. Based on the processed projection image and the system flat field image set, perform flat field correction processing to form a flat field corrected image set; Log-linearization is performed on the flat-field corrected image set to obtain linear attenuation projection values; By combining the path length information from the X-ray source to the weld area in the set of geometric parameters, the linear attenuation projection value is compensated to form a set of linearized attenuation projection images. Based on the spatial transformation relationship between the X-ray source position, the detector plane position, the detector pixel coordinate system and the weld coordinate system in the set of geometric parameters, a spatial mapping matrix is constructed. Based on the spatial mapping matrix, spatial remapping is performed on each pixel in the linearized attenuated projection image set to convert the detector pixel coordinates into ray parameter expressions in the weld coordinate system to generate a set of ray equations. Based on the set of ray equations, geometric distortion correction and subpixel-level interpolation resampling are performed on the linearized attenuated projection image set to form the linearized projection data set.
3. The method of claim 1, wherein the method further comprises: The construction of attenuation coefficient volume data based on the linearized projection data set and the ray geometry model specifically includes: The reconstructed volume range is determined based on the weld geometry model in the weld coordinate system, and the voxel sampling interval is set to construct the voxel mesh; Initialize initial volume data on the voxel grid and bind a decay coefficient state value to each voxel; Based on the ray geometry model, a projection operator is constructed. Through the ray equation and the ray crossing weight set, the initial volume data is mapped to a simulated projection data set that corresponds to the linearized projection data set in terms of viewpoint index and detector pixel index. The simulated projection data set and the linearized projection data set are compared pixel-by-pixel to generate a residual projection set; The residual projection set is weighted by combining the observation weight set to obtain a weighted projection set; Based on the ray geometry model, a back projection operator is constructed, the weighted projection set is back propagated to the voxel mesh along the ray path, and a voxel update set is generated according to the ray traversal weight set. Based on the set of voxel update values, the initial volume data is iteratively updated to obtain the updated volume data; Physical constraints and regularization constraints are applied to the updated volume data to limit the non-negativity and spatial continuity of the decay coefficient state values; After each iteration, a convergence determination is performed based on the energy change amplitude of the residual projection set and the voxel change amplitude of the updated volume data. If the preset convergence condition is met, the attenuation coefficient volume data is output; otherwise, the updated volume data is used as the input for the next iteration to repeat the projection operator, residual projection set generation, back projection operator, and iterative update steps, thereby obtaining the attenuation coefficient volume data.
4. The method for three-dimensional spatial reconstruction of weld defects based on multi-view X-ray imaging according to claim 1, characterized in that, The process of generating an initial set of defect voxels from the attenuation coefficient volume data using a density threshold model and then forming a set of pore voxels through three-dimensional connected component analysis and morphological processing specifically includes: In the weld coordinate system, a weld metal region mask and a base material region mask are constructed based on the weld geometric model and mapped to the voxel grid corresponding to the attenuation coefficient volume data to form a background statistical voxel set and a candidate analysis voxel set. The attenuation coefficient distribution statistics are calculated on the background statistical voxel set, and a set of partitioned statistical parameters is formed. A density threshold model is constructed based on the set of partition statistical parameters, and a set of defect thresholds is determined. Based on the defect threshold set, the candidate analysis voxel set is subjected to voxel-by-voxel discrimination, and voxels that meet the conditions are marked as defect voxels to generate an initial defect voxel set; The initial set of defective voxels is subjected to three-dimensional connected component analysis according to the preset voxel neighborhood relationship, noise connected components are eliminated based on the volume and size constraints of the connected components, and morphological closing and morphological opening operations are performed on the corresponding voxel mesh to form a set of processed defective connected components. The porosity of the processed defect connected body set is confirmed based on sphericity constraints, compactness constraints, and attenuation consistency constraints. The voxels contained in the defective connected body that meet the porosity confirmation criteria are marked as porosity voxels, thereby forming the porosity voxel set.
5. The method for three-dimensional spatial reconstruction of weld defects based on multi-view X-ray imaging according to claim 1, characterized in that, Before establishing a migration path model that maintains spatial consistency with the attenuation coefficient volume data based on the connected network model, the method further includes: Boundary extraction processing is performed on the set of pore voxels in the voxel mesh to form a set of pore boundary voxels, and the centroid coordinates of pores and the bounding box range of pores are calculated to generate a pore index structure. Based on the pore index structure, candidate pore pairs are screened to construct a set of candidate pore pairs, and for each candidate pore pair, a local search volume is generated in the voxel grid after being intersected and clipped with the weld metal region mask. Within the local search volume, a set of candidate voxels for channels is extracted from the decay coefficient volume data based on the gradient stability condition; For each candidate pore pair, a three-dimensional connectivity path search is performed within the feasible region defined by the candidate channel voxel set to generate candidate channel paths; When a candidate channel path satisfies the minimum length constraint, a channel voxel solidification process is performed on the candidate channel path to form a subset of channel voxels, thereby generating the potential connected channel voxel set. Channel parameter quantization is performed on each subset of channel voxels to obtain target parameters, which include path length parameter, channel cross-sectional area parameter, channel minimum attenuation parameter, channel tortuosity parameter, and channel confidence parameter; The connected network model is formed by using pore identifiers as nodes and the connection relationships corresponding to the channel voxel subsets as edges, binding the target parameters as edge attributes to the edges, and binding the pore volume parameters and pore centroid coordinates as node attributes to the nodes.
6. The method of claim 5, wherein the method further comprises: The establishment of a migration path model based on the connected network model that maintains spatial consistency with the attenuation coefficient volume data specifically includes: The node anchoring information and edge anchoring information of the connected network model are solidified to establish a correspondence between the pore identifier and the pore voxel set, and between the channel voxel subset and the potential connected channel voxel set in the voxel grid. Based on the target parameters, a migration edge weight model is constructed, and migration impedance parameters are generated by combining the local attenuation gradient markers in the attenuation coefficient volume data with the weld metal region mask. In the weld geometry model, the outer surface region and the weld toe neighborhood region are determined and mapped to the voxel mesh to form a surface voxel set; Based on the surface voxel set, a terminal discrimination rule is constructed and a terminal pore identifier set is generated, thereby forming terminal anchoring information; For each pore identifier in the connected network model except for the terminal pore identifier, a weighted shortest path search is performed based on the migration impedance parameter to generate the main migration path, and a set of secondary migration paths is generated under the constraints of a preset multiple and a hop count limit. The main migration path and the set of secondary migration paths are respectively solidified into graph path representation and voxel path representation; The path attenuation profile is extracted from the attenuation coefficient volume data for the voxel path representation and continuity verification is performed. The path risk parameter set is calculated for the migration path set that passes the verification, and the migration path set, the path risk parameter set, the node anchoring information and the edge anchoring information are solidified together into the migration path model.
7. The method of claim 1, wherein, The step of spatially fusing the migration path model with the weld geometry model to generate a three-dimensional defect space model and outputting it specifically includes: The set of pore voxels is mapped to a set of pore entities, and the voxel path representation in the migration path model is mapped to a set of channel entities. The pore entity set and the channel entity set are bound to the migration path model and embedded inside the weld geometry model to perform structural assembly processing to form the defect three-dimensional space model.
8. A three-dimensional spatial reconstruction device for weld defects based on multi-view X-ray imaging, characterized in that, The device is used to perform a three-dimensional spatial reconstruction method for weld defects based on multi-view X-ray imaging as described in any one of claims 1-7. The device includes an acquisition module, a processing module, and an output module, wherein: The acquisition module is used to establish a ray geometry model, uniformly calibrate the multi-view ray imaging parameters to form a set of geometric parameters, and collect a set of multi-view projection data corresponding to the set of geometric parameters around the weld axis. The processing module is used to perform preprocessing on the multi-view projection data set and spatial remapping based on the geometric parameter set to form a linearized projection data set. The processing module is used to construct attenuation coefficient volume data based on the linearized projection data set and the ray geometry model; The processing module is used to generate an initial set of defect voxels from the attenuation coefficient volume data through a density threshold model and to form a set of pore voxels through three-dimensional connected domain analysis and morphological processing. The processing module is used to establish a migration path model that maintains spatial consistency with the attenuation coefficient volume data based on the connected network model, wherein the connected network model is constructed based on the set of pore voxels to identify and construct a set of potential connected channel voxels; The output module is used to spatially fuse the migration path model with the weld geometry model to generate a three-dimensional spatial model of the defect and output it.
9. An electronic device, comprising: The device includes a processor, a communication bus, a user interface, a network interface, and a memory. The memory is used to store instructions. The user interface and the network interface are both used to communicate with other devices. The communication bus is used to enable communication between the components within the electronic device. The processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any one of claims 1-7.
10. A non-transitory computer-readable storage medium, comprising: The computer-readable storage medium stores instructions that, when executed, perform the method as described in any one of claims 1-7.