X-ray transmission detection method and equipment for pore defects in welding material
By constructing a radial thickness compensation coefficient matrix and using radial distance weighted amplification technology, the problem that traditional X-ray inspection methods cannot identify porosity defects in the axial region of cylindrical welded materials has been solved, realizing porosity detection in the entire radial range and improving the detection accuracy.
Patent Information
- Application Number
- CN202511454458.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-13
- Publication Date
- 2025-11-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional X-ray inspection methods are difficult to effectively identify minute porosity defects in the axial region inside cylindrical welded materials, resulting in low inspection accuracy.
By constructing a radial thickness compensation coefficient matrix and performing pixel-level multiplication operations, combined with radial distance weighted amplification technology, the cylindrical cross-section is divided into three detection areas: edge, middle, and axis, and pore identification is performed in each area to achieve pore detection in the entire radial range.
It improves the detection accuracy of internal porosity defects in cylindrical welding materials, and achieves full coverage porosity detection from the surface to the shaft, avoiding loss of detection accuracy.
Smart Images

Figure CN120976207A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of material detection, and in particular to an X-ray transmission detection method and device for internal porosity defects of welding material. BACKGROUND
[0002] Cylindrical tin bar is an important welding material, and accurate detection of internal porosity defects of the cylindrical tin bar is crucial to ensure welding quality. X-ray transmission detection technology has become a main means for detecting internal defects of welding material due to its non-destructive and strong penetration ability. However, the traditional X-ray detection method is mainly designed for flat or uniform-thickness materials, and is difficult to effectively cope with the complex geometric characteristics of cylindrical materials. When X-rays penetrate the cylindrical cross section vertically, the path length of the edge region tends to zero, while the path length of the axial region reaches the maximum value of the diameter of the tin bar. This thickness effect causes a serious radial intensity gradient in the transmission image. The axial region produces the maximum transmission attenuation due to the longest path of the rays, so that the tiny porosity signals near the axial center are completely covered by the thickness effect, and the traditional detection method cannot effectively identify the defects buried in the axial region. SUMMARY
[0003] The present application provides an X-ray transmission detection method and device for internal porosity defects of welding material, which realizes porosity detection coverage from the surface to the axial center, and improves the accuracy of internal porosity defect detection.
[0004] In a first aspect, the present application provides an X-ray transmission detection method for internal porosity defects of welding material, which comprises: X-ray transmission scanning of the tin bar to be detected to obtain a first transmission image, and extracting geometric parameters based on the first transmission image; Constructing a radial thickness compensation coefficient matrix according to the geometric parameters, and performing pixel multiplication operation on the first transmission image and the radial thickness compensation coefficient matrix to obtain a second transmission image; Radial distance weighted magnification of the axial region in the second transmission image to obtain a third transmission image; Dividing the third transmission image into an edge detection region, an intermediate detection region and an axial center detection region, and respectively performing porosity recognition to obtain a porosity distribution detection result.
[0005] In combination with the first aspect, in a first implementation manner of the first aspect of the present application, the X-ray transmission scanning of the tin bar to be detected to obtain a first transmission image, and extracting geometric parameters based on the first transmission image, comprises: Place the tin bar to be detected horizontally along the axial direction on the detection table between the X-ray source and the flat panel detector, determine the coincidence position of the tin bar axis and the X-ray beam center through the laser positioning system, and obtain the tin bar to be detected after geometric alignment; Set the voltage parameter and exposure time parameter of the X-ray tube according to the linear attenuation coefficient of the tin material and the diameter size of the tin bar to be detected, so that the X-ray beam vertically penetrates the entire cross-sectional area of the tin bar to be detected, and X-ray irradiation conditions are obtained; Start the scanning program under the X-ray irradiation conditions, and the X-ray beam is incident from one side of the tin bar to be detected and reaches the flat panel detector on the opposite side, and transmission intensity data are obtained; Convert the transmission intensity data into pixel gray value and establish the mapping relationship between the pixel coordinates and the spatial position, and record the coordinate position of the tin bar axis in the image, and obtain the first transmission image; Extract the profile boundary information of the tin bar to be detected based on the first transmission image, and calculate the geometric parameters based on the profile boundary information.
[0006] In combination with the first aspect, in a second implementation manner of the first aspect of the present application, the profile boundary information of the tin bar to be detected is extracted based on the first transmission image, and the geometric parameters are calculated based on the profile boundary information, which includes: Calculate the pixel gradient amplitude and direction angle of the first transmission image, and extract the profile boundary information of the tin bar to be detected based on the pixel gradient amplitude and the direction angle; Generate a sequence of boundary pixel point coordinates based on the profile boundary information; Jointly solve the center and the radius of the sequence of boundary pixel point coordinates to obtain the center coordinates and the radius size; Establish a radial coordinate transformation relationship with the center coordinates as the origin of the new coordinate system, take the radius size as the reference parameter for radial distance calculation, and store the transformation matrix of the pixel coordinates to the radial coordinates, and obtain the geometric parameters.
[0007] In combination with the first aspect, in a third implementation manner of the first aspect of the present application, the radial thickness compensation coefficient matrix is constructed according to the geometric parameters, and the pixel multiplication operation is performed on the first transmission image and the radial thickness compensation coefficient matrix to obtain the second transmission image, which includes: Calculate the radial distance from each pixel point in the first transmission image to the tin bar axis one by one using the radial coordinate transformation relationship in the geometric parameters, and establish a radial distance distribution map based on the radial distance; Solve the ray penetration thickness distribution data corresponding to the radial position according to each radial distance in the radial distance distribution map; According to the linear attenuation coefficient of the tin bar to be detected and the ray penetration thickness distribution data, a theoretical transmission intensity attenuation value of X-rays at different radial positions is calculated, and a transmission attenuation model is established based on the theoretical transmission intensity attenuation value; A pixel-by-pixel ratio operation is performed on the incident X-ray intensity and the transmission attenuation model to generate a radial thickness compensation coefficient matrix; A pixel multiplication operation is performed on the first transmission image and the radial thickness compensation coefficient matrix to obtain a second transmission image.
[0008] In a fourth implementation manner of the first aspect, the calculation of the theoretical transmission intensity attenuation value of X-rays at different radial positions according to the linear attenuation coefficient of the tin bar to be detected and the ray penetration thickness distribution data, and the establishment of the transmission attenuation model based on the theoretical transmission intensity attenuation value, comprise: The incident X-ray intensity in the X-ray irradiation condition is extracted, and the incident X-ray intensity and the linear attenuation coefficient of the tin material are matched to form calculation parameters of the Lambert-Beer law; An exponential attenuation operation is performed on the ray penetration thickness distribution data using the calculation parameters, and a theoretical transmission intensity attenuation value corresponding to each radial position on the cylindrical cross section is calculated through the Lambert-Beer attenuation formula; It is verified whether the theoretical transmission intensity attenuation value satisfies the cylindrical geometric constraint condition, and if so, a transmission attenuation model between the radial distance and the theoretical transmission intensity attenuation value is constructed.
[0009] In a fifth implementation manner of the first aspect, the pixel multiplication operation of the first transmission image and the radial thickness compensation coefficient matrix to obtain the second transmission image, comprises: A spatial correspondence relationship between each pixel position in the first transmission image and a corresponding compensation coefficient in the radial thickness compensation coefficient matrix is constructed; The first transmission image is scanned row by row and column by column, a pixel gray value of a current pixel position is extracted, and a compensation coefficient at a same coordinate position in the radial thickness compensation coefficient matrix is synchronously read; The pixel gray value of the current pixel position is multiplied by the corresponding compensation coefficient to obtain a target gray value; All the target gray values are rearranged into the same matrix structure as the first transmission image to form the second transmission image.
[0010] In a sixth implementation manner of the first aspect, the radial distance weighted magnification of the axial core region in the second transmission image to obtain the third transmission image, comprises: Calibrate a spatial range of an axis core region on the second transmission image by using the axis core coordinate and the radius size in the geometric parameters, and calculate a radial distance field of each pixel point to the axis core based on the spatial range; Construct a radial weighting amplification function with exponential decay as the core, and generate a weighting amplification coefficient table based on the radial weighting amplification function; Iterate a first gray value of each pixel position in the second transmission image, and multiply the first gray value by a weighting coefficient of a corresponding radial position in the weighting amplification coefficient table to obtain a second gray value; Reorganize all the second gray values based on the radial distance field, maintain the same spatial structure as the second transmission image, and generate a third transmission image.
[0011] In combination with the first aspect, in a seventh implementation manner of the first aspect of the present application, the dividing the third transmission image into an edge detection region, an intermediate detection region and an axis core detection region and respectively performing pore identification to obtain pore distribution detection results comprises: Determine a radial boundary line using the radius size in the geometric parameters, and divide the third transmission image into three concentric annular regions based on the radial boundary line, the three concentric annular regions including an edge detection region, an intermediate detection region and an axis core detection region; Respectively perform pore identification in the edge detection region, the intermediate detection region and the axis core detection region to respectively obtain first pore detection data of the edge detection region, second pore detection data of the intermediate detection region and third pore detection data of the axis core detection region; Merge the first pore detection data, the second pore detection data and the third pore detection data and record radial coordinate information of each pore to generate a pore distribution detection result.
[0012] In combination with the first aspect, in an eighth implementation manner of the first aspect of the present application, the X-ray transmission detection method for internal pore defects of a solder material further comprises: Set a scanning interval distance in the length direction based on the total length size of the solder to be detected, and establish a plurality of cross-section scanning positions perpendicular to the axis of the solder along the axis core direction; Control the solder to be detected or the X-ray source to move step by step along the length direction by the scanning interval distance, and repeatedly perform X-ray transmission detection at each cross-section scanning position to respectively obtain a pore distribution detection result corresponding to each cross-section scanning position; Spatially register the pore distribution detection results of all cross-section scanning positions according to the length coordinate, establish three-dimensional position information of each detected pore in a three-dimensional coordinate system of the solder to be detected, and construct a three-dimensional pore distribution map of the solder to be detected based on the three-dimensional position information of all pores.
[0013] In a second aspect, the present application provides an X-ray transmission detection device for internal porosity defects of welding materials, comprising: An X-ray transmission scanning module for performing X-ray transmission scanning on a tin bar to be detected to obtain a first transmission image, and extracting geometric parameters based on the first transmission image; A radial thickness compensation module for constructing a radial thickness compensation coefficient matrix according to the geometric parameters, and performing pixel multiplication operation on the first transmission image and the radial thickness compensation coefficient matrix to obtain a second transmission image; A radial distance weighted amplification module for performing radial distance weighted amplification on an axial core region in the second transmission image to obtain a third transmission image; A porosity identification module for dividing the third transmission image into an edge detection region, an intermediate detection region and an axial core detection region and respectively performing porosity identification to obtain a porosity distribution detection result.
[0014] In the technical solution provided by the present application, by constructing a radial thickness compensation coefficient matrix and performing pixel-level multiplication operation, the thickness effect caused by the cylindrical tin bar geometric structure is effectively eliminated, the radial uniformization processing of transmission intensity is realized, the radial distance weighted amplification technology is adopted, the weak porosity signal of the axial core region is amplified by an exponential function, the technical bottleneck that the traditional method cannot detect deep buried porosity is broken through, and the porosity detection coverage from the surface to the axial core is realized. The cylindrical cross section is divided into three detection regions of edge, middle and axial core, and different detection thresholds and algorithm parameters are set respectively, which fully adapts to the signal feature difference of different radial positions and avoids the loss of detection accuracy caused by uniform processing. Through the segmentation scanning and spatial registration technology along the length direction, the technical leap from single cross section detection to complete tin bar detection is realized, a three-dimensional porosity distribution map is constructed, and comprehensive three-dimensional defect distribution information is provided. The geometric parameters of the tin bar are automatically extracted based on image gradient calculation and circle fitting algorithm, the radial coordinate transformation relationship is established, and the adaptive processing ability of the detection system for different size cylindrical tin bars is realized. BRIEF DESCRIPTION OF DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor based on these drawings.
[0016] Figure 1 It is a step schematic diagram of the X-ray transmission detection method for internal porosity defects of welding materials in the embodiments of the present application. Figure 2 Figure 1 is a structural schematic diagram of an X-ray transmission detection device for internal porosity defects of welding material in an embodiment of the present application. DETAILED DESCRIPTION
[0017] The embodiment of the present application provides an X-ray transmission detection method and device for internal porosity defects of welding material. The terms "first", "second", "third", "fourth" and the like (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be exchanged under appropriate circumstances, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" or "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0018] For the sake of understanding, the specific flow of the embodiment of the present application is described below. Please refer to Figure 1 One embodiment of the X-ray transmission detection method for internal porosity defects of welding material in the embodiment of the present application includes: Step S101, performing X-ray transmission scanning on the tin bar to be detected to obtain a first transmission image, and extracting geometric parameters based on the first transmission image; It can be understood that the execution subject of the present application can be an X-ray transmission detection device for internal porosity defects of welding material, and can also be a terminal or a server, and the specific place is not limited. The embodiment of the present application takes the server as the execution subject for example.
[0019] Specifically, the cylindrical tin bar to be detected is placed horizontally along the axial direction on a special X-ray detection table, ensuring that both ends are kept horizontal and fixed by an anti-rolling device to prevent position deviation during scanning. At the same time, the position of the tin bar is adjusted in real time using a matching laser positioning system to make the axial line coincide with the center line of the X-ray beam in space, forming a geometrically aligned tin bar entity model. According to the known linear attenuation coefficient of tin material and the diameter size of the tin bar, appropriate voltage parameters and exposure time parameters are set in the X-ray control system to make the X-ray beam have sufficient penetration ability in the vertical direction to cover the entire cylindrical cross section, while avoiding excessive penetration or image saturation caused by excessive energy, forming X-ray irradiation conditions that meet the physical absorption law. Under the X-ray irradiation conditions, the scanning program is started by the control system, the X-ray beam is emitted vertically from one side of the tin bar, and the transmitted signal strength is collected by the high-resolution flat panel detector on the opposite side after penetrating the tin bar cross-section structure. The collected X-ray transmission intensity data is converted to image gray scale information according to the specified sampling rate and spatial resolution through the signal acquisition module, and the mapping relationship between the image pixel coordinates and the tin bar spatial structure position is established. By reading the center symmetry of the gray scale distribution in the image, the pixel position of the tin bar axis is identified and recorded, and the first transmission image containing the structure center information is obtained. The edge detection algorithm is performed on the first transmission image, the gray scale gradient change law is analyzed, and the profile boundary of the tin bar is extracted. Based on the boundary points, the geometric parameters of the tin bar are calculated, including the cross-sectional radius, the spatial coordinates of the axial position, and the radial distance of any pixel point in the cross-section relative to the axial center, etc.
[0020] Step S102, constructing a radial thickness compensation coefficient matrix according to the geometric parameters, and performing pixel multiplication operation on the first transmission image and the radial thickness compensation coefficient matrix to obtain a second transmission image; Specifically, based on the geometric parameters of the tin strip, a radial coordinate transformation relationship from the image coordinate system to the physical space coordinate system is established, the radial distance of each pixel point in the first transmission image relative to the position of the tin strip axis is calculated one by one according to the radial coordinate transformation relationship, and a radial distance distribution map is generated according to the radial distance, which indicates the geometric orientation of each pixel point in the image in the cylindrical cross section. According to the radial characteristics of the cylindrical geometric structure, the X-ray path length corresponding to each radial distance is solved by using the mathematical function analysis method, and the penetration thickness distribution data of the rays at different radial positions are obtained, which represents the ray propagation path of each point in the image in the actual physical structure, showing a decreasing trend from the central region to the edge region, especially near the edge of the tin strip, the path thickness is significantly smaller. The linear attenuation coefficient of the tin material is combined with the above path thickness data to obtain the theoretical transmission intensity attenuation value of the X-rays at different radial positions, and it is organized into a continuous mathematical mapping model, that is, a transmission attenuation model, to simulate the gray change effect caused by the thickness change in the tin strip. The set incident X-ray intensity value and the transmission attenuation model are point by point ratio operation according to the image pixel level, to generate a radial thickness compensation coefficient matrix consistent with the size of the first transmission image, each element in the matrix corresponds to a pixel point, representing the correction factor in the compensation process. The first transmission image and the radial thickness compensation coefficient matrix are multiplied by the pixel, and the second transmission image is constructed.
[0021] Step S103, performing radial distance weighted amplification on the axis core region in the second transmission image to obtain a third transmission image; Specifically, based on the tin bar axis core coordinates in the geometric parameters and the corresponding cross-sectional radius size, the spatial boundary range of the axis core region is calibrated in the pixel coordinate system of the second transmission image, and a radial distance field in pixel units is established according to the region boundary, that is, the Euclidean radial distance of each pixel point in the image to the axis core position is calculated, and all distance values are recorded in the form of a matrix to form a radial position field that can be mapped to the entire image. On the basis of the known radial distance r and the tin bar radius R, a radial weighting amplification function with an exponential decay form as the core is constructed, so that the pixels closer to the axis core have larger amplification multiples, and the pixels closer to the edge position gradually weaken the weighting value, thereby avoiding unnecessary noise enhancement to the edge region. Discretely sample the radial weighting amplification function in the entire normalized radial distance range to obtain a weighting amplification coefficient table, and index match according to the actual pixel corresponding radial distance. Traverse the position of each pixel point in the second transmission image, read the original gray value of the pixel position as the first gray value, find the corresponding amplification coefficient from the weighting amplification coefficient table according to the distance value corresponding to the pixel position in the radial distance field, multiply the first gray value and the amplification coefficient to obtain the second gray value after amplification processing. Based on the entire radial distance field, all second gray values are rearranged and combined according to the original spatial coordinate position in the second transmission image to maintain the spatial consistency of the image structure, and a third transmission image is formed.
[0022] Step S104, dividing the third transmission image into an edge detection region, an intermediate detection region and an axis core detection region and respectively performing pore identification to obtain a pore distribution detection result.
[0023] Specifically, the radius size information of the tin strip cross-section extracted from the geometric parameters is used to determine two concentric radial boundary lines according to a preset radial proportion relationship, thereby dividing the entire third transmission image into three concentric annular regions with clear geometric boundaries in the radial direction, which are defined as an edge detection region (located in the outermost layer, with a radius interval of 0.8R to R), a middle detection region (with a radius interval of 0.4R to 0.8R), and an axial center detection region (with a radius less than 0.4R), ensuring that each region has a non-overlapping and continuous coverage range in structure. According to the radial distance of each pixel in the image to the axial center, the pixel is attributed to one of the above three regions, and the pixel is processed in different regions. In the three divided annular regions, customized image processing algorithms are respectively executed to perform pore recognition operations. In the edge detection region, due to the small X-ray penetration thickness, high signal contrast, and edge blur effect, a method combining gray threshold enhancement and edge gradient operator is used for fine detection to ensure accurate positioning of the boundary profile of the pore; in the middle detection region, due to the strong signal stability, a standard second-order Laplacian edge operator is used to extract the gray scale mutation feature to identify the pore signals of regular depth and size; and in the axial center detection region, due to the weak signal and relatively high background noise, a multi-scale Gaussian filter combined with region connectivity analysis algorithm is used for depth feature extraction to improve the recognition ability of the buried deep small pores. Each region generates corresponding pore detection data, including first pore detection data of the edge detection region, second pore detection data of the middle detection region, and third pore detection data of the axial center detection region, and the pore position, size, and gray scale feature in each group of data are bound to the corresponding radial region. The above three types of pore detection data are unified and merged, and the radial coordinate position of the pores in the tin strip cross-section structure is inversely calculated according to the corresponding pixel coordinates of the pores in the image, to form a pore distribution data set with spatial layering information, and output the pore distribution detection result.
[0024] In a specific embodiment, the process of step S101 can specifically include the following steps: Place the tin strip to be detected horizontally along the axial direction on the detection table between the X-ray source and the flat panel detector, determine the coincidence position of the tin strip axial center and the X-ray beam center through the laser positioning system, and obtain the geometrically aligned tin strip to be detected; According to the linear attenuation coefficient of the tin material and the diameter size of the tin strip to be detected, set the voltage parameter and exposure time parameter of the X-ray tube, so that the X-ray beam vertically penetrates the entire cross-sectional area of the tin strip to be detected, and obtain the X-ray irradiation condition; Start the scanning program under the X-ray irradiation condition, and the X-ray beam enters from one side of the tin strip to be detected and reaches the flat panel detector on the opposite side, to obtain the transmission intensity data; The transmission intensity data is converted into pixel gray value and a mapping relationship between pixel coordinates and spatial positions is established, and the coordinate position of the tin strip axis in the image is recorded to obtain a first transmission image; The profile boundary information of the tin strip to be detected is extracted based on the first transmission image, and the geometric parameters are calculated based on the profile boundary information.
[0025] Specifically, the tin bar to be detected is placed horizontally on the detection platform along the axial direction, and it is ensured that the detection platform is located at the vertical central axis position between the X-ray source and the flat panel detector. The tin bar is guided and adjusted in real time by a high-precision laser positioning system, so that the geometric axis of the tin bar is aligned with the main propagation axis of the X-ray beam, forming a geometric alignment state in which the axis and the beam center coincide, ensuring that the cross section of the tin bar maintains a vertical relationship with the X-ray direction during the imaging projection process, and avoiding image distortion or path errors caused by inclination or eccentricity. According to the physical absorption characteristics of the tin material itself, appropriate X-ray tube parameters are set. The linear attenuation coefficient of the tin material is a key physical parameter that affects the transmission signal strength. The linear attenuation coefficient is related to the incident ray energy, and the penetration ability of the X-ray is controlled by the accelerating voltage of the X-ray tube. Therefore, according to the cross section diameter size of the tin bar and the known attenuation coefficient, a voltage parameter range is selected which can ensure that the entire cross section is penetrated and the image is not saturated. The voltage setting should make the remaining signal after penetrating the tin material reasonably distributed within the dynamic range of the flat panel detector. At the same time, in order to avoid the decline of image signal-to-noise ratio caused by insufficient exposure time, appropriate exposure time parameters are set according to the thickness of the target area. The voltage parameters and exposure time parameters of the X-ray tube jointly define the X-ray irradiation conditions of this detection. Under the X-ray irradiation conditions, the X-ray scanning program is started, so that the high-energy rays are vertically incident from one side of the tin bar, penetrate to the other side after passing through the material inside, and are received by the high-resolution flat panel detector arranged below the detection table. The flat panel detector receives the remaining transmission intensity after the material absorption at different positions in a matrix pixel array, forming a two-dimensional gray scale distribution data. The receiving system converts the transmission intensity signal into digitized pixel gray value, and establishes the mapping relationship between each image pixel and the real physical space coordinates according to the spatial sampling accuracy and geometric arrangement parameters of the detector itself, that is, the geometric coordinate conversion model between the image and the physical world is established. At the same time, in the image matrix, the pixel coordinate position corresponding to the axis of the tin bar is marked to obtain the first transmission image. The first transmission image is subjected to structure contour extraction operation. By using edge detection algorithms such as Canny operator, Sobel operator or gray scale gradient threshold analysis method, the outer contour boundary of the tin bar in the image is identified from the gray scale distribution, and the contour closing processing is carried out at the pixel level to ensure the continuity and integrity of the boundary data. Based on the contour boundary information, the geometric parameters of the tin bar cross section are calculated by geometric fitting method, including the radius R of the cross section circle and the center position (i.e. the axis coordinate), and the information is converted into a key parameter set for the connection between the image model and the physical model.
[0026] In a specific embodiment, the process of performing steps based on the first transmission image to extract the contour boundary information of the tin bar to be detected and calculating the geometric parameters based on the contour boundary information can specifically include the following steps: Calculate the pixel gradient amplitude and direction angle of the first transmission image, and extract the profile boundary information of the tin bar to be detected based on the pixel gradient amplitude and direction angle; Generate a boundary pixel point coordinate sequence based on the profile boundary information; Jointly solve the center and radius of the boundary pixel point coordinate sequence to obtain the center coordinates and radius size; Establish a radial coordinate transformation relationship with the center coordinates as the origin of the new coordinate system, take the radius size as the reference parameter for radial distance calculation, store the transformation matrix of the pixel coordinates to the radial coordinates, and obtain the geometric parameters.
[0027] Specifically, the gray level change in the first transmission image is analyzed at the pixel level. Gradient amplitude and direction angle are calculated for the first transmission image using image gradient analysis method. The first derivative of the gray value of each pixel in the image coordinate system is calculated along the horizontal and vertical directions to obtain the horizontal and vertical gradient components. The Euclidean norm of the two direction gradients is calculated by the amplitude formula to obtain the gradient amplitude of the pixel. The gradient direction angle of the pixel is calculated using the arctangent function to reflect the spatial direction of the most severe gray change. After calculating the gradient amplitude and direction angle, the high gradient pixel set with continuity and edge properties is selected based on the amplitude threshold and gradient direction consistency principle to construct the profile boundary information image of the tin bar to be detected. The profile boundary information image is subjected to connection region screening, isolated point removal and boundary closing processing to ensure that the extracted boundary has complete closed curve characteristics. The position coordinates of all identified boundary pixels are extracted to obtain a two-dimensional coordinate sequence containing boundary pixel points, which describes the discrete boundary point distribution of the tin bar cross-section edge in the image space at pixel level accuracy. The least squares fitting operation is performed on the boundary pixel point coordinate sequence to jointly solve the best matching parameters of the circular structure. In the mathematical modeling process, the residual objective function is constructed in the form of the standard equation of a circle, the center coordinates (x0, y0) and the radius R are taken as the variables to be solved, the radial residual sum of squares between all boundary pixels and the fitted circle is calculated, and the residual value is minimized by the optimization algorithm to obtain the globally optimal center position and radius size of the circular boundary. The local coordinate system of the image is redefined with the center coordinates as the origin, the radial polar coordinate transformation relationship from the original image pixel coordinate system to the radial polar coordinate system with the center as the origin is established, the position of any pixel in the image is expressed as the radial distance r relative to the center, and r is normalized relative to the fitted radius R to construct the normalized radial position field. At the same time, the Cartesian coordinate positions of all pixel points are mapped to the corresponding radial distances, and the mapping relationship is stored in matrix form to form the transformation matrix of the pixel coordinates to the radial coordinates. Each element of the matrix records the distance data of the corresponding pixel in the radial space. The center coordinates, radius size and pixel radial distance matrix are combined to form a set of geometric parameters.
[0028] In a specific embodiment, the process of performing step S102 can specifically include the following steps: The radial distance from each pixel point in the first transmission image to the axis of the tin strip is calculated one by one using the radial coordinate transformation relationship in the geometric parameters, and a radial distance distribution map is established based on the radial distance; According to each radial distance in the radial distance distribution map, the ray penetration thickness distribution data corresponding to the radial position is solved; According to the linear attenuation coefficient of the tin strip to be detected and the ray penetration thickness distribution data, the theoretical transmission intensity attenuation value of X-ray at different radial positions is calculated, and a transmission attenuation model is established based on the theoretical transmission intensity attenuation value; The incident X-ray intensity is pixel by pixel ratio operation with the transmission attenuation model, and a radial thickness compensation coefficient matrix is generated; The first transmission image is pixel multiplication operation with the radial thickness compensation coefficient matrix, and the second transmission image is obtained.
[0029] Specifically, based on the geometric parameters, especially the center coordinates and the fitting radius size, a radial coordinate transformation relationship is constructed. The radial coordinate transformation relationship takes the center as the origin of the polar coordinate system, calculates the Euclidean distance of each pixel point in the image to the center position by performing geometric mapping, and obtains the real radial position of the pixel point in the image. The above process is pixel by pixel in the whole image dimension, and the radial distance value of each pixel is stored in the form of a matrix to form a radial distance distribution map, which maps the relative spatial distribution in the whole tin strip cross section in the unit of image pixels. Using the geometric characteristics of the cylinder, based on the relationship between each radial position r in the radial distance distribution map and the cylinder radius R, the path length of the X-ray vertically penetrating the tin strip at the corresponding position is calculated. Since the tin strip is a symmetrical cylindrical structure, and the X-ray is vertically penetrating, the penetration thickness is directly solved as a function of r according to the geometric formula, and the path thickness is the largest at the axis and gradually decreases to zero near the edge. For each position r value in the radial distance distribution map, the theoretical ray penetration path thickness can be mapped and obtained, and all the path thickness data are organized as a two-dimensional matrix to keep consistent with the image pixel structure, forming a thickness distribution map representing the corresponding ray thickness of each pixel position in the whole image. Under the premise of knowing the linear attenuation coefficient μ of the tin strip material, the path thickness map is input as a variable, and the energy attenuation behavior of the X-ray is modeled combining with the Lambert-Beer law. When the ray penetrates different thicknesses, its energy attenuates in an exponential function form, so by calculating each thickness value, the theoretical transmission intensity value of the X-ray at different radial positions is obtained. Thus, a theoretical transmission attenuation model is established, which describes the X-ray intensity attenuation law at different positions of the tin strip in pixel granularity, and can reflect the cause of the gray difference caused by thickness difference in the actual image. The preset incident X-ray intensity I0 is input as a constant, and the pixel dimension is calculated by point by point ratio operation with the transmission attenuation model to obtain the reciprocal of the ratio of the theoretical intensity of each pixel to the incident intensity, and a radial thickness compensation coefficient matrix is constructed. The radial thickness compensation coefficient matrix represents the multiple of the gray attenuation caused by the path thickness difference in the current image in the physical sense, and its numerical distribution characteristics are: the compensation coefficient near the axis is the largest, the compensation coefficient near the edge tends to 1, which conforms to the physical logic that no compensation is needed when the penetration path is short and the path needs to be enhanced when the path is long. The first transmission image and the radial thickness compensation coefficient matrix are multiplied by point by point at the pixel level to realize the spatial correction processing of the image gray value. The original gray value of each pixel point is multiplied by the corresponding compensation coefficient to form a new gray output, and the second transmission image is obtained.
[0030] In a specific embodiment, the execution step calculates the theoretical transmission intensity attenuation value of X-rays at different radial positions according to the linear attenuation coefficient of the tin bar to be detected and the ray penetration thickness distribution data, and the process of establishing the transmission attenuation model based on the theoretical transmission intensity attenuation value can specifically include the following steps: extracting the incident X-ray intensity in the X-ray irradiation condition, and combining the incident X-ray intensity with the linear attenuation coefficient of the tin material to form the calculation parameters of the Lambert-Beer law; performing exponential attenuation operation on the ray penetration thickness distribution data using the calculation parameters, and calculating the theoretical transmission intensity attenuation value corresponding to each radial position on the cylindrical cross section through the Lambert-Beer law attenuation formula; checking whether the theoretical transmission intensity attenuation value satisfies the cylindrical geometric constraint condition, and if so, establishing the transmission attenuation model between the radial distance and the theoretical transmission intensity attenuation value.
[0031] Specifically, the incident X-ray intensity corresponding to the current detection process is extracted from the X-ray irradiation system, which represents the maximum signal value of the X-ray source emission and the flat panel detector reception under the condition of no object obstruction, obtained by system calibration or empty field acquisition experiment, and is expressed as a reference intensity value I0. At the same time, the linear attenuation coefficient μ of the tin material under the current ray spectrum condition is retrieved, which reflects the absorption ability of the tin material to X-ray energy, and is a inherent physical constant determined by factors such as atomic number, density and ray wavelength of tin. By combining the incident X-ray intensity I0 and the linear attenuation coefficient μ, a complete set of physical calculation parameters is formed, that is, the extraction and assembly of the basic quantities of the Lambert-Beer law are completed. The calculation parameters are applied to the ray penetration thickness distribution data. The ray penetration thickness data is derived from the function mapping of the radial distance r of the cylindrical tin bar to the axis in the two-dimensional transmission image, that is, the ray path thickness L(r) corresponding to the pixel point is calculated according to the geometric model, and a thickness matrix is formed in the entire image space. According to the exponential attenuation formula I(x, y) = I0 × e^(-μ × L(r)) of the Lambert-Beer law, the above thickness matrix is operated point by point, the path thickness value of each pixel point is substituted into the exponential function, and the transmission intensity value I(x, y) of each pixel point is calculated by combining the attenuation coefficient μ of the material and the constant incident intensity I0. The calculation precision is preserved during the operation process to ensure that the exponential result does not overflow or approximate distortion, thereby generating a theoretical transmission intensity image, which reflects the X-ray intensity distribution state that should be received by the detector at each radial position under the condition that the tin bar structure is completely ideal and the ray system has no noise interference in the physical sense. The theoretical transmission intensity image is subjected to geometric consistency test. The monotonicity of the theoretical intensity value at each radial position with respect to the radial distance r is analyzed. If the intensity I(r) strictly increases monotonously with the increase of r, and the edge position tends to I0 and the axis position is the minimum, it is indicated that the distribution conforms to the physical behavior of the cylindrical symmetric structure under the vertical X-ray irradiation, that is, the longer the penetration path near the axis, the greater the attenuation, and the lower the transmission intensity. The penetration path near the edge tends to zero, the attenuation effect disappears, and the transmission intensity approaches I0. If some radial positions are found to have abnormal fluctuations in transmission intensity, it indicates that the thickness modeling has deviation or the attenuation coefficient is not accurately matched with the actual material. At this time, the abnormal area is re-estimated to ensure that the transmission intensity distribution trend of the entire model in the radial direction is consistent with the geometric structure. When it is confirmed that the theoretical transmission intensity image meets the above geometric consistency conditions, the function mapping relationship between the radial distance r and the theoretical transmission intensity attenuation value is constructed by taking the radial distance r as the independent variable and the theoretical transmission intensity I(r) as the dependent variable, and the transmission attenuation model is formed.
[0032] In a specific embodiment, the process of performing pixel multiplication operation between the first transmission image and the radial thickness compensation coefficient matrix to obtain the second transmission image can specifically include the following steps: constructing a spatial correspondence between each pixel position in the first transmission image and a corresponding compensation coefficient in the radial thickness compensation coefficient matrix; scanning the first transmission image row by row and column by column, extracting a pixel gray value of a current pixel position, and synchronously reading a compensation coefficient of a same coordinate position in the radial thickness compensation coefficient matrix; multiplying the pixel gray value of the current pixel position by the corresponding compensation coefficient to obtain a target gray value; rearranging all the target gray values into a same matrix structure as the first transmission image to form a second transmission image.
[0033] Specifically, a spatial correspondence between each pixel position in the first transmission image and a corresponding compensation coefficient in the radial thickness compensation coefficient matrix is constructed. Since the first transmission image and the radial thickness compensation coefficient matrix are both two-dimensional matrices constructed in units of pixels, and their sizes, resolutions, and spatial distributions remain completely consistent, a one-to-one correspondence is directly realized based on the row and column numbers of each pixel point in the image coordinate system. In the memory, the two are loaded as two-dimensional array or matrix objects, and the subscript is synchronously bound on the basis of the image dimension to construct a spatial coupling mapping relationship from the original image gray domain to the compensation coefficient domain. A pixel-by-pixel compensation operation is performed on the entire first transmission image. The image is scanned row by row and column by column in the order of matrix row priority. When scanning each pixel position in each row, the original gray value of the pixel position is read as the signal input of the current pixel to be processed, and at the same time, the compensation coefficient value of the same coordinate position in the compensation coefficient matrix is extracted according to the position coordinates of the pixel, representing the multiple factor of the pixel position that should be corrected in the opposite direction under the influence of thickness variation. The gray value and the compensation coefficient are subjected to numerical multiplication operation to obtain the target gray value of the pixel position. After the entire image scanning is completed, all the target gray values calculated at the pixel positions are rearranged according to the original coordinates to restore a two-dimensional gray image matrix having the same dimensions and structure as the first transmission image, which constitutes the second transmission image.
[0034] The method further comprises the following steps before the step of radially distance-weighted magnifying the axial core region in the second transmission image to obtain the third transmission image: constructing a radial self-adaptive signal magnifying algorithm; calculating a normalized radial distance value of each pixel in the second transmission image based on the radius size in the geometric parameters, obtaining a radial distance ratio in the range of 0 to 1 by dividing the actual distance from the pixel to the axial core by the radius of the tin strip, and establishing a normalized radial distance field covering the entire cylindrical section; setting the maximum magnifying coefficient a of the axial core region and the radial attenuation factor β as the core parameters of the algorithm, wherein the value range of the maximum magnifying coefficient a is 2.0 to 5.0 for controlling the signal enhancement intensity of the axial core position, and the value range of the radial attenuation factor β is -1.5 to -0.5 for controlling the attenuation rate of the magnifying intensity with the radial distance; constructing an exponential attenuation type radial magnifying function; performing cylindrical geometry constraint verification on the exponential attenuation type radial magnifying function to ensure that the magnifying coefficient of the axial core region is greater than that of the middle region, the magnifying coefficient of the middle region is greater than that of the edge region, and the minimum magnifying coefficient of the edge region is not less than 1.0 to avoid excessive signal attenuation, thereby generating a radial self-adaptive magnifying coefficient distribution corrected by geometry constraint.
[0035] In an embodiment, the process of performing step S103 can specifically include the following steps: labeling the spatial range of the axial core region on the second transmission image by using the axial core coordinates and the radius size in the geometric parameters, and calculating the radial distance field of each pixel to the axial core based on the spatial range; constructing a radial weighted magnifying function with exponential attenuation as the core, and generating a weighted magnifying coefficient table based on the radial weighted magnifying function; traversing the first gray value of each pixel position in the second transmission image, and multiplying the first gray value by the weighted coefficient of the corresponding radial position in the weighted magnifying coefficient table to obtain a second gray value; reorganizing all the second gray values based on the radial distance field to maintain the same spatial structure as the second transmission image, and generating a third transmission image.
[0036] Specifically, the space region related to the axis in the second transmission image is calibrated by using the axis coordinate and the cross-sectional radius size in the geometric parameters. Based on the image coordinate system, the fitted axis coordinate position is taken as the origin of the polar coordinate system, and by using the symmetry of the circular structure, a complete region covering the cross section of the tin strip is demarcated on the image by taking the radius as the limit. Inside the region, a radial distance field in pixel units is constructed by calculating the Euclidean distance of each pixel point relative to the position of the center. The radial distance field is a two-dimensional matrix consistent with the structure of the original image, in which each element records the spatial radial distance value of the corresponding pixel to the axis. According to the symmetrical decay characteristics of the cylindrical structure, a weighted amplification function with exponential decay as the core is designed. The weighted amplification function takes the normalized radial distance r / R as the independent variable, where r is the actual distance of the current pixel point to the axis, and R is the radius of the entire tin strip cross section, forming a monotonically decreasing function that takes the maximum value at r = 0 and tends to the minimum value at r = R. The function form is selected as an exponential structure A(r) = α × e^(β × (r / R)), where α is the basic amplification multiple, and β is the negative decay factor, adjusting the decreasing rate of the amplification strength in the radial direction. By discretely sampling the function in the interval r ∈ [0, R], a weighted amplification coefficient table is generated, which is indexed according to different r / R values. A pixel-by-pixel traversal operation is performed on the entire second transmission image, the first gray value of each pixel position is read in turn, and the corresponding radial distance value is also looked up, and through the generated weighted amplification coefficient table, the weighted factor corresponding to the radial distance is matched. The first gray value is multiplied by the weighted coefficient to calculate the second gray value of the pixel point, which is the signal response value after radial weighted amplification. Based on the radial distance field, all second gray values are reorganized, and the second gray values are reorganized into a new two-dimensional matrix according to the coordinate structure of the original image. The matrix is completely consistent with the original second transmission image in spatial arrangement, ensuring that the geometric consistency and physical continuity of the image are not destroyed, while the pixel gray values have undergone position-related nonlinear enhancement changes, forming a third transmission image.
[0037] In a specific embodiment, the process of performing step S104 can specifically include the following steps: Using the radius size in the geometric parameters to determine the radial dividing line, and dividing the third transmission image into three concentric annular regions based on the radial dividing line, the three concentric annular regions including an edge detection region, an intermediate detection region, and an axis detection region; Performing pore identification in the edge detection region, the intermediate detection region, and the axis detection region, respectively, to obtain first pore detection data of the edge detection region, second pore detection data of the intermediate detection region, and third pore detection data of the axis detection region, respectively; Merge the first pore detection data, the second pore detection data, the third pore detection data, and record the radial coordinate information of each pore to generate a pore distribution detection result.
[0038] Specifically, according to the radius size of the tin bar cross section obtained in the geometric parameters, three radial boundary lines with physical meaning are set to realize the hierarchical division of the internal structure of the image in space. The circular region in the entire image with the center as the center and the fitted radius as the maximum radial reference is proportionally divided according to the percentage distribution of the radial distance. The 0 to 0.4 times the radius is the axis detection area, the 0.4 to 0.8 times the radius is the middle detection area, and the 0.8 to 1.0 times the radius is the edge detection area. The three boundary lines divide the third transmission image into three non-overlapping and concentric annular regions, each of which has different signal characteristics and structural background. According to the radial distance field, each pixel point in the third transmission image is judged for region attribution, and whether the radial distance of each pixel is located in a certain interval is checked one by one, so that each pixel is divided into the detection sub-region to which it belongs. For each detection region, the corresponding image characteristics are used to perform the specific pore recognition algorithm. In the edge detection area, since the X-ray penetration path in the edge detection area is the shortest, the image signal intensity is the strongest, and the gray scale contrast is the highest, it is suitable to use the edge enhancement detection algorithm based on gray difference and gradient analysis. The Canny edge operator or the improved gradient enhancement filter is used in combination with a fixed or adaptive gray threshold strategy to identify the pore boundary, realize the extraction of the pore shape profile, and generate the first pore detection data of the edge detection area. In the middle detection area, since the signal intensity is moderate and the background structure is stable, the Laplace enhancement or median filtering combined with local extreme value analysis is used to identify the circular or elliptical low gray area, the pore feature area is extracted through morphological operation, and the target is confirmed through connected domain analysis to obtain the second pore detection data of the middle detection area. In the axis detection area, since the signal is amplified by weighting, but the pore size is small and the signal-to-noise ratio is still relatively low, a multi-scale Gaussian filter combined with a polar coordinate template matching detection method is introduced to identify weak circular or spot type low gray areas, while excluding random noise interference, extracting the pore boundary and center coordinates, and forming the third pore detection data of the axis detection area. The pore detection data extracted from the three regions is respectively structured, including the position coordinates, gray statistical characteristics, area or contour size of each pore, and the radial partition label it is in. In the merging process, the corresponding radial coordinate information of each pore in the image is recorded, that is, the radial distance field is queried based on the pixel position, the r value is extracted, and the r value is normalized to the proportional expression relative to the radius R to form a structured data field. After integrating all the pore data, a unified data set is generated to constitute the pore distribution detection result.
[0039] In a specific embodiment, the X-ray transmission detection method for detecting internal porosity defects of welding material further comprises the following steps: Based on the total length of the tin bar to be detected, the scanning interval distance in the length direction is set, and a plurality of cross-section scanning positions perpendicular to the axis of the tin bar are established along the axial direction; The tin bar to be detected or the X-ray source is controlled to move step by step along the length direction at the scanning interval distance, and the X-ray transmission detection is repeatedly performed at each cross-section scanning position to obtain the porosity distribution detection results corresponding to each cross-section scanning position respectively; The porosity distribution detection results of all cross-section scanning positions are spatially registered according to the length coordinates, the three-dimensional position information of each detected porosity in the three-dimensional coordinate system of the tin bar to be detected is established, and the three-dimensional porosity distribution map of the tin bar to be detected is constructed based on the three-dimensional position information of all porosities.
[0040] Specifically, based on the total length of the tin bar to be detected, the scanning strategy in the length direction is set. Considering that the X-ray transmission image essentially reflects two-dimensional cross-section information, and the defects of the tin bar have spatial extension along the axial direction, the three-dimensional structure is reconstructed by multi-cross-section data superposition and position registration. According to the total length L of the tin bar and the spatial resolution requirement of the system, the scanning interval distance is set so that a sufficient number of scanning layers can be divided in the entire length range. Each interval position z k (k∈1…N) corresponds to a cross-section scanning layer, the cross-section scanning layer is perpendicular to the axial direction of the tin bar, and the scanning path with continuity and overlap accuracy is formed on the entire length of the tin bar. In the actual detection operation, the motion mechanism is controlled to drive the tin bar or the X-ray source system to move step by step along the length direction at the set interval distance. At each predetermined cross-section scanning position z k , an X-ray transmission detection process is started, including tin bar position alignment, ray parameter setting, transmission signal acquisition, image generation, thickness compensation, signal amplification, and radial layering identification, etc. standard process, the two-dimensional porosity distribution detection result under the cross-section is obtained, including the two-dimensional position coordinates, gray response, size characteristics and radial distribution information in polar coordinates of each detected porosity in the cross-section plane. After the detection of all predetermined scanning positions z n , a series of axial distribution cross-section detection results are obtained, covering the defect distribution of the tin bar in the length direction, and retaining the independent structure information and spatial reference of each cross-section layer. Spatial registration operation is performed on all cross-section detection results based on the length coordinates. Since each cross-section corresponds to a specific scanning position z k , the original image plane coordinates (x i ,y i ) of the porosities identified in each cross-section image can be obtained by combining z kThe values are directly converted into complete coordinate representations (x i ,y i ,z k ) in three-dimensional space. On this basis, the data of all identified pores in the cross sections are uniformly projected into the three-dimensional coordinate system defined by the tin strip structure, and the natural extension and spatial embedding from two-dimensional structure to three-dimensional structure are realized through continuous coordinate superposition, and a three-dimensional position information database of pores is established. Based on all the three-dimensional position information of pores contained in the three-dimensional position information database of pores, a three-dimensional distribution map of the internal pores of the tin strip to be detected is constructed according to the spatial coordinate organization, defect density clustering, radial distribution projection and other strategies.
[0041] The X-ray transmission detection method for internal pore defects of the welding material in the embodiment of the application is described above, and the X-ray transmission detection device for internal pore defects of the welding material in the embodiment of the application is described below. Please refer to Figure 2 , an embodiment of the X-ray transmission detection device for internal pore defects of the welding material in the embodiment of the application includes: An X-ray transmission scanning module 201 is configured to perform X-ray transmission scanning on the tin strip to be detected to obtain a first transmission image, and extract geometric parameters based on the first transmission image; A radial thickness compensation module 202 is configured to construct a radial thickness compensation coefficient matrix according to the geometric parameters, and perform pixel multiplication operation on the first transmission image and the radial thickness compensation coefficient matrix to obtain a second transmission image; A radial distance weighted amplification module 203 is configured to perform radial distance weighted amplification on the axial core region in the second transmission image to obtain a third transmission image; A pore identification module 204 is configured to divide the third transmission image into an edge detection region, an intermediate detection region and an axial core detection region, and perform pore identification on the regions respectively to obtain a pore distribution detection result.
[0042] Through the cooperation of the above-mentioned components, through the construction of the radial thickness compensation coefficient matrix and the pixel-level multiplication operation, the thickness effect caused by the cylindrical tin bar geometry is effectively eliminated, and the radial uniformization processing of the transmission intensity is realized. The radial distance weighted amplification technology is specially used for amplifying the weak pore signal in the axial core area by an exponential function, which breaks through the technical bottleneck that the traditional method cannot detect deep buried pores, and realizes the pore detection coverage from the surface to the whole radial range. The cylindrical cross section is divided into three detection areas of edge, middle and axis, and different detection parameters are set respectively to fully adapt to the signal feature difference at different radial positions. Through the segmented scanning and spatial registration technology along the length direction, the transition from single cross section detection to complete tin bar detection is realized, and the three-dimensional defect information is provided by constructing the three-dimensional pore distribution map. The transmission attenuation model based on Lambert-Beer law ensures the physical accuracy of thickness compensation, and combined with the adaptive geometric parameter extraction technology, a reliable pore defect detection solution is provided for cylindrical tin bars of different sizes.
[0043] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, system and unit can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0044] The integrated unit, if realized in the form of a software function unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (read-only memory, ROM), a random access memory (random access memory, RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0045] The above-described embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An X-ray transmission method for detecting internal porosity defects in welding materials, characterized in that, include: X-ray transmission scanning is performed on the solder bar to be tested to obtain a first transmission image, and geometric parameters are extracted based on the first transmission image; A radial thickness compensation coefficient matrix is constructed based on the geometric parameters, and a pixel multiplication operation is performed between the first transmission image and the radial thickness compensation coefficient matrix to obtain a second transmission image. The axial region in the second transmission image is then magnified radially by weighted distance to obtain the third transmission image; The third transmission image is divided into an edge detection region, a middle detection region, and an axis detection region, and pores are identified in each region to obtain the pore distribution detection result.
2. The X-ray transmission detection method for internal porosity defects in welding materials according to claim 1, characterized in that, The process involves performing X-ray transmission scanning on the solder bar to be inspected to obtain a first transmission image, and extracting geometric parameters based on the first transmission image, including: The solder bar to be tested is placed horizontally along the axial direction on the testing stage between the X-ray source and the flat panel detector. The coincidence position of the solder bar axis and the X-ray beam center is determined by the laser positioning system to obtain the geometrically aligned solder bar to be tested. The voltage and exposure time parameters of the X-ray tube are set according to the linear attenuation coefficient of the tin material and the diameter of the tin bar to be tested, so that the X-ray beam penetrates the entire cross-sectional area of the tin bar to be tested perpendicularly to obtain the X-ray irradiation conditions. Under the X-ray irradiation conditions, the scanning procedure is started. The X-ray beam enters from one side of the tin bar to be detected and passes through the flat plate detector on the opposite side to obtain transmission intensity data. The transmission intensity data is converted into pixel grayscale values and a mapping relationship between pixel coordinates and spatial positions is established. At the same time, the coordinate position of the tin bar axis in the image is recorded to obtain the first transmission image. The contour boundary information of the tin bar to be detected is extracted based on the first transmission image, and the geometric parameters are calculated based on the contour boundary information.
3. The X-ray transmission detection method for internal porosity defects in welding materials according to claim 2, characterized in that, The step of extracting the contour boundary information of the tin bar to be detected based on the first transmission image, and calculating geometric parameters based on the contour boundary information, includes: Calculate the pixel gradient magnitude and orientation angle of the first transmission image, and extract the contour boundary information of the tin bar to be detected based on the pixel gradient magnitude and orientation angle; Generate a sequence of boundary pixel coordinates based on the contour boundary information; The center and radius of the circle are jointly solved by the coordinate sequence of the boundary pixel points to obtain the center coordinates and radius dimensions; A radial coordinate transformation relationship is established with the center coordinates of the circle as the origin of the new coordinate system. The radius dimension is used as the reference parameter for calculating the radial distance. At the same time, the transformation matrix from pixel coordinates to radial coordinates is stored to obtain the geometric parameters.
4. The X-ray transmission detection method for internal porosity defects in welding materials according to claim 1, characterized in that, The step of constructing a radial thickness compensation coefficient matrix based on the geometric parameters and performing pixel multiplication on the first transmission image and the radial thickness compensation coefficient matrix to obtain a second transmission image includes: The radial distance from each pixel in the first transmission image to the axis of the tin bar is calculated one by one using the radial coordinate transformation relationship in the geometric parameters, and a radial distance distribution map is established based on the radial distance. Based on each radial distance in the radial distance distribution map, calculate the ray penetration thickness distribution data corresponding to the radial position; The theoretical transmission intensity attenuation value of X-rays at different radial positions is calculated based on the linear attenuation coefficient of the solder bar to be tested and the X-ray penetration thickness distribution data, and a transmission attenuation model is established based on the theoretical transmission intensity attenuation value. The incident X-ray intensity is compared with the transmission attenuation model pixel by pixel to generate a radial thickness compensation coefficient matrix. The first transmission image is multiplied by the radial thickness compensation coefficient matrix using pixel multiplication to obtain the second transmission image.
5. The X-ray transmission detection method for internal porosity defects in welding materials according to claim 4, characterized in that, The step of calculating the theoretical transmission intensity attenuation value of X-rays at different radial positions based on the linear attenuation coefficient of the tin bar to be tested and the X-ray penetration thickness distribution data, and establishing a transmission attenuation model based on the theoretical transmission intensity attenuation value, includes: The intensity of incident X-rays under X-ray irradiation conditions is extracted, and the intensity of incident X-rays is combined with the linear attenuation coefficient of tin material to form the calculation parameters of Lambert-Beer law; The calculation parameters are used to perform an exponential attenuation operation on the ray penetration thickness distribution data, and the theoretical transmission intensity attenuation value corresponding to each radial position on the cylindrical section is calculated by the Lambert-Beer constant attenuation formula. Check whether the theoretical transmission intensity attenuation value satisfies the cylindrical geometric constraint condition. If it does, construct a transmission attenuation model between the radial distance and the theoretical transmission intensity attenuation value.
6. The X-ray transmission detection method for internal porosity defects in welding materials according to claim 5, characterized in that, The step of performing pixel multiplication on the first transmission image and the radial thickness compensation coefficient matrix to obtain the second transmission image includes: Construct a spatial correspondence between each pixel position in the first transmission image and the corresponding compensation coefficient in the radial thickness compensation coefficient matrix; The first transmission image is scanned row by row and column by column to extract the pixel gray value at the current pixel position, and the compensation coefficient at the same coordinate position in the radial thickness compensation coefficient matrix is read simultaneously. Multiply the pixel grayscale value at the current pixel position by the corresponding compensation coefficient to obtain the target grayscale value; All the target grayscale values are rearranged into the same matrix structure as the first transmission image to form a second transmission image.
7. The X-ray transmission detection method for internal porosity defects in welding materials according to claim 1, characterized in that, The step of radially distance-weighted magnification of the axial region in the second transmission image to obtain the third transmission image includes: The spatial range of the axisymmetric region is calibrated on the second transmission image using the axisymmetric coordinates and radius dimensions in the geometric parameters, and the radial distance field from each pixel to the axisymmetric region is calculated based on the spatial range. A radial weighted amplification function with exponential decay as its core is constructed, and a weighted amplification coefficient table is generated based on the radial weighted amplification function; The first gray value is traversed for each pixel position in the second transmission image, and the first gray value is multiplied by the weighting coefficient at the corresponding radial position in the weighting amplification coefficient table to obtain the second gray value; Based on the radial distance field, all the second gray values are reorganized to maintain the same spatial structure as the second transmission image, thereby generating a third transmission image.
8. The X-ray transmission detection method for internal porosity defects in welding materials according to claim 1, characterized in that, The process of dividing the third transmission image into an edge detection region, a middle detection region, and an axis detection region, and then performing pore identification on each region to obtain pore distribution detection results includes: The radial boundary line is determined using the radius dimension in the geometric parameters, and the third transmission image is segmented into three concentric annular regions based on the radial boundary line. The three concentric annular regions include an edge detection region, a middle detection region, and an axis detection region. Ventilation detection is performed in the edge detection region, the middle detection region, and the axis detection region respectively, and the first vent detection data of the edge detection region, the second vent detection data of the middle detection region, and the third vent detection data of the axis detection region are obtained respectively. The first pore detection data, the second pore detection data, and the third pore detection data are merged, and the radial coordinate information of each pore is recorded to generate a pore distribution detection result.
9. The X-ray transmission detection method for internal porosity defects in welding materials according to claim 8, characterized in that, The X-ray transmission detection method for internal porosity defects in the welding material also includes: Based on the total length of the solder bar to be tested, the scanning interval distance in the length direction is set, and multiple cross-sectional scanning positions perpendicular to the solder bar axis are established along the axial direction. The tin bar to be tested or the X-ray source is controlled to move in steps along the length direction according to the scanning interval distance. X-ray transmission detection is repeated at each cross-sectional scanning position to obtain the pore distribution detection results corresponding to each cross-sectional scanning position. The detection results of the pore distribution at all cross-sectional scanning positions are spatially registered according to the length coordinates to establish the three-dimensional position information of each detected pore in the three-dimensional coordinate system of the solder bar to be tested, and a three-dimensional pore distribution map of the solder bar to be tested is constructed based on the three-dimensional position information of all pores.
10. An X-ray transmission detection device for internal porosity defects in welding materials, characterized in that, An X-ray transmission method for performing the X-ray transmission detection of internal porosity defects in welding materials as described in any one of claims 1-9, wherein the X-ray transmission detection equipment for internal porosity defects in welding materials comprises: The X-ray transmission scanning module is used to perform X-ray transmission scanning on the solder bar to be inspected, obtain a first transmission image, and extract geometric parameters based on the first transmission image. A radial thickness compensation module is used to construct a radial thickness compensation coefficient matrix based on the geometric parameters, and to perform pixel multiplication on the first transmission image and the radial thickness compensation coefficient matrix to obtain a second transmission image; A radial distance weighted magnification module is used to perform radial distance weighted magnification on the axial region in the second transmission image to obtain a third transmission image; The pore recognition module is used to divide the third transmission image into an edge detection region, a middle detection region, and an axis detection region, and to perform pore recognition on each region to obtain pore distribution detection results.