Automatic exposure method and system for X-ray flaw detector
By dynamically adjusting the exposure based on the X-ray projection geometry parameters of the workpiece's three-dimensional model, the problem of the inability to dynamically adjust the exposure parameters of traditional X-ray flaw detectors in the inspection of complex workpieces is solved. This enables accurate exposure and defect identification in X-ray inspection of circumferential welds, improving inspection efficiency and safety.
Patent Information
- Application Number
- CN202511574936.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-31
- Publication Date
- 2025-12-23
AI Technical Summary
When inspecting workpieces with complex shapes or uneven thickness distribution, traditional X-ray flaw detectors cannot dynamically adjust the exposure parameters, resulting in uneven image brightness distribution, low contrast, and a decrease in the defect signal-to-noise ratio. This makes it difficult to effectively identify deep defects, affecting inspection efficiency and safety.
By acquiring a three-dimensional model of the workpiece, calculating the geometric parameters of X-ray irradiation, and dynamically adjusting the exposure parameters to adapt to the equivalent thickness of the workpiece, the source-image distance, the incident angle, and the directional attenuation characteristics of the X-ray source, a target exposure distribution is generated, and exposure is performed under the constraints of equipment performance to determine whether the workpiece is a defective or qualified product.
It achieves precise exposure for X-ray inspection of circumferential welds, significantly improves the uniformity of image brightness and contrast, ensures clear identification of shallow and deep defects, and enhances the stability and reliability of inspection.
Smart Images

Figure CN121194380A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of defect detection technology, and more specifically, to an automatic exposure method and system for an X-ray flaw detector. Background Technology
[0002] In modern manufacturing, X-ray inspection is one of the most commonly used non-destructive testing methods for detecting internal defects in metal components, especially suitable for quality assurance of critical components such as welds, castings, and pressure vessels. Traditional inspection operations generally rely on fixed exposure parameters set manually based on experience, such as tube voltage, tube current, and exposure time. While this method is effective for inspecting flat plates or small parts with uniform wall thickness and simple structures, the X-ray penetration characteristics change significantly with thickness for workpieces with complex shapes or uneven thickness distribution. As a result, there are significant differences in grayscale and contrast between different areas within the same image; shallow defects are easily overexposed, while deep defects are blurred due to underexposure. With increasing demands for inspection accuracy and reliability in industry, traditional fixed exposure methods can no longer meet the needs of automated and high-resolution inspection.
[0003] The root cause of exposure imbalance lies in the exponential decay law that X-rays follow as they propagate through materials, with the degree of decay influenced by factors such as material thickness, density, and incident angle. In actual workpieces, these parameters often vary continuously along the detection direction. For example, differences in circumferential thickness of pipes or welds, variations in the curvature of the inner and outer walls, and changes in the distance from the X-ray source to the detection surface all cause uneven distribution of X-ray intensity on the detection surface. Simultaneously, the X-ray tube itself exhibits output directionality differences due to its anode structure, meaning the light intensity distribution at different incident angles is not constant. Traditional systems rely solely on local average thickness or manual experience for pre-exposure settings, lacking a real-time response mechanism to these spatial variations. This leads to underexposure or overexposure in certain critical areas, making it impossible to effectively identify deep defects in the imaging.
[0004] In the actual inspection of complex workpieces, this problem manifests as uneven image brightness distribution, low contrast, and a decreased defect signal-to-noise ratio. For example, in the inspection of circumferential welds in pipelines, the penetration thickness of the X-ray can vary several times along different circumferential paths, causing significant exposure drift in the peripheral areas of the image. In some weld root areas, due to the large incident angle of the X-ray, the X-ray path is elongated, resulting in severe local signal attenuation, blurred or even disappearing defect edges. Operators often need to take multiple test shots and adjust the exposure time or voltage to obtain usable images, seriously affecting inspection efficiency and stability. In addition, for deep, small defects, such as porosity, lack of fusion, or cracks, improper exposure control can directly lead to missed detections or misjudgments, posing potential risks to the safe operation of pressure vessels and pipeline systems. Summary of the Invention
[0005] This invention provides an automatic exposure method and system for X-ray flaw detectors, which solves the technical problems mentioned in the background art.
[0006] In a first aspect, the present invention provides an automatic exposure method for an X-ray flaw detector, comprising: A three-dimensional model of the workpiece is obtained. Based on the preset X-ray irradiation geometry, the first function of the equivalent thickness of the workpiece along the X-ray irradiation direction with the circumferential angle, the second function of the source-image distance with the circumferential angle, and the third function of the angle between the ray and the normal of the inner wall of the workpiece with the circumferential angle are calculated. The fourth function of the X-ray source directional attenuation coefficient with the circumferential angle is obtained through workpiece-free flat field exposure. Select the tube voltage parameters, determine the effective energy through energy calibration, obtain the linear attenuation coefficient of the workpiece material under the effective energy based on the material attenuation characteristic data, set the reference circumferential angle, the target contrast-to-noise ratio threshold and the equivalent thickness of the target defect, calculate the reference exposure at the reference circumferential angle, and generate the target exposure distribution based on the reference exposure, the first function, the second function, the third function, the fourth function and the linear attenuation coefficient. The target exposure distribution is discretized into sector exposure sequences at preset angular intervals. The first exposure is performed under equipment performance constraints and total exposure constraints. The actual contrast noise ratio of each sector is calculated. Based on the actual contrast noise ratio and the target contrast noise ratio threshold, the workpiece is determined to be a defective or qualified product.
[0007] Secondly, an automatic exposure system for an X-ray flaw detector, applied to any of the automatic exposure methods for an X-ray flaw detector described in any one of the claims, includes: The data acquisition and processing module acquires the three-dimensional model of the workpiece. Based on the preset X-ray irradiation geometry, it calculates the first function of the equivalent thickness of the workpiece along the X-ray irradiation direction with respect to the circumferential angle, the second function of the source-image distance with respect to the circumferential angle, and the third function of the angle between the X-ray and the normal of the inner wall of the workpiece with respect to the circumferential angle. It also obtains the fourth function of the X-ray source directional attenuation coefficient with respect to the circumferential angle through workpiece-free flat field exposure. The exposure distribution test module selects tube voltage parameters, determines the effective energy through energy calibration, obtains the linear attenuation coefficient of the workpiece material under this effective energy based on material attenuation characteristic data, sets the reference circumferential angle, target contrast-to-noise ratio threshold, and equivalent thickness of the target defect, and calculates the reference exposure amount at the reference circumferential angle; based on the reference exposure amount, the first function, the second function, the third function, the fourth function, and the linear attenuation coefficient, the target exposure amount distribution is generated. The workpiece flaw detection module discretizes the target exposure distribution into sector exposure sequences at preset angular intervals. Under the constraints of equipment performance and total exposure, it performs the first exposure, calculates the actual contrast noise ratio of each sector, and determines whether the workpiece is a defective or qualified product based on the actual contrast noise ratio and the target contrast noise ratio threshold.
[0008] The beneficial effects of this invention are as follows: Accurate X-ray detection of circumferential welds is achieved through adaptive circumferential exposure based on a three-dimensional workpiece model and X-ray geometric parameters. This invention can dynamically adjust exposure parameters according to the equivalent thickness of the workpiece at different circumferential positions, the source-image distance, the incident angle, and the directional attenuation characteristics of the X-ray source, thereby significantly improving the uniformity of image brightness and contrast, effectively avoiding overexposure and underexposure, and ensuring that both shallow and deep defects can be clearly identified. Attached Figure Description
[0009] Figure 1 This is a flowchart of an automatic exposure method for an X-ray flaw detector according to the present invention; Figure 2 This is a block diagram of an automatic exposure system for an X-ray flaw detector according to the present invention. Detailed Implementation
[0010] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, features described in some examples may be combined in other examples.
[0011] Example 1 like Figures 1-2 As shown, an automatic exposure method for an X-ray flaw detector includes: A three-dimensional model of the workpiece is obtained. Based on the preset X-ray irradiation geometry, the first function of the equivalent thickness of the workpiece along the X-ray irradiation direction with the circumferential angle, the second function of the source-image distance with the circumferential angle, and the third function of the angle between the ray and the normal of the inner wall of the workpiece with the circumferential angle are calculated. The fourth function of the X-ray source directional attenuation coefficient with the circumferential angle is obtained through workpiece-free flat field exposure. Select the tube voltage parameters, determine the effective energy through energy calibration, obtain the linear attenuation coefficient of the workpiece material under the effective energy based on the material attenuation characteristic data, set the reference circumferential angle, the target contrast-to-noise ratio threshold and the equivalent thickness of the target defect, calculate the reference exposure at the reference circumferential angle, and generate the target exposure distribution based on the reference exposure, the first function, the second function, the third function, the fourth function and the linear attenuation coefficient. The target exposure distribution is discretized into sector exposure sequences at preset angular intervals. The first exposure is performed under equipment performance constraints and total exposure constraints. The actual contrast noise ratio of each sector is calculated. Based on the actual contrast noise ratio and the target contrast noise ratio threshold, the workpiece is determined to be a defective or qualified product.
[0012] In one embodiment of the present invention, the first function of the equivalent thickness of the workpiece along the X-ray irradiation direction as a function of the circumferential angle includes: Establish a workpiece coordinate system OXYZ, and set the center axis of the circumferential weld as the OZ axis of the workpiece coordinate system OXYZ; define the circumferential angle as θ, with the preset reference direction as the starting direction; Set the X-ray irradiation geometry parameters, including: the X-ray source position S, the detector plane Π for receiving X-rays, and the detector reference point p0 on the detector plane Π; Define a rotation matrix RZ(θ), which is a matrix that rotates by an angle θ around the OZ axis of the workpiece coordinate system OXYZ. By operating the rotation matrix RZ(θ) on the detector reference point p0, the detector imaging point p(θ) corresponding to the circumferential angle θ is obtained. The calculation formula is as follows: ; Based on the X-ray source position S and the detector imaging point p(θ), the X-ray unit direction vector u(θ) corresponding to the circumferential angle θ is calculated using the following formula: ;in, Represents the Euclidean norm; Based on the X-ray source position S and the X-ray unit direction vector u(θ), a parameterized ray r corresponding to the circumferential angle θ is constructed. θ (t), the formula is constructed as follows Where t represents the length of the ray extending from the X-ray source position S; Obtain the 3D model M of the workpiece for the circumferential weld; the 3D model M is a closed solid model; and use the parameterized ray r... θ (t) is intersected with the 3D model M of the workpiece to obtain the parameterized ray r. θ (t) Incident parameters t entering the 3D model M of the workpiece in (θ) and the exit parameter t of the three-dimensional model M of the workpiece. out (θ), and satisfy t out (θ)>t in (θ); Based on the incident parameter t in (t) and parameterized ray r θ (t), the parameterized ray r is calculated. θ (t) The incident point P enters the three-dimensional model M of the workpiece. in (θ), the calculation formula is: Based on the output parameter t out (θ) and parameterized ray r θ (t), the parameterized ray r is calculated. θ (t) The exit point P of the three-dimensional model M of the workpiece. out (θ), the calculation formula is: ; The first function T(θ) of the equivalent thickness of the workpiece along the X-ray irradiation direction with respect to the circumferential angle is defined as follows: The formula for calculating the first function T(θ) is: Where T(θ) represents the equivalent thickness of the workpiece at the circumferential angle θ along the X-ray projection direction.
[0013] In detail, the central axis of the circumferential weld is set as the OZ axis of the workpiece coordinate system OXYZ, making the circumferential direction of the circumferential weld parallel to the XY plane of the coordinate system. This ensures that changes in the circumferential angle correspond to changes in the circumferential position of the circumferential weld. The circumferential angle is defined as θ, with a preset reference direction as the starting direction.
[0014] In detail, the X-ray source position S determines the emission starting point of the rays, the detector plane Π determines the receiving carrier of the rays, and the detector reference point p0 is the reference point on the detector plane. All subsequent imaging points corresponding to circumferential angles are obtained by rotating around this point.
[0015] In detail, the function of the rotation matrix RZ(θ) is to realize the angular rotation around the OZ axis of the workpiece coordinate system. Since the circumferential weld is a circular structure, different circumferential angles θ correspond to different circumferential positions of the circumferential weld. The detector reference point p0 needs to be rotated by an angle θ through this rotation matrix to obtain the detector imaging point p(θ) corresponding to the angle θ.
[0016] In detail, the X-ray unit direction vector u(θ) describes the propagation direction of X-rays from the source to the detector imaging point. It is calculated by obtaining the vector from the X-ray source position S to the detector imaging point p(θ), and then normalizing it by dividing by the Euclidean norm of that vector. The normalized unit direction vector eliminates the influence of distance on the direction description.
[0017] Detailed, parameterized ray r θ The expression for (t) takes the X-ray source position S as the starting point and the unit direction vector u(θ) as the propagation direction, with the parameter t representing the extension length of the ray from S. This transforms the X-ray propagation path into a mathematical equation, allowing the ray path to be quantitatively described by the parameter t.
[0018] In detail, the workpiece's 3D model M is a closed solid model, capable of reflecting the spatial structure of the circumferential weld. The parametric ray r... θ The intersection operation between (t) and M is performed to determine the range through which the ray passes through the workpiece. The incident parameter t obtained from the operation is... in (θ) corresponds to the position parameter of the ray entering M and the exit parameter t. out (θ) corresponds to the position parameter of the ray exiting M. out (θ) is greater than t in The condition (θ) ensures that the ray enters the workpiece first and then exits the workpiece.
[0019] In detail, the incident point P in (θ) represents the specific spatial position where the ray enters the workpiece, determined by the incident parameter t. in (θ) Substitute into the parameterized ray r θ The expression for (t) is calculated; the exit point P out (θ) represents the specific spatial position where the ray exits the workpiece, determined by the exit parameter t. out Substituting (θ) into r θ The expression for (t) is calculated.
[0020] In detail, the first function T(θ) represents the equivalent thickness of the workpiece at a circumferential angle θ along the X-ray projection direction. Since X-rays propagate in a straight line, this thickness is equal to the thickness at the incident point P. in (θ) and the point of origin P out The Euclidean distance between the two points (θ) is obtained by calculating the straight-line distance between them. Because P in (θ) and P out As θ changes with the circumferential angle θ, T(θ) eventually becomes a function that varies with θ. The first function quantifies the thickness difference of the workpiece along the ray direction at different circumferential positions.
[0021] It should be noted that the preferred starting point for the circumferential weld, or the intersection of the detector plane Π and the workpiece coordinate system OXY plane, is used as the preset starting direction. The starting point for the circumferential weld relies on the workpiece's own structure and can be directly associated with the physical circumferential position of the circumferential weld; the intersection line relies on the detection device, which can ensure the consistency of the reference direction when detecting different workpieces and avoid deviations between θ and the actual position due to differences in workpiece placement.
[0022] In detail, the X-ray source position S needs to be determined based on the diameter of the circumferential weld. If the source is located inside the tube (eccentrically arranged), the distance between S and the OZ axis must ensure that the X-rays can cover the maximum thickness area of the circumferential weld (to avoid insufficient penetration in thick areas). If the source is located outside the tube, the distance from S to the outer wall of the circumferential weld must meet the requirement that the distance from the source to the workpiece is ≥ 2 times the maximum thickness of the workpiece (a requirement to reduce geometric ambiguity in industrial DR inspection).
[0023] In detail, the detector plane Π needs to form a single-wall penetration geometry with the X-ray source S and the central axis OZ of the circumferential weld. That is, the normal direction of Π needs to be consistent with the direction of the main X-ray beam (to reduce image distortion caused by oblique radiation), and Π is parallel to the OZ axis (to ensure that the imaging ratio of each point in the circumferential direction of the circumferential weld is consistent on the detector).
[0024] In detail, the detector reference point p0 needs to be set as the center of the detector plane Π, or the projection point of the circumferential weld center axis OZ on Π. The center of the detector plane Π relies on the detector's own center reference, and the projection point of the circumferential weld center axis OZ on Π relies on the workpiece coordinate system reference. Both settings can ensure that the imaging point p(θ) obtained by the rotation matrix RZ(θ) can uniformly cover the circumferential projection range of the circumferential weld.
[0025] In detail, the specific algorithm for intersection operation should be adapted to the structural features of the closed solid model, and the triangular facet ray intersection algorithm should be used first. The specific logic is as follows: First, the 3D model M is preprocessed by discretizing it into several triangular patches (the standard form of industrial STL models) and constructing a bounding box hierarchy (BVH) (to reduce invalid intersection calculations and improve efficiency). For parameterized ray r θ (t), first perform a coarse intersection with BVH to quickly locate the triangular patch clusters that the ray may pass through; For each triangular facet within the cluster, the intersection parameter t between the ray and the facet is calculated using the barycentric coordinate method: if the intersection point is inside the facet and t is within a reasonable range (greater than the t value corresponding to the source position), then the t value is recorded. After iterating through all possible intersecting faces, the smallest t value is selected as the incident parameter t. in (θ) (the first intersection point where the ray enters the model), the largest t value is used as the exit parameter t. out (θ) (the last intersection point of the ray passing through the model), ensuring that t is satisfied. out (θ)>t in The logic of (θ).
[0026] Detailed calculation of P in (θ) and P out The coordinate unit for the Euclidean norm between (θ) should be uniformly expressed in millimeters (mm), as follows: The modeling unit of the workpiece's 3D model M (in industrial design, the 3D modeling of pipes and welds is generally done in millimeters to ensure that the model size is consistent with the actual workpiece). The industry metrological practice of equivalent thickness in X-ray inspection (such as standard test block thickness and defect size are all in millimeters. Unified units can ensure that the X-ray attenuation and exposure parameters calculated based on T(θ) are consistent with the actual engineering, and avoid underexposure or overexposure due to unit conversion errors).
[0027] In one embodiment of the present invention, a second function of the source image distance with respect to the circumferential angle is defined as R(θ), and the calculation formula is as follows: Where R(θ) represents the distance from the X-ray source position S to the detector imaging point p(θ) on the detector plane Π.
[0028] In detail, the relationship between the source-image distance and the circumferential angle is defined as a second function. This second function describes the distance from the X-ray source to the corresponding imaging point on the detector at different circumferential angles. The source-image distance refers to the straight-line distance between the fixed position of the X-ray source and the specific imaging point on the detector plane corresponding to the circumferential angle.
[0029] In detail, when calculating the source-image distance corresponding to a certain circumferential angle, two spatial points need to be determined first: 1. Fixed X-ray source location; II. The detector imaging point corresponding to this circumferential angle.
[0030] Calculate the straight-line distance between two spatial points. This straight-line distance is the source-image distance at that circumferential angle, thus forming a second function that varies with the circumferential angle.
[0031] It should be noted that, due to different circumferential angles, the position of the detector imaging point on the detector plane obtained by the rotation matrix will change accordingly, while the position of the X-ray source remains fixed. Therefore, the straight-line distance from the X-ray source to the corresponding imaging point will necessarily be different under different circumferential angles.
[0032] The detailed coordinate mapping rules for the detector imaging point p(θ) on the detector plane Π include: First, based on the established workpiece coordinate system OXYZ (the center axis of the circumferential weld is the OZ axis), and the preset X-ray projection geometry parameters include the position and orientation of the detector plane Π (such as the distance from Π to the OZ axis, the angle between Π and the XY plane of the workpiece, etc.), these parameters are fixed in the preset stage, providing a reference for coordinate mapping; Secondly, the detector reference point p0 is an inherent reference point on the detector plane Π (such as the physical center pixel of the detector). The mathematical coordinates of p0 in the workpiece coordinate system OXYZ (such as (x0, y0, z0)) are already defined in the preset projection geometry. The operation of the rotation matrix RZ(θ) on p0 is to rotate p0 around the OZ axis by an angle θ in the workpiece coordinate system OXYZ to obtain the mathematical coordinates of p(θ) (based on OXYZ).
[0033] The core of the mapping rule is the transformation from the workpiece coordinate system to the detector local coordinate system: a local coordinate system is established on the detector plane Π (e.g., with p0 as the origin, the long side of the detector as the u-axis, and the short side as the v-axis). By pre-setting the attitude parameters of the detector plane Π in OXYZ in the projection geometry (e.g., normal vector direction, plane equation), a fixed coordinate transformation matrix can be constructed to convert the OXYZ mathematical coordinates of p(θ) into (u,v) coordinates of the detector local coordinate system, which ultimately correspond to the actual pixel position on the detector (e.g., the u / v coordinates are multiplied by the detector pixel size to obtain the pixel row and column number).
[0034] It should be noted that vertical projection is a standard preset condition for DR inspection of circumferential welds.
[0035] In one embodiment of the present invention, the third function of the angle between the ray and the normal to the inner wall of the workpiece as a function of the circumferential angle includes: Read the set of inner wall surfaces Σ of the workpiece from the 3D model M of the workpiece. in and the set of curved surfaces on the inner wall of the workpiece Σ in The corresponding unit normal field function n in (x), unit normal field function n in (x) has its normal pointing towards the material side; For a circumferential angle θ, in the closed interval [t] in (θ),t out Solving for the parameterized ray r on (θ)] θ (t) and the set of curved surfaces of the inner wall of the workpiece Σ in Intersection parameter t wall (θ), so that r θ (t)∈Σ in Based on the intersection parameter t wall (θ) and parameterized ray r θ (t), the intersection point Q is calculated. in (θ), the calculation formula is: ; Based on intersection point Q in (θ) and the unit normal field function n in (x), obtain the intersection point Q in The unit normal at (θ) n in (θ), the calculation formula is: ; The third function of the angle between the ray and the normal to the inner wall of the workpiece as a function of the circumferential angle is defined as φ(θ), and the formula for calculating the third function φ(θ) is: .
[0036] In detail, two sets of data were read from the 3D model of the workpiece at the circumferential weld: 1. A collection of curved surfaces on the inner wall of the workpiece, which fully describes the spatial surface morphology of the inner wall; 2. The unit normal field function corresponding to the set of inner wall surfaces. The unit normal field function can output the unit normal vector pointing to the material side from any point on the inner wall surface.
[0037] In detail, for a certain circumferential angle, first determine the parameter range through which the parametric ray corresponding to that circumferential angle passes through the workpiece, that is, the closed interval from the incident parameter to the exit parameter; within this closed interval, solve for the intersection parameters of the parametric ray and the inner wall surface set, so that the point on the ray corresponding to the parameter falls exactly on the inner wall surface; then substitute the intersection parameters into the expression of the parametric ray to calculate the actual intersection point of the ray and the inner wall surface.
[0038] In detail, by substituting the intersection point of the ray and the inner wall into the unit normal field function, the unit normal vector of the inner wall at that intersection point can be obtained. The unit normal vector reflects the normal direction of the inner wall at the intersection point.
[0039] In detail, the third function is defined as the relationship between the angle between the ray and the normal to the inner wall of the workpiece and the circumferential angle. To calculate the angle corresponding to a certain circumferential angle, first obtain the unit direction vector of the parameterized ray at that circumferential angle, then calculate the dot product of this vector and the unit normal vector of the inner wall at the intersection point. Take the absolute value of the dot product and calculate its inverse cosine; the resulting angle is the angle between the ray and the normal to the inner wall at that circumferential angle. Since different circumferential angles correspond to different ray paths and intersection points with the inner wall, the normal vector and ray direction vector at the intersection point will change with the angle; therefore, the angle exhibits the characteristic of changing with the circumferential angle.
[0040] In detail, Σ in The extraction relies on the inherent properties of the 3D model of the circumferential weld. That is, when the 3D model of the circumferential weld (such as a CAD model) is constructed, clear surface properties are marked for different boundaries such as the inner wall, outer wall, and weld fusion surface. As a closed entity, M must have a clear separation between the solid material area and the internal cavity area.
[0041] In detail, solve for the parameter t at the intersection point of the ray and the inner wall surface. wall The iterative method for (θ) is as follows: The iteration interval is determined to be [t] in (θ),t out (θ)], because the ray comes from the cavity (t) <t in (θ) enters the entity (t∈[t)) in (θ),t out (θ)]), intersection point t wall (θ) must be the boundary of the entity where the ray first contacts, i.e., near t. in (θ) one side; Calculate the midpoint t of the interval mid =(t in (θ)+t out (θ)) / 2, tmid Substitute parameterized ray r θ (t) Obtain spatial point P mid ; Using the entity containment function of the 3D model M (a built-in function of industrial 3D models that can determine whether any point is inside the entity), if P mid Inside the entity, the intersection point is at [t]. in (θ),t out The interval is (θ)], otherwise it is in the interval [t]. mid ,t out The interval [θ]; Repeat the binary search iteration until the interval length is less than the preset precision (e.g., 10). -6 mm, which meets the geometric calculation requirements for detection), at which point the midpoint of the interval is t. wall (θ).
[0042] In detail, the unit normal field function n in The orientation calibration standard for (x) is as follows: For the inner wall curved surface Σ in For any point x, first obtain two candidate normals for that point (the normals of a surface naturally have two opposite directions, pointing to the two sides of the surface respectively); For each candidate normal, take a small increment Δt along that direction (e.g., 10). -3 mm, ensuring that the surface shape remains approximately unchanged within the increment range), to obtain the new point x'=x+Δt×candidate normal; The entity containment function of M is used to determine whether x' is within the entity's material region: if x' is inside the entity, then the candidate normal is n pointing towards the material side. in (x); If x' is in the cavity region, then take another candidate normal as n. in (x).
[0043] In one embodiment of the present invention, the fourth function of the X-ray source directional attenuation coefficient with respect to the circumferential angle includes: In the absence of a workpiece, the position S of the X-ray source, the plane Π of the detector, and the preset X-ray irradiation geometry remain unchanged; Define RZ(θ) as the rotation matrix around the OZ axis of the workpiece coordinate system, where θ is the rotation angle. p0 is a fixed reference point on the detector plane Π. This is achieved through matrix operations. The detector sampling point p(θ) corresponding to the circumferential angle θ is obtained; Let G(x) be the counting function of the detector at position x. The flat field count corresponding to the circumferential angle θ is obtained through the counting function. ; The average flat field count is calculated by integration over the entire circumferential angle range. ; Determine the fourth function of the X-ray source directional attenuation coefficient with respect to the circumferential angle. .
[0044] No workpieces are placed in the detection area. At the same time, the installation position of the X-ray source, the installation plane of the detector, and the pre-set projection geometry parameters such as the X-ray projection angle and the relative position of the source and detector are fixed to ensure a stable experimental environment and avoid irrelevant variables from interfering with the measurement results.
[0045] First, a workpiece coordinate system is established with the center axis of the circumferential weld as the Z-axis. A matrix is defined that can rotate around this Z-axis by a specified angle. Then, a fixed reference point is selected on the detector plane. By performing calculations on the reference point using this rotation matrix, the specific sampling position on the detector at the corresponding circumferential angle can be obtained, achieving full circumferential coverage of sampling points at different angles.
[0046] Define a function to characterize the count generated by the detector after receiving X-rays at different positions. This function can read the X-ray count (i.e., flat field count) at the sampling point corresponding to each circumferential angle. This count reflects the amount of X-rays emitted by the X-ray source in that direction that reach the detector.
[0047] The flat field counts corresponding to all angles in the entire circumference are integrated, and then divided by the entire circumference angle range to obtain the average flat field count in the entire circumference. This average value is used as a benchmark value for measuring the average circumferential irradiation intensity of the X-ray source.
[0048] The flat-field counts corresponding to each circumferential angle are compared with the average flat-field counts for the entire circumference to obtain the ratio of X-ray irradiation intensity to the average intensity at each circumferential angle. This ratio is the fourth function of the X-ray source directional attenuation coefficient as a function of the circumferential angle. The fourth function quantifies the circumferential intensity difference of the X-ray source due to its directionality.
[0049] In one embodiment of the present invention, selecting tube voltage parameters, determining the effective energy through energy calibration, and obtaining the linear attenuation coefficient of the workpiece material under this effective energy based on material attenuation characteristic data includes: Measurements were performed at a tube voltage of kVp, including: The thickness x of the i-th stage of the stepped wedge of the target material was measured. i Corresponding detector count I i ; Remove the target material stepped wedge and measure the detector count I0 when there is no workpiece material; Based on the principle of single-energy equivalence, the effective energy E is determined by least-squares fitting. eff The calculation formula is: in, Let E represent the energy value that minimizes the summation term on the right, and ln denote the natural logarithm function. eff Used to characterize the equivalent energy of an X-ray beam at a tube voltage of kVp using a single energy; Obtain the linear attenuation coefficient function μ of the workpiece material mat (E), μ mat (E) Characterizes the attenuation capability of workpiece materials to X-rays of different energies, based on the effective energy E. eff With linear decay coefficient function μ mat (E), calculate the effective energy E of the workpiece material. eff The linear attenuation coefficient μ(E) under the following conditions eff The calculation formula is: .
[0050] In detail, the tube voltage determines the energy range of the X-rays emitted by the X-ray source.
[0051] In detail, stepped wedges are standard material parts with known thickness grades.
[0052] In detail, the linear attenuation coefficient function characterizes the target material's ability to attenuate X-rays of different energies.
[0053] In detail, the measurement is performed in two steps under the set tube voltage: The first step is to measure the detector counts corresponding to each thickness level of the stepped wedge of the target material. The detector counts reflect the residual intensity of X-rays after passing through the material of the corresponding thickness. The second step is to remove the stepped wedge and measure the detector count when there is no workpiece material. The detector count reflects the original intensity of the X-rays before they have been attenuated by the material.
[0054] The difference between the two sets of counts directly reflects the material's attenuation effect on radiation.
[0055] In detail, based on the principle of single-energy equivalence, a multi-energy X-ray beam is equivalent to a beam of a single energy, which is the effective energy. The fitting process uses the least squares method, adjusting the energy value to minimize the sum of errors between the theoretical attenuation calculated based on this energy and the linear attenuation coefficient function of the material and the actual attenuation obtained by counting with two sets of detectors. The energy value that minimizes the sum of errors is the effective energy of the X-ray beam at that tube voltage. This effective energy is used to uniformly characterize the attenuation characteristics of the X-ray beam.
[0056] Detailed material selection criteria for the target material step wedge include: Material type matching: Prioritize materials of the same type as the workpiece or those with a decay coefficient function μ. ref(E) Use metal materials with consistent trends (e.g., when the workpiece is X70 steel, the stepped wedge should be made of the same grade of steel or low-alloy structural steel) to avoid excessive differences in atomic number and density, which could lead to μ ref (E) μ of the workpiece material mat (E) deviation, which in turn affects E eff Adaptability to actual testing; Industry standard compliance: The stepped wedge must comply with the standard parts specifications for X-ray inspection calibration (such as ISO12706 and other relevant standards) to ensure the accuracy of its thickness grade (thickness deviation ≤ ±0.1mm) and material purity (impurity content ≤ 0.1%), so as to avoid counting measurement deviations due to thickness errors or material inhomogeneity; Thickness Coverage: The thickness set of the stepped wedge must cover the typical penetration thickness range of the workpiece during inspection (e.g., when the equivalent thickness T(θ) of the workpiece is 10-30 mm, the stepped wedge thickness is set to 5, 10, 15, 20, 25, 30 mm) to ensure a good fit to E. eff The attenuation data at different times can cover the actual attenuation scenarios detected, improving E eff Representativeness.
[0057] Detailed environmental interference control measures during detector counting measurements include: Temperature and humidity control: Stabilize the temperature of the detector and the detection environment within the rated operating range of the equipment (usually 20-25℃) and control the humidity at 40%-60%RH to avoid temperature fluctuations causing sensor pixel sensitivity drift (e.g., for every 1℃ change in temperature of a semiconductor detector, the sensitivity may fluctuate by 0.5%-1%), or excessive humidity causing interference to the detector circuit. Electromagnetic interference shielding: The detection area must be far away from strong electromagnetic radiation sources (such as large motors and high-frequency welding equipment). Shielded cables should be used for the detector signal lines. If necessary, an electromagnetic shielding cover should be installed around the detector to prevent electromagnetic interference from causing noise in the counting signal and affecting I. i And the measurement accuracy of I0; Scattered radiation suppression: Install a filter grid (or use lead plate shielding) between the X-ray source and the detector to reduce the amount of scattered radiation generated by the workpiece (or stepped wedge) entering the detector; at the same time, adjust the source-detector distance to avoid near-field scattering superposition, ensuring that the detector mainly receives direct radiation, and reducing the interference of scattered radiation on the counting. Repeated measurements and averaging: I for each thickness grade i For both I0 without a workpiece, 3-5 repeated measurements are performed, and the arithmetic mean is taken as the final count. This reduces the impact of random noise from the detector (such as quantum noise and electronic noise) on a single measurement and improves the stability of the count data.
[0058] The detailed energy search range for least squares fitting includes: Theoretical range based on tube voltage: Effective energy E of X-ray beam eff Typically, the effective energy is positively correlated with the tube voltage (e.g., 150kVp tube voltage corresponds to approximately 50-70keV, 220kVp corresponds to 80-90keV, and 300kVp corresponds to 100-120keV). The search range can be set to ±10% of the theoretical effective energy range at that tube voltage (e.g., at 220kVp, the search range is set to 70-100keV), which covers possible energy fluctuations while defining a reasonable search boundary. Referencing X-ray tube characteristics: Combine the tube voltage-effective energy technical parameter table provided by the X-ray tube manufacturer (usually the manufacturer will provide this curve with the equipment), set the search range to ±15% of the manufacturer's recommended effective energy value to ensure that it matches the energy output characteristics of the X-ray tube actually used; The effective range of the material attenuation function must be ensured to be within the μ range of the target material's stepped wedge. ref (E) Within the valid defined interval (e.g., μ of steel) ref (E) Data is stable within the 30-150 keV range; beyond this range, μ... ref (E) Increased data error), avoid energy exceeding μ ref (E) The effective range leads to errors in the calculation of theoretical attenuation, affecting E. eff Fitting accuracy.
[0059] In detail, this describes how to obtain the linear attenuation coefficient function of the workpiece material. This function characterizes the attenuation capability of the workpiece material for X-rays of different energies. Its input is the X-ray energy, and its output is the linear attenuation coefficient of the material at the corresponding energy. Different energies of X-rays attenuate to different degrees when passing through the same material; the linear attenuation coefficient function describes this relationship between energy and attenuation.
[0060] In detail, based on the effective energy of the X-ray beam under tube voltage, the corresponding effective energy is substituted into the linear attenuation coefficient function of the workpiece material.
[0061] It should be noted that the linear attenuation coefficient function μ of the workpiece material mat (E) is the prior parameter.
[0062] Detailed, effective energy E eff Substitute μ mat Interpolation methods for (E) include: Linear interpolation: If E eff At μ mat Between two adjacent discrete energy points (E1,μ1) and (E2,μ2) of (E), (E1 < E) eff If E < E2), then E is calculated using the linear relationship between the two points. eff corresponding μ mat (Eeff The formula logic is to calculate the attenuation coefficient of intermediate energy based on the rate of change of the attenuation coefficient of adjacent energy points. The linear interpolation method is simple to calculate, efficient, and can meet the needs of attenuation coefficient calculation when the energy interval is small (e.g., the interval between database energy points ≤ 10keV).
[0063] In one embodiment of the present invention, a reference circumferential angle, a target contrast-to-noise ratio threshold, and an equivalent thickness of the target defect are set. A reference exposure is calculated at the reference circumferential angle, including: Let the reference circumferential angle be θ0, the target contrast-to-noise ratio threshold be CNR0, and the equivalent thickness of the target defect be δ. The first function for determining the equivalent thickness of the workpiece along the X-ray irradiation direction takes the value T(θ0) at θ0; The second function for determining the source-image distance takes the value R(θ0) at θ0; The third function is determined to have a value of φ(θ0) at θ0, representing the angle between the ray and the normal to the inner wall of the workpiece. The fourth function of the X-ray source directional attenuation coefficient is determined to take the value H(θ0) at θ0; The linear attenuation coefficient of the workpiece material under effective energy is determined to be μ(E). eff ); The equivalent thickness of the defect after angle correction at the reference circumferential angle θ0 is denoted as δ. eff (θ0), the calculation formula is: δ eff (θ0) is used to characterize the equivalent effect length of the target defect on the X-ray path at θ0; The count generated per unit exposure inherent in the detection system is used as the system gain constant Γ; Obtain the exposure amount mAs set by the monitoring system; Establish a background counting model I at the reference circumferential angle θ0 bg (θ0), the calculation formula is as follows: Where e represents the natural base; Based on I bg (θ0) and δ eff (θ0), establish the contrast-to-noise ratio expression at the reference circumferential angle θ0, denoted as CNR(θ0), and calculate it as follows: Let CNR(θ0) equal CNR0, and solve the system of equations for the background counting model and the contrast-to-noise ratio to obtain the reference exposure mAs0 at the reference circumferential angle θ0. The calculation formula is as follows: .
[0064] In detail, the target-to-noise ratio threshold determines the detectability of defects.
[0065] In detail, the equivalent thickness of the target defect is used to simulate the attenuation effect of the actual defect on the ray path, ensuring that the calculated exposure amount can be adapted to the detection requirements of the target defect.
[0066] In detail, the equivalent thickness value reflects the basis of X-ray attenuation at the reference angle.
[0067] In detail, the source-image distance value reflects the propagation distance of X-rays from the source to the detector at the reference angle.
[0068] In detail, the included angle value of the inner wall normal is used to correct the equivalent thickness of the defect.
[0069] In detail, the directional attenuation coefficient of the X-ray source reflects the intensity attenuation of the X-ray source itself at the reference angle.
[0070] In detail, the linear attenuation coefficient is used to calculate the attenuation of X-rays as they pass through the workpiece.
[0071] In detail, the X-ray at the reference angle has an incident angle, and the actual effective length of the defect on the X-ray path will change due to this angle. The set equivalent thickness of the defect needs to be corrected by the included angle of the inner wall normal at the reference angle to obtain the equivalent thickness of the defect after angle correction. The equivalent thickness of the defect after angle correction can reflect the actual effect of the defect at the reference angle on X-ray attenuation.
[0072] In detail, the system gain constant is an inherent parameter of the detection system, which characterizes the count generated by the detector per unit exposure. It is used to establish the correlation between the exposure and the detector count in order to convert the exposure parameters into an imaging signal.
[0073] In detail, background count refers to the signal of the defect-free area received by the detector. The background count model associates the exposure amount, the system gain constant, and the attenuation effect during the propagation and penetration of X-rays (combined with the equivalent thickness at the reference angle, the linear attenuation coefficient of the workpiece material under effective energy, etc.) to construct a quantitative correspondence between the exposure amount and the background count.
[0074] In detail, the contrast-to-noise ratio is determined by the difference in counts between defects and the background (contrast) and the background noise. By substituting the equivalent thickness of the defect after angle correction, the count change caused by the defect is calculated, and thus the correlation expression between the contrast-to-noise ratio and the exposure is obtained.
[0075] In detail, the contrast-to-noise ratio at the reference angle is set to equal the target threshold. The background counting model and the contrast-to-noise ratio expression are combined, and the exposure at the reference angle is solved through mathematical calculation. This exposure is the baseline exposure, ensuring that the target defect detection sensitivity can be achieved at the reference angle.
[0076] In detail, the system gain constant Γ can be obtained through standard exposure experiments, and its derivation is as follows: Set the tube voltage to be consistent with subsequent testing (to ensure uniform energy conditions) and remove all workpieces (to avoid the effects of attenuation). Select 3-5 different standard exposure values (such as mAs1, mAs2...mAsn, covering the exposure value range that may be used in subsequent detection), perform exposure respectively and record the corresponding detector count (denoted as C1, C2...Cn). Calculate the count / exposure ratio (C1 / mAs1, C2 / mAs2…Cn / mAsn) corresponding to each standard exposure, and take the arithmetic mean of these ratios, which is the system gain constant Γ.
[0077] Detailed compensation measures for scattered rays in the background counting model include: Under the same illumination conditions as the reference angle θ0 (same S, detector position, kVp), the air exposure count I_air (containing only scattered rays and system background) without a test block and the test block count I_test (containing effective penetration count + scattered rays + system background) with a defect-free test block are measured respectively. The effective penetration count of the test block is calculated as Ieffective = Itest - Iempty, which is the pure penetration count after eliminating scattering.
[0078] The detailed basis for setting the equivalent thickness δ of the target defect includes: According to industry defect detection standards: δ can be set as the minimum detectable thickness of non-fusion / porosity defects on the inner wall of the circumferential weld in the standard (e.g., if the standard specifies that the minimum thickness of such defects is 0.5mm, then δ is 0.5mm), to ensure that the reference exposure amount mAs0 can meet the industry standard requirements for defect detection.
[0079] In one embodiment of the present invention, a target exposure distribution is generated based on a reference exposure, a first function, a second function, a third function, a fourth function, and a linear attenuation coefficient, including: Determine the equivalent thickness of the defect after angle correction at the circumferential angle θ; To ensure that the contrast-to-noise ratio at the circumferential angle θ is the same as the target contrast-to-noise ratio threshold CNR0 at the reference circumferential angle θ0, an equivalent condition for contrast-to-noise ratio is established, expressed as: Where mAs(θ) is the target exposure distribution to be determined at the circumferential angle θ; Based on the equivalent condition of contrast-to-noise ratio, the target exposure distribution mAs(θ) at the circumferential angle θ is calculated using the following formula: .
[0080] In detail, for any circumferential angle, the angle between the ray and the normal to the inner wall of the workpiece differs from that of the reference circumferential angle, and the actual effective length of the defect along the ray path at that circumferential angle will change. The equivalent thickness of the target defect is corrected using the angle of the inner wall normal corresponding to that circumferential angle, resulting in the angle-corrected equivalent thickness of the defect at that angle.
[0081] In detail, to achieve consistent defect detection sensitivity across the entire circumference, the contrast-to-noise ratio at any circumferential angle must be the same as the target contrast-to-noise ratio threshold at the reference circumferential angle. This extends the verified defect detection capability at the reference angle to all angles across the entire circumference, ensuring that no angle experiences a decrease in detection capability due to improper exposure.
[0082] In detail, the differences in ray attenuation, distance attenuation, and source intensity attenuation between this angle and the reference angle are quantified using the equivalent thickness (first function), source-image distance (second function), directional attenuation coefficient (fourth function), and linear attenuation coefficient corresponding to this circumferential angle. Then, combined with the defect equivalent thickness corrected for this angle, the reference exposure for the reference angle is adjusted to the target exposure adapted to this angle. This calculation is repeated for all angles along the entire circumference, ultimately forming a target exposure distribution that varies with the circumferential angle.
[0083] In detail, the rule for determining the angle value when correcting the equivalent thickness of the defect at the circumferential angle θ is as follows: the parameterized ray r corresponding to the circumferential angle θ is used. θ (t) Intersection point Q with the inner wall surface of the workpiece in The included angle at (θ).
[0084] In detail, the error control threshold for the target exposure distribution calculation must meet the requirement that the CNR deviation caused by the mAs(θ) calculation error is ≤ 10%-20% of CNR0.
[0085] In one embodiment of the present invention, the target exposure distribution is discretized into sector exposure sequences at preset angular intervals. The first exposure is performed under equipment performance constraints and total exposure constraints. The actual contrast-to-noise ratio of each sector is calculated. Based on the actual contrast-to-noise ratio and the target contrast-to-noise ratio threshold, the workpiece is determined to be either a defective or qualified product, including: A preset angle interval is set as Δθ, and the number of sectors K is calculated based on the preset angle interval. Where 2Π represents the circumferential angle range of the circumferential weld, and K is a positive integer; Calculate the central angle θ of the j-th sector. j , ; Based on the target exposure distribution mAs(θ) and the central angle θ j Calculate the sector exposure mAs of the j-th sector. j , ; The upper limit of single-sector device performance is set to mAs. max; Take the sector exposure mAs of the j-th sector. j With the upper limit of single-sector device performance mAs max The smaller value among them is taken as the target exposure of the j-th sector; The sum of the target exposure values of all sectors is used as the total exposure value; The sum of the single-sector device performance limits of all sectors is used as the limit for total exposure. The ratio of total exposure to the limit of total exposure is used as the target scaling weight; The product of the target scaling weight and the target exposure of the j-th sector is used as the true exposure of the j-th sector; the j-th sector is exposed according to the true exposure, and the digital radiographic inspection image of the circumferential weld of the j-th sector is acquired; Extract the background grayscale count S of the j-th sector from the acquired digital X-ray inspection image. bg,j The grayscale count of the background area is the grayscale count of the defect-free workpiece base material area in the image; From the acquired digital X-ray inspection image, extract the grayscale count S of the candidate defect region in the j-th sector. def,j The grayscale count of the candidate defect region is the grayscale count σ of the suspected defect region in the image. j ; Calculate the standard deviation of the background noise in the j-th sector based on the grayscale count of the background area; The actual contrast-to-noise ratio (CNR) of the sector is calculated based on the grayscale counts of the background area, the grayscale counts of the candidate defect area, and the standard deviation of the background noise. j (art) The calculation formula is: When the actual contrast-to-noise ratio (CNR) j (art) If the target contrast-to-noise ratio (CNR) is less than or equal to the target threshold CNR0, then the j-th sector is considered qualified; if all sectors are qualified, then the workpiece is a qualified product; otherwise, the workpiece is considered a defective product.
[0086] In detail, a preset angle interval is set. This preset angle interval needs to be determined in conjunction with the equipment's exposure accuracy and inspection efficiency. It is used to divide the entire circumferential angle range of the circumferential weld into several discrete sectors. The number of sectors is calculated based on the entire circumferential angle range and the preset angle interval, ensuring that all sectors can completely cover the circumference of the circumferential weld without any blind spots. The central angle of each sector is calculated, and the central angle is used to determine the specific circumferential position of each sector, so that each sector corresponds to a specific circumferential area of the circumferential weld.
[0087] In detail, based on the target exposure distribution and the central angle of each sector, the continuous exposure within the sector's angle range is averaged to obtain the initial sector exposure. The upper limit of single-sector equipment performance is determined, and the smaller value between the initial sector exposure and this upper limit is taken as the sector's target exposure, preventing equipment from malfunctioning due to exceeding performance limits. The sum of all sector target exposures is calculated to obtain the total exposure. Simultaneously, the sum of all sector equipment performance limits is calculated as the restricted total exposure. The ratio of the total exposure to the restricted total exposure is used as the target scaling weight. If the total exposure exceeds the production line's allowable total dose budget, this weight is used to scale the target exposure of each sector to obtain the actual exposure of each sector, ensuring the total dose meets production line requirements.
[0088] In detail, the exposure operation is performed sector by sector according to the actual exposure amount of each sector, and the digital radiographic inspection image of the circumferential weld corresponding to each sector is acquired simultaneously. The image must clearly reflect the internal structure of the workpiece in that sector.
[0089] In detail, the grayscale count of the background area of each sector is extracted from the acquired image. This count comes from the defect-free workpiece parent material area in the image and can reflect the imaging signal intensity of the defect-free area.
[0090] In detail, the grayscale count of candidate defect areas is extracted. This count comes from areas in the image suspected of having defects and reflects the signal intensity of the suspected defect areas.
[0091] In detail, the standard deviation of background noise is calculated based on the grayscale count of the background area, and this standard deviation quantifies the degree of fluctuation of the background signal.
[0092] In detail, based on the gray-scale count of the background area, the gray-scale count of the candidate defect area, and the standard deviation of the background noise, the actual contrast-to-noise ratio of the sector is calculated. The actual contrast-to-noise ratio can reflect the signal difference between the defect and the background, and at the same time reflect the degree of influence of noise on defect identification.
[0093] In detail, the actual contrast-to-noise ratio of each sector is compared with the target contrast-to-noise ratio threshold. If the actual contrast-to-noise ratio of a sector is lower than the threshold, it means that the defect detection capability of that sector is not up to standard. If the actual contrast-to-noise ratio of all sectors is not lower than the threshold, the workpiece is judged as qualified. If any sector is not up to standard, the workpiece is judged as defective, ensuring that only workpieces that meet the defect detection requirements in the entire circumference are judged as qualified.
[0094] Detailed grayscale count S of candidate defect areas def,j The extraction scope is defined, including: Geometric constraints: Limiting the weld area range: The circumferential projection range of the circumferential weld is calculated by the 3D model. A weld area mask can be generated based on this range, that is, only the circumferential weld projection area in the sector image is retained (excluding the non-weld area of the workpiece base material and the invalid area of the detector edge). Since the target defect (non-fusion / pore) only exists in the weld area, this mask can first eliminate more than 90% of the non-defect possible areas, avoiding misjudging the normal area of the base material as a suspected defect.
[0095] Grayscale constraint: Limiting the range of grayscale anomalies: It is clear that the equivalent thickness δ of the defect will cause the ray attenuation to differ from that of the parent material, that is, the grayscale of the defect area will deviate from the grayscale of the background area S. bg,j (For example, if the pores are easily penetrated by rays, the grayscale value is greater than S) bg,j +2σ j The lack of fusion results in increased local thickness, leading to a grayscale value < S. bg,j -2σ j , σ j (This is the standard deviation of background noise). Therefore, within the mask in the weld area, further extraction of grayscale values exceeding [S] is necessary. bg,j -2σ j ,S bg,j +2σ j The connected region within the interval is the suspected defect region, and its grayscale count is S. bg,j .
[0096] Range Boundary: Complete Coverage of Connected Regions: The extraction range of suspected defective regions is the smallest bounding rectangle of the gray-level abnormal connected regions, ensuring complete coverage of all pixels within the connected regions, without omitting defective edge pixels (avoiding S-shaped edges). def,j (Underestimating defect grayscale differences), and also does not include pixels of surrounding normal weld seams (avoiding S) def,j (diluted to normal grayscale), ensuring S def,j It can reflect the grayscale difference between defects and the background.
[0097] Detailed background noise standard deviation σ j The statistical sample size includes: The lower limit of the sample size is based on the statistical laws of quantum noise: quantum noise follows a Poisson distribution, and the statistical error of its standard deviation decreases as the sample size increases. That is, when the sample size (number of pixels) is ≥1000, σ j The statistical error is ≤3% (meeting the requirement that noise statistical error does not affect CNR determination in industrial testing); if the sample size is <500, σ j The statistical error may exceed 5%, which may lead to CNR. j (art) The calculated deviation leads to a misjudgment of the workpiece's conformity. Therefore, σ j The lower limit of the statistical sample size is set at 1000 pixels.
[0098] Sample selection rules: Random and uniform coverage of the background area: The background area is the defect-free workpiece base material area. Samples must be randomly and uniformly selected from this area to avoid concentration in a certain local area (such as a local gray-scale gradient area) which would lead to sample bias. Specifically, a grid sampling method can be used: Divide the background area into a 10×10 grid, and randomly select 10 pixels from each grid, for a total of 1000 pixels. This ensures that the samples can cover the overall gray-scale distribution of the background area, further reducing σ. j The statistical error.
[0099] Maximum sample size: Balancing computational efficiency: A larger sample size is not always better. When the sample size > 5000, σ j The statistical error is already less than 1%, and further increasing the sample size will have limited effect on improving accuracy, but will increase computation time. Considering the real-time requirements of automatic exposure, the upper limit of the sample size is set at 5000 pixels, achieving a balance between accuracy and efficiency.
[0100] Detailed criteria for determining the total exposure limit include: Equipment hardware safety standards: Based on parameters such as the tube voltage and linear attenuation coefficient of the X-ray tube, there is a maximum allowable total mAs for a single detection of the X-ray tube (determined by the equipment manufacturer, such as 5000 mAs for a certain model of X-ray tube). The total exposure must first meet the requirement of being less than or equal to the maximum total mAs for a single detection of the equipment to avoid damage to the X-ray tube due to excessive total exposure.
[0101] Example 2 An automatic exposure system for an X-ray flaw detector, applied to any of the automatic exposure methods for an X-ray flaw detector described above, includes: The data acquisition and processing module acquires the three-dimensional model of the workpiece. Based on the preset X-ray irradiation geometry, it calculates the first function of the equivalent thickness of the workpiece along the X-ray irradiation direction with respect to the circumferential angle, the second function of the source-image distance with respect to the circumferential angle, and the third function of the angle between the X-ray and the normal of the inner wall of the workpiece with respect to the circumferential angle. It also obtains the fourth function of the X-ray source directional attenuation coefficient with respect to the circumferential angle through workpiece-free flat field exposure. The exposure distribution test module selects tube voltage parameters, determines the effective energy through energy calibration, obtains the linear attenuation coefficient of the workpiece material under this effective energy based on material attenuation characteristic data, sets the reference circumferential angle, target contrast-to-noise ratio threshold, and equivalent thickness of the target defect, and calculates the reference exposure amount at the reference circumferential angle; based on the reference exposure amount, the first function, the second function, the third function, the fourth function, and the linear attenuation coefficient, the target exposure amount distribution is generated. The workpiece flaw detection module discretizes the target exposure distribution into sector exposure sequences at preset angular intervals. Under the constraints of equipment performance and total exposure, it performs the first exposure, calculates the actual contrast noise ratio of each sector, and determines whether the workpiece is a defective or qualified product based on the actual contrast noise ratio and the target contrast noise ratio threshold.
[0102] The embodiments of this example have been described above. However, this example is not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms based on the guidance of this example, and all of them are within the protection scope of this example.
Claims
1. An automatic exposure method for an X-ray flaw detector, characterized in that, include: A three-dimensional model of the workpiece is obtained. Based on the preset X-ray irradiation geometry, the first function of the equivalent thickness of the workpiece along the X-ray irradiation direction with the circumferential angle, the second function of the source-image distance with the circumferential angle, and the third function of the angle between the ray and the normal of the inner wall of the workpiece with the circumferential angle are calculated. The fourth function of the X-ray source directional attenuation coefficient with the circumferential angle is obtained through workpiece-free flat field exposure. Select the tube voltage parameters, determine the effective energy through energy calibration, obtain the linear attenuation coefficient of the workpiece material under the effective energy based on the material attenuation characteristic data, set the reference circumferential angle, the target contrast-to-noise ratio threshold and the equivalent thickness of the target defect, and calculate the reference exposure at the reference circumferential angle. Based on the baseline exposure, the first function, the second function, the third function, the fourth function, and the linear attenuation coefficient, the target exposure distribution is generated; The target exposure distribution is discretized into sector exposure sequences at preset angular intervals. The first exposure is performed under equipment performance constraints and total exposure constraints. The actual contrast noise ratio of each sector is calculated. Based on the actual contrast noise ratio and the target contrast noise ratio threshold, the workpiece is determined to be a defective or qualified product.
2. The automatic exposure method for an X-ray flaw detector according to claim 1, characterized in that, The first function of the equivalent thickness of the workpiece along the X-ray irradiation direction with respect to the circumferential angle includes: Establish a workpiece coordinate system OXYZ, and set the center axis of the circumferential weld as the OZ axis of the workpiece coordinate system OXYZ; define the circumferential angle as θ, with the preset reference direction as the starting direction; Set the X-ray irradiation geometry parameters, including: the X-ray source position S, the detector plane Π for receiving X-rays, and the detector reference point p0 on the detector plane Π; Define a rotation matrix RZ(θ), which is a matrix that rotates by an angle θ around the OZ axis of the workpiece coordinate system OXYZ. By operating the rotation matrix RZ(θ) on the detector reference point p0, the detector imaging point p(θ) corresponding to the circumferential angle θ is obtained. The calculation formula is as follows: ; Based on the X-ray source position S and the detector imaging point p(θ), the X-ray unit direction vector u(θ) corresponding to the circumferential angle θ is calculated using the following formula: ;in, Represents the Euclidean norm; Based on the X-ray source position S and the X-ray unit direction vector u(θ), a parameterized ray r corresponding to the circumferential angle θ is constructed. θ (t), the formula is constructed as follows Where t represents the length of the ray extending from the X-ray source position S; Obtain the 3D model M of the workpiece for the circumferential weld; the 3D model M is a closed solid model; and use the parameterized ray r... θ (t) is intersected with the 3D model M of the workpiece to obtain the parameterized ray r. θ (t) Incident parameters t entering the 3D model M of the workpiece in (θ) and the exit parameter t of the three-dimensional model M of the workpiece. out (θ), and satisfy t out (θ)>t in (θ); Based on the incident parameter t in (t) and parameterized ray r θ (t), the parameterized ray r is calculated. θ (t) The incident point P enters the three-dimensional model M of the workpiece. in (θ), the calculation formula is: Based on the output parameter t out (θ) and parameterized ray r θ (t), the parameterized ray r is calculated. θ (t) The exit point P of the three-dimensional model M of the workpiece. out (θ), the calculation formula is: ; The first function T(θ) of the equivalent thickness of the workpiece along the X-ray irradiation direction with respect to the circumferential angle is defined as follows: The formula for calculating the first function T(θ) is: Where T(θ) represents the equivalent thickness of the workpiece at the circumferential angle θ along the X-ray projection direction.
3. The automatic exposure method for an X-ray flaw detector according to claim 2, characterized in that, Define the second function of the source-image distance as R(θ) with respect to the circumferential angle, and calculate it using the following formula: Where R(θ) represents the distance from the X-ray source position S to the detector imaging point p(θ) on the detector plane Π.
4. The automatic exposure method for an X-ray flaw detector according to claim 3, characterized in that, The third function of the angle between the ray and the normal to the inner wall of the workpiece as a function of the circumferential angle includes: Read the set of inner wall surfaces Σ of the workpiece from the 3D model M of the workpiece. in and the set of curved surfaces on the inner wall of the workpiece Σ in The corresponding unit normal field function n in (x), unit normal field function n in (x) has its normal pointing towards the material side; For a circumferential angle θ, in the closed interval [t] in (θ),t out Solving for the parameterized ray r on (θ)] θ (t) and the set of curved surfaces of the inner wall of the workpiece Σ in Intersection parameter t wall (θ), so that r θ (t)∈Σ in Based on the intersection parameter t wall (θ) and parameterized ray r θ (t), calculate the intersection point Q in (θ), the calculation formula is: ; Based on intersection point Q in (θ) and the unit normal field function n in (x), obtain the intersection point Q in The unit normal at (θ) n in (θ), the calculation formula is: ; The third function of the angle between the ray and the normal to the inner wall of the workpiece as a function of the circumferential angle is defined as φ(θ), and the formula for calculating the third function φ(θ) is: .
5. The automatic exposure method for an X-ray flaw detector according to claim 4, characterized in that, The fourth function of the X-ray source directional attenuation coefficient with respect to the circumferential angle includes: In the absence of a workpiece, the position S of the X-ray source, the plane Π of the detector, and the preset X-ray irradiation geometry remain unchanged; Define RZ(θ) as the rotation matrix around the OZ axis of the workpiece coordinate system, where θ is the rotation angle. p0 is a fixed reference point on the detector plane Π. This is achieved through matrix operations. The detector sampling point p(θ) corresponding to the circumferential angle θ is obtained; Let G(x) be the counting function of the detector at position x. The flat field count corresponding to the circumferential angle θ is obtained through the counting function. ; The average flat field count is calculated by integration over the entire circumferential angle range. ; Determine the fourth function of the X-ray source directional attenuation coefficient with respect to the circumferential angle. .
6. The automatic exposure method for an X-ray flaw detector according to claim 5, characterized in that, Select the tube voltage parameters, determine the effective energy through energy calibration, and obtain the linear attenuation coefficient of the workpiece material under this effective energy based on material attenuation characteristic data, including: Measurements were performed at a tube voltage of kVp, including: The thickness x of the i-th stage of the stepped wedge of the target material was measured. i Corresponding detector count I i ; Remove the target material stepped wedge and measure the detector count I0 when there is no workpiece material; Based on the principle of single-energy equivalence, the effective energy E is determined by least-squares fitting. eff The calculation formula is: in, Let E represent the energy value that minimizes the summation term on the right, and ln denote the natural logarithm function. eff Used to characterize the equivalent energy of an X-ray beam at a tube voltage of kVp using a single energy; Obtain the linear attenuation coefficient function μ of the workpiece material mat (E), μ mat (E) Characterizes the attenuation capability of workpiece materials to X-rays of different energies, based on the effective energy E. eff With linear decay coefficient function μ mat (E), calculate the effective energy E of the workpiece material. eff The linear attenuation coefficient μ(E) under the following conditions eff The calculation formula is: .
7. The automatic exposure method for an X-ray flaw detector according to claim 6, characterized in that, Define the reference circumferential angle, the target contrast-to-noise ratio threshold, and the equivalent thickness of the target defect. Calculate the baseline exposure at the reference circumferential angle, including: Let the reference circumferential angle be θ0, the target contrast-to-noise ratio threshold be CNR0, and the equivalent thickness of the target defect be δ. The first function for determining the equivalent thickness of the workpiece along the X-ray irradiation direction takes the value T(θ0) at θ0; The second function for determining the source-image distance takes the value R(θ0) at θ0; The third function is determined to have a value of φ(θ0) at θ0, representing the angle between the ray and the normal to the inner wall of the workpiece. The fourth function of the X-ray source directional attenuation coefficient is determined to take the value H(θ0) at θ0; The linear attenuation coefficient of the workpiece material under effective energy is determined to be μ(E). eff ); The equivalent thickness of the defect after angle correction at the reference circumferential angle θ0 is denoted as δ. eff (θ0), the calculation formula is: δ eff (θ0) is used to characterize the equivalent effect length of the target defect on the X-ray path at θ0; Take the count generated by the inherent unit exposure of the detection system as the system gain constant Γ; Obtain the exposure mAs set by the monitoring system; Establish a background counting model I at the reference circumferential angle θ0 bg (θ0), the calculation formula is as follows: where e represents the natural base; Based on I bg (θ0) and δ eff (θ0), establish the contrast-to-noise ratio expression at the reference circumferential angle θ0, denoted as CNR(θ0), and calculate it as follows: Let CNR(θ0) be equal to CNR0, and solve the background count model and the contrast-to-noise ratio expression simultaneously to obtain the reference exposure mAs0 at the reference circumferential angle θ0. The calculation formula is as follows: 。 8. The automatic exposure method for an X-ray flaw detector according to claim 7, characterized in that, Generate a target exposure distribution based on the reference exposure, the first function, the second function, the third function, the fourth function, and the linear attenuation coefficient, including: Determine the defect equivalent thickness after angle correction at the circumferential angle θ; Make the contrast-to-noise ratio at the circumferential angle θ the same as the target contrast-to-noise ratio threshold CNR0 at the reference circumferential angle θ0, and establish a contrast-to-noise ratio equivalence condition. The expression is: where mAs(θ) is the target exposure distribution to be obtained at the circumferential angle θ; Based on the contrast-to-noise ratio equivalence condition, calculate the target exposure distribution mAs(θ) at the circumferential angle θ. The calculation formula is as follows: 。 9. The automatic exposure method for an X-ray flaw detector according to claim 8, characterized in that, Discretize the target exposure distribution into a sector exposure amount sequence at a preset angle interval, perform the first exposure under the constraints of equipment performance and total exposure amount, calculate the actual contrast-to-noise ratio of each sector, and determine whether the workpiece is a defective product or a qualified product according to the actual contrast-to-noise ratio and the target contrast-to-noise ratio threshold, including: A preset angle interval is set as Δθ, and the number of sectors K is calculated based on the preset angle interval. Where 2Π represents the circumferential angle range of the circumferential weld, and K is a positive integer; Calculate the central angle θ of the j-th sector. j , ; Based on the target exposure distribution mAs(θ) and the central angle θ j Calculate the sector exposure mAs of the j-th sector. j , ; The upper limit of single-sector device performance is set to mAs. max; Take the sector exposure mAs of the j-th sector. j With the upper limit of single-sector device performance mAs max The smaller value among them is taken as the target exposure of the j-th sector; Take the sum of the target exposure amounts of all sectors as the total exposure amount; Take the sum of the single-sector equipment performance upper limits of all sectors as the limited total exposure amount; Take the ratio of the total exposure amount to the limited total exposure amount as the target scaling weight; Take the product of the target scaling weight and the target exposure amount of the jth sector as the true exposure amount of the jth sector; perform exposure on the jth sector according to the true exposure amount, and collect the circumferential weld digital radiography image of the jth sector; Extract the background grayscale count S of the j-th sector from the acquired digital X-ray inspection image. bg,j The grayscale count of the background area is the grayscale count of the defect-free workpiece base material area in the image; From the acquired digital X-ray inspection image, extract the grayscale count S of the candidate defect region in the j-th sector. def,j The grayscale count of the candidate defect region is the grayscale count σ of the suspected defect region in the image. j ; Calculate the background noise standard deviation of the jth sector according to the gray count of the background area; The actual contrast-to-noise ratio (CNR) of the sector is calculated based on the grayscale counts of the background area, the grayscale counts of the candidate defect area, and the standard deviation of the background noise. j (art) The calculation formula is: When the actual contrast-to-noise ratio (CNR) j (art) If the target contrast-to-noise ratio (CNR) is less than or equal to the target threshold CNR0, then the j-th sector is considered qualified; if all sectors are qualified, then the workpiece is a qualified product; otherwise, the workpiece is considered a defective product.
10. An automatic exposure system for an X-ray flaw detector, applied to the automatic exposure method for an X-ray flaw detector as described in any one of claims 1-9, characterized in that, including: Data acquisition and processing module, obtain the three-dimensional model of the workpiece, calculate the first function of the equivalent thickness of the workpiece along the X-ray projection direction with respect to the circumferential angle, the second function of the source-image distance with respect to the circumferential angle, the third function of the angle between the ray and the normal of the inner wall of the workpiece with respect to the circumferential angle based on the preset X-ray projection geometry, and obtain the fourth function of the X-ray source directivity attenuation coefficient with respect to the circumferential angle through flat-field exposure without the workpiece; Exposure distribution test module, select the tube voltage parameter, determine the effective energy through energy calibration, obtain the linear attenuation coefficient of the workpiece material at this effective energy based on the material attenuation characteristic data, set the reference circumferential angle, the target contrast-to-noise ratio threshold, and the equivalent thickness of the target defect, and calculate the reference exposure at the reference circumferential angle; Generate a target exposure distribution based on the reference exposure, the first function, the second function, the third function, the fourth function, and the linear attenuation coefficient; Workpiece flaw detection module, discretize the target exposure distribution into a sector exposure amount sequence at a preset angle interval, perform the first exposure under the constraints of equipment performance and total exposure amount, calculate the actual contrast-to-noise ratio of each sector, and determine whether the workpiece is a defective product or a qualified product according to the actual contrast-to-noise ratio and the target contrast-to-noise ratio threshold.