A method and apparatus for ultrasonic inspection of a three-dimensional hollow shaft

By collecting and processing multidimensional data from the ultrasonic probe inside the hollow shaft, constructing a three-dimensional image and performing feature analysis, the problem of unintuitive hollow shaft defect identification in existing technologies is solved, and high-precision three-dimensional flaw detection results are achieved.

CN122409855APending Publication Date: 2026-07-17TIANJIN TIEFA TECH DEV CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TIANJIN TIEFA TECH DEV CO LTD
Filing Date
2026-06-15
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

Existing ultrasonic flaw detection technology for hollow shafts cannot intuitively present the distribution of defects in three-dimensional space, and the accuracy and reliability of the test results are affected by noise interference.

Method used

By acquiring multidimensional data from the ultrasonic probe during helical scanning, calculating axial and radial coordinates, constructing a three-dimensional image, and generating clear three-dimensional flaw detection results through wavelet transform analysis, random forest classification, and three-dimensional morphological opening operations.

Benefits of technology

It achieves high-precision three-dimensional visualization of internal defects in hollow shafts, enhances the reliability and accuracy of inspection, effectively suppresses noise interference, and generates intuitive three-dimensional flaw detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122409855A_ABST
    Figure CN122409855A_ABST
Patent Text Reader

Abstract

This application provides a three-dimensional ultrasonic flaw detection method and apparatus for hollow shafts, relating to the field of ultrasonic nondestructive testing technology. The method includes: acquiring data including axial displacement, rotation angle, pitch, sound path, wall thickness, inner cavity radius, and echo amplitude during helical scanning; calculating axial coordinates based on the axial displacement, rotation angle, and pitch, and calculating radial plane coordinates based on the sound path, rotation angle, wall thickness, and inner cavity radius; combining these two coordinates into three-dimensional coordinate points and correspondingly mapping the echo amplitude to them to construct a three-dimensional image; performing wavelet transform on the echo amplitude in the image to extract multi-scale features and identify abnormal spatial regions; performing a three-dimensional morphological opening operation on the image and abnormal regions to eliminate noise and smooth boundaries to obtain a defect distribution image; and finally, visually enhancing regions in the image where the echo amplitude exceeds a threshold to generate a three-dimensional flaw detection result. This application improves the intuitiveness and accuracy of defect identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of ultrasonic nondestructive testing technology, and in particular to a three-dimensional hollow shaft ultrasonic flaw detection method and apparatus. Background Technology

[0002] The three-dimensional hollow shaft ultrasonic flaw detection method is widely used in rail transportation, aerospace and heavy machinery and other fields to detect internal defects generated during the manufacturing and service of hollow shaft components. As the safety requirements of high-speed heavy-load equipment continue to increase, the detection accuracy and visualization level of this method have become the focus of industry attention.

[0003] Existing ultrasonic flaw detection technology for hollow shafts typically uses a spiral scanning method to acquire ultrasonic echo data. Inspectors manually identify and interpret defects by observing two-dimensional ultrasonic spectra. Some automated systems can convert the scan data into two-dimensional cross-sectional images or simple three-dimensional projection views, and combine signal processing technology to analyze the echo amplitude to assist in the location and assessment of defects.

[0004] In the aforementioned applications, the correspondence between ultrasonic echo data and the spatial structure of the shaft is relatively simple. The generated two-dimensional image is difficult to intuitively represent the distribution of defects in three-dimensional space. The signal processing process has limited ability to extract defect features and is easily affected by noise interference, which impacts the accuracy and reliability of the detection results. Therefore, existing technologies suffer from the technical problem of needing to improve the accuracy of spatial characterization and identification of defects inside hollow shafts. Summary of the Invention

[0005] This application provides a three-dimensional hollow shaft ultrasonic flaw detection method and apparatus to solve the problems of poor intuitiveness and low accuracy of defect identification in the prior art.

[0006] To address the aforementioned technical problems, in a first aspect, this application provides a three-dimensional hollow shaft ultrasonic flaw detection method, comprising: During the process of performing a helical scan along the interior of the hollow shaft, ultrasonic data is acquired. The ultrasonic data includes probe axial displacement, probe rotation angle, helical pitch, ultrasonic path, hollow shaft wall thickness, hollow shaft inner radius, and ultrasonic echo amplitude. The axial coordinates are calculated using computer graphics technology based on the probe's axial displacement, the probe's rotation angle, and the helical pitch. Based on the ultrasonic path, the probe rotation angle, the hollow shaft wall thickness, and the hollow shaft inner cavity radius, the radial plane coordinates of the same scanning point are calculated. The radial plane coordinates and the axial coordinates together constitute a three-dimensional coordinate point. The ultrasonic echo amplitude is then correlated with the three-dimensional coordinate point to form a three-dimensional image reflecting the internal structure of the hollow shaft in three-dimensional space. Wavelet transform analysis is performed on the ultrasonic echo amplitude in the three-dimensional image to obtain multi-scale amplitude features. Based on a preset defect pattern library, the random forest classification method is used to perform pattern recognition on the multi-scale amplitude features and output the abnormal spatial region. By combining the three-dimensional image with the abnormal spatial region, a three-dimensional morphological opening operation is performed to eliminate noise points and smooth the boundaries, thereby obtaining a three-dimensional defect distribution image. In the three-dimensional defect distribution image, the image area with ultrasonic echo amplitude greater than a preset amplitude threshold is visually enhanced to generate a three-dimensional flaw detection result.

[0007] Secondly, this application provides a three-dimensional hollow shaft ultrasonic flaw detection device, comprising: The acquisition module is used to acquire ultrasonic data during the process of the ultrasonic probe performing a helical scan along the interior of the hollow shaft. The ultrasonic data includes the probe axial displacement, probe rotation angle, helical pitch, ultrasonic path, hollow shaft wall thickness, hollow shaft inner radius, and ultrasonic echo amplitude. The calculation module is used to calculate the axial coordinates based on the probe's axial displacement, the probe's rotation angle, and the helical pitch using computer graphics technology. The forming module is used to calculate the radial plane coordinates of the same scanning point based on the ultrasonic path, the probe rotation angle, the hollow shaft wall thickness and the hollow shaft inner cavity radius. The radial plane coordinates and the axial coordinates together constitute a three-dimensional coordinate point, and the ultrasonic echo amplitude is correlated with the three-dimensional coordinate point to form a three-dimensional image reflecting the internal structure of the hollow shaft in three-dimensional space. The analysis module is used to perform wavelet transform analysis on the ultrasonic echo amplitude in the three-dimensional image to obtain multi-scale amplitude features. Based on a preset defect pattern library, the random forest classification method is used to perform pattern recognition on the multi-scale amplitude features and output the abnormal spatial region. The elimination module is used to combine the three-dimensional image with the abnormal spatial region, perform a three-dimensional morphological opening operation to eliminate noise points and smooth the boundaries, and obtain a three-dimensional defect distribution image. The enhancement module is used to visually enhance image areas in the three-dimensional defect distribution image where the ultrasonic echo amplitude is greater than a preset amplitude threshold, thereby generating three-dimensional flaw detection results.

[0008] Thirdly, this application provides an electronic device, comprising: Memory, used to store computer programs; A processor is configured to execute the computer program to implement the steps of the three-dimensional hollow shaft ultrasonic flaw detection method as described in the first aspect above.

[0009] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps of the three-dimensional hollow shaft ultrasonic flaw detection method described in the first aspect above.

[0010] The technical solution provided in this application has the following beneficial effects: This application collects multi-dimensional data such as axial displacement, rotation angle, pitch, sound path, wall thickness, inner cavity radius, and echo amplitude of the ultrasonic probe during helical scanning, providing a complete data foundation for subsequent three-dimensional reconstruction. Then, the axial coordinates are calculated based on the axial displacement, rotation angle, and pitch, and the radial plane coordinates are calculated by combining the sound path, rotation angle, wall thickness, and inner cavity radius. The two coordinates are combined into three-dimensional coordinate points and the echo amplitude is correspondingly assigned to them, thereby constructing a three-dimensional image that can truly reflect the internal structure of the hollow shaft. Next, wavelet transform analysis is performed on the echo amplitude in the 3D image to extract multi-scale amplitude features, and a random forest classification method combined with a preset defect pattern library is used for pattern recognition to accurately output the abnormal spatial region. Subsequently, the 3D image and the abnormal spatial region are combined to perform a 3D morphological opening operation, which effectively eliminates isolated noise points and smooths the defect region boundary to obtain a clear 2D defect distribution image. Finally, visual enhancement processing is performed on the regions in the defect distribution image whose echo amplitude exceeds a preset threshold to generate intuitive and easily identifiable 3D flaw detection results.

[0011] Furthermore, this application converts the ultrasonic path length into a radial distance component and combines it with the inner cavity radius to determine the initial position. Simultaneously, it determines the azimuth angle based on the rotation angle. Based on the initial position and azimuth angle, it calculates the first and second coordinates in the radial plane, and then merges the axial coordinates and radial plane coordinates into three-dimensional coordinate points. On this basis, it uses a histogram equalization method to adaptively weight the three-dimensional coordinate points according to the echo amplitude to obtain enhanced point cloud data, and uses a Poisson surface reconstruction algorithm to generate a triangular mesh surface model. Finally, it processes the triangular mesh surface model through texture mapping and lighting rendering to generate a three-dimensional image that can clearly display the internal structure of the hollow shaft.

[0012] Therefore, this process achieves a precise correspondence between the amplitude of the ultrasonic echo and its spatial position, enhances the display effect in low-amplitude areas, and constructs a smooth and continuous surface model, giving the generated three-dimensional image higher geometric accuracy and visual realism.

[0013] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description

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

[0015] Figure 1 A flowchart of a three-dimensional hollow shaft ultrasonic flaw detection method provided in this application embodiment; Figure 2 A flowchart of another three-dimensional flaw detection method provided in the embodiments of this application; Figure 3 An example image showing the rendered 3D flaw detection data corresponding to the 1D flaw detection data acquired by the angled probe (+); Figure 4 This is a schematic diagram of the structure of a three-dimensional hollow shaft ultrasonic flaw detection device provided in an embodiment of this application. Detailed Implementation

[0016] To address the problems of existing technologies, this application proposes a three-dimensional ultrasonic flaw detection method for hollow shafts. The core of this method lies in utilizing multi-dimensional data acquired during helical scanning, including axial displacement, rotation angle, pitch, sound path, wall thickness, and inner cavity radius. First, the axial coordinates are calculated based on the axial displacement, rotation angle, and pitch. Then, the radial plane coordinates are calculated based on the sound path, rotation angle, wall thickness, and inner cavity radius. These two coordinates are combined to form three-dimensional coordinate points, with the ultrasonic echo amplitude corresponding to each point, thus constructing a three-dimensional image that accurately reflects the internal structure of the hollow shaft. Next, wavelet transform analysis is performed on the echo amplitude in this three-dimensional image to extract multi-scale features, and pattern recognition is performed based on a preset defect pattern library to accurately output abnormal spatial regions. Subsequently, a three-dimensional morphological opening operation is performed on the three-dimensional image and the abnormal regions to eliminate noise points and smooth boundaries, obtaining a clear two-dimensional defect distribution image. Finally, visual enhancement is applied to regions in this image where the echo amplitude exceeds a preset threshold, generating an intuitive three-dimensional flaw detection result.

[0017] Therefore, this method achieves an intuitive presentation of the spatial distribution of defects by accurately corresponding the ultrasonic echo amplitude with the three-dimensional spatial position. At the same time, it effectively suppresses noise interference and improves the accuracy of defect identification by using multi-scale feature extraction and pattern recognition. This fundamentally solves the problems of unintuitive spatial representation of defects inside hollow shafts and limited identification accuracy in existing technologies, and improves the visualization level and detection reliability of ultrasonic flaw detection.

[0018] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0019] The core of this application is to provide a three-dimensional hollow shaft ultrasonic flaw detection method, the flowchart of one specific implementation of which is shown below. Figure 1 As shown, the method includes: Step 101: During the process of performing a helical scan along the hollow shaft of the ultrasonic probe, ultrasonic data is acquired. The ultrasonic data includes probe axial displacement, probe rotation angle, helical pitch, ultrasonic path, hollow shaft wall thickness, hollow shaft inner radius, and ultrasonic echo amplitude.

[0020] In step 101, the ultrasonic probe refers to a detection device used to transmit and receive ultrasonic signals. This device moves along a spiral path inside the hollow shaft, converts electrical signals into ultrasonic waves through a piezoelectric crystal and transmits them to the shaft wall. At the same time, it receives ultrasonic waves reflected back from inside the shaft wall and converts them into electrical signals to detect the internal structure of the hollow shaft. A hollow shaft is a shaft-like component with a through-hole in the center. This component has two basic geometric parameters: the inner cavity radius and the wall thickness. The inner cavity is used to accommodate the ultrasonic probe and serve as the physical space for the scanning path, while the wall thickness provides the medium path for the propagation of ultrasonic waves. It is the main object of ultrasonic flaw detection.

[0021] The probe axial displacement refers to the distance the ultrasonic probe moves along the axis of the hollow shaft. This data is used to determine the basic position of the scanning point in the axial direction. The probe rotation angle refers to the angle by which the probe rotates around the axis of the hollow shaft. This is used to determine the orientation of the scanning point in the circumferential direction. The helical pitch refers to the axial movement distance corresponding to one rotation of the probe. This is used to establish the conversion relationship between the rotation angle and the axial displacement. The ultrasonic path refers to the propagation distance of the ultrasonic wave from the probe to the interface and back to the probe. This is used to calculate the depth position of the reflection point in the radial direction. Hollow shaft wall thickness refers to the radial thickness of the hollow shaft tube, used to determine the radial range of the scanning point in conjunction with the inner cavity radius; hollow shaft inner cavity radius refers to the radius of the hollow shaft cavity, used to determine the starting reference for radial calculation; ultrasonic echo amplitude refers to the signal intensity value reflected back after ultrasonic waves encounter an interface, used to characterize the material continuity and the presence of abnormalities at that location.

[0022] In this embodiment, an ultrasonic probe is used to scan inside the hollow shaft in a spiral trajectory, simultaneously collecting the displacement value of the probe moving axially, the angle value of rotation around the axis, the axial movement distance corresponding to each rotation, the propagation distance of the ultrasonic wave from emission to reflection back to the probe, the radial thickness of the hollow shaft tube, the radius of the cavity inside the hollow shaft, and the intensity value of the reflected signal, to obtain the complete data set required for subsequent three-dimensional reconstruction.

[0023] Step 102: Calculate the axial coordinates using computer graphics technology based on the probe's axial displacement, the probe's rotation angle, and the helical pitch.

[0024] Among them, the axial coordinate refers to the position value of the scanning point along the axis of the hollow shaft. This value is used to determine the axial dimension position of the scanning point in three-dimensional space.

[0025] In this embodiment, step 102 includes the following process: Step 1021: Based on the axial displacement of the probe and the pitch of the spiral advance, establish a basic position sequence for the probe to advance along the hollow shaft axis.

[0026] In step 1021, the basic position sequence refers to the sequence formed by arranging the probe axial displacement values ​​in the scanning order. This sequence is used to represent the axial position change law of the probe without considering rotational offset.

[0027] In this embodiment, the probe axial displacement values ​​recorded during the scanning process are first arranged in chronological order to form an initial position sequence. At the same time, the axial movement distance corresponding to one rotation of the probe is determined according to the helical pitch. The pitch value is associated with the probe axial displacement value to establish a basic position sequence for the probe to advance along the hollow shaft axis. Each position point in this sequence corresponds to an axial basic position at a scanning moment.

[0028] Step 1022: Based on the probe rotation angle, superimpose the circumferential offset caused by the rotation on each basic position in the basic position sequence, wherein the circumferential offset is obtained by converting the rotation angle into a scaling factor and multiplying it by the helical advance pitch.

[0029] In step 1022, circumferential offset refers to the additional axial displacement component caused by the rotational motion of the probe, which is determined by the conversion relationship between the rotation angle and the pitch of the helical advance.

[0030] In this embodiment of the application, for each basic position in the basic position sequence, the probe rotation angle value corresponding to that position is obtained, and the rotation angle is converted into a circumferential offset scaling factor, that is, the probe rotation angle is multiplied by the helical advance pitch, and the axial offset caused by the rotational motion is calculated. The axial offset is superimposed on the corresponding basic position to obtain the axial position value after rotational offset correction, thus forming the corrected position sequence.

[0031] Step 1023: Using the linear interpolation method in computer graphics technology, the superimposed position sequence is smoothly connected to generate an axial coordinate curve.

[0032] In step 1023, the linear interpolation method refers to the calculation method used to supplement intermediate position points between two known position points, and the position value of the intermediate point is determined by the straight line relationship between the two points; the axial coordinate curve refers to the curve formed by continuous axial position points, which is used to represent the movement trajectory of the probe along the axial direction.

[0033] In this embodiment of the application, the corrected position sequence is input into a computer graphics processing environment, and the gap between adjacent position points in the sequence is filled by linear interpolation. That is, based on the values ​​of two adjacent known position points and the number of scan steps between them, the axial position values ​​of each intermediate point are calculated, thereby connecting the discrete position sequence into a continuous axial coordinate curve.

[0034] Step 1024: Determine the axial coordinates of each scanning point in three-dimensional space based on the axial coordinate curve.

[0035] In this embodiment of the application, each scanning point is assigned a corresponding axial position value according to the generated axial coordinate curve. This value is the axial coordinate of the scanning point in three-dimensional space, which is used to form a complete three-dimensional spatial position by combining it with other dimensional coordinates.

[0036] This application achieves accurate reconstruction of the helical scanning trajectory in the axial dimension by coordinating the calculation of probe axial displacement, probe rotation angle and helical pitch, combined with linear interpolation method to generate continuous axial coordinate curves.

[0037] Step 103: Calculate the radial plane coordinates of the same scanning point based on the ultrasonic path, the probe rotation angle, the hollow shaft wall thickness, and the hollow shaft inner cavity radius. The radial plane coordinates and the axial coordinates together constitute a three-dimensional coordinate point. The ultrasonic echo amplitude is then correlated with the three-dimensional coordinate point to form a three-dimensional image reflecting the internal structure of the hollow shaft in three-dimensional space.

[0038] Among them, the radial plane coordinates refer to the positional values ​​of the scanning point in a plane perpendicular to the axis of the hollow shaft. These coordinates are composed of the first coordinate and the second coordinate, and are used to determine the specific position of the scanning point in the radial plane. The three-dimensional coordinate point refers to the spatial position point composed of the axial coordinate, the first coordinate, and the second coordinate, and is used to uniquely identify the position of the scanning point in the three-dimensional space inside the hollow shaft. The three-dimensional image refers to the visualization result generated by computer graphics technology that can intuitively show the internal structure of the hollow shaft and its ultrasonic echo amplitude distribution.

[0039] In this embodiment, step 103 includes the following process: Step 1031: Convert the ultrasonic path length into a radial distance component, and combine it with the radius of the hollow shaft cavity to obtain the initial position of the scanning point in the radial direction.

[0040] In step 1031, the radial distance component refers to the radial distance value from the probe position to the reflection point, which is calculated from the ultrasonic path. The initial position refers to the starting position of the scanning point in the radial direction relative to the inner wall of the hollow shaft.

[0041] In this embodiment, the acquired ultrasonic path value is first converted into a radial distance component. This conversion is based on the geometric relationship of the propagation path of ultrasonic waves within the wall thickness of the hollow shaft. Then, combined with the known inner radius of the hollow shaft, the radial distance component is superimposed with the inner radius to obtain the initial position value of the scanning point in the radial direction relative to the center of the hollow shaft. This value represents the radial distance of the scanning point from the center of the hollow shaft.

[0042] In practical applications, assuming that during ultrasonic testing of a hollow shaft, the ultrasonic path of a scanning point is 50 mm and the inner radius of the hollow shaft is 40 mm, the radial distance component of the point is obtained as 30 mm through geometric conversion of the ultrasonic wave propagation path. Adding the 30 mm radial distance component to the 40 mm inner radius, the initial position of the scanning point in the radial direction is obtained as 70 mm. This value indicates that the point is 70 mm away from the center of the hollow shaft.

[0043] Step 1032: Determine the azimuth angle of the scanning point in the radial plane based on the probe rotation angle.

[0044] In step 1032, the azimuth angle refers to the angle between the scanning point and the reference direction in the radial plane, which is used to determine the angular position of the scanning point in the plane.

[0045] In this embodiment of the application, the probe rotation angle value corresponding to the scanning point is obtained, and the angle value is directly used as the azimuth angle of the scanning point in the radial plane. The azimuth angle is used to calculate the coordinate components of the scanning point in the radial plane.

[0046] In practical applications, assuming that the probe rotation angle corresponding to the scanning point is 45 degrees, then this 45 degrees is directly taken as the azimuth angle of the scanning point in the radial plane. This angle represents the angle between the point and the initial zero-degree direction.

[0047] Step 1033: Based on the initial position and the azimuth angle, calculate the first coordinate and the second coordinate of the scanning point in the radial plane, and the first coordinate and the second coordinate constitute the radial plane coordinates.

[0048] In step 1033, the first coordinate refers to the position value of the scanning point in the radial plane along the reference direction, and the second coordinate refers to the position value of the scanning point in the radial plane perpendicular to the reference direction; the radial plane coordinate refers to the plane position point formed by the first coordinate and the second coordinate, which is used to uniquely identify the position of the scanning point in the radial plane.

[0049] In this embodiment of the application, based on the obtained initial position value and azimuth angle value, the calculation is performed through the transformation relationship of trigonometric functions. That is, the first coordinate value of the scanning point is obtained by multiplying the initial position by the cosine of the azimuth angle, and then the second coordinate value of the scanning point is obtained by multiplying the initial position by the sine of the azimuth angle. Finally, the first coordinate value and the second coordinate value are combined to form the radial plane coordinate of the scanning point.

[0050] In practical applications, the initial position of the scanning point is 70 mm, with an azimuth angle of 45 degrees. The first coordinate is calculated as follows: The second coordinate is The radial plane coordinates of the scanning point are 49.5 mm and 49.5 mm, which indicate the specific location of the point in the radial plane.

[0051] Step 1034: Combine the axial coordinates with the radial plane coordinates to form a three-dimensional coordinate point in three-dimensional space.

[0052] In this embodiment of the application, the axial coordinate value of the scanning point calculated previously is combined with the first coordinate value and the second coordinate value in the radial plane coordinate of the current scanning point to form a complete coordinate point of the scanning point in three-dimensional space. The coordinate point is determined by the three-dimensional values ​​and is used to uniquely identify the position of the scanning point inside the hollow shaft.

[0053] In practical applications, assuming the axial coordinate of the scanning point is 120 mm and the radial plane coordinates are 49.5 mm and 49.5 mm, the merged three-dimensional coordinate point is composed of the axial coordinate of 120 mm, the first coordinate of 49.5 mm, and the second coordinate of 49.5 mm. This coordinate point indicates that the scanning point is located inside the hollow shaft at a distance of 70 mm from the axis center, an angle of 45 degrees, and an axial position of 120 mm.

[0054] Step 1035: Based on the ultrasonic echo amplitude, the three-dimensional coordinate points are adaptively weighted using a histogram equalization method to obtain enhanced point cloud data.

[0055] In step 1035, histogram equalization refers to an image processing technique that enhances contrast by adjusting the data distribution; enhanced point cloud data refers to a set of three-dimensional point clouds that has been weighted and whose coordinate point density in low-amplitude areas has been increased, which is used to improve the display effect in weak echo areas.

[0056] For an explanation and specific implementation of histogram equalization methods, please refer to relevant technologies; they will not be elaborated here.

[0057] In this embodiment, the distribution of ultrasonic echo amplitude values ​​of all scanning points is first statistically analyzed to generate an amplitude histogram. Then, the histogram is transformed using a histogram equalization method to obtain the weight coefficient corresponding to each amplitude value. Regions with lower amplitudes are given higher weight coefficients to enhance their performance. Finally, each three-dimensional coordinate point is multiplied by its corresponding weight coefficient to obtain enhanced point cloud data. The density of coordinate points in low-amplitude regions in this data is effectively improved, which facilitates the preservation of detailed information of weakly reflective regions during subsequent surface reconstruction.

[0058] In practical applications, assuming that the ultrasonic echo amplitude of a certain defect area is concentrated between 20% and 30%, which is lower than 60% to 80% of the surrounding normal area, after histogram equalization calculation, the weight coefficient of this area is adjusted to 2.5. After multiplying all three-dimensional coordinate points in the area by 2.5, the coordinate point density of the area increases significantly, so that the weak reflection defect area can be fully reflected in the subsequent reconstruction.

[0059] Step 1036: Based on the enhanced point cloud data, generate a triangular mesh surface model using the Poisson surface reconstruction algorithm.

[0060] In step 1036, the Poisson surface reconstruction algorithm refers to a computational method for reconstructing a continuous surface from point cloud data by solving the Poisson equation; the triangular mesh surface model refers to a three-dimensional model composed of triangular facets used to represent the geometric shape of an object's surface, and is used to visually display the geometric shape of the internal structure of the hollow shaft.

[0061] The explanation and specific implementation of the Poisson surface reconstruction algorithm can be found in relevant technologies, and will not be elaborated here.

[0062] In this embodiment of the application, the enhanced point cloud data is input into the Poisson surface reconstruction algorithm. The algorithm first estimates the normal direction of each point in the point cloud data, then constructs an octree space structure and solves the Poisson equation to obtain the implicit surface function. Finally, it generates a surface model composed of triangular patches by extracting isosurfaces. This model can accurately reflect the geometry of the internal structure of the hollow shaft, including the defect area.

[0063] In practical applications, enhanced point cloud data containing 100,000 points is input into the Poisson surface reconstruction algorithm, and the reconstruction depth is set to 8. After calculation, a triangular mesh surface model composed of approximately 200,000 triangular facets is generated. This model clearly presents the outline of the hollow shaft inner wall and the boundary shape of internal defects.

[0064] Step 1037: Based on the triangular mesh surface model, generate a three-dimensional image representing the internal structure of the hollow shaft through texture mapping and lighting rendering.

[0065] Step 1037 may specifically include the following steps: A1: Convert the ultrasonic echo amplitude into image texture data, where the color or grayscale of each texture data point represents an amplitude value.

[0066] In step A1, image texture data refers to a two-dimensional image composed of pixels, where the color or grayscale value of each pixel corresponds to an ultrasonic echo amplitude value, which is used to visually reflect the signal intensity at each location on the surface of the three-dimensional model.

[0067] In this embodiment, the ultrasonic echo amplitude values ​​of all scanning points are first mapped to the grayscale space according to their value range, that is, the amplitude values ​​are linearly converted into the corresponding grayscale values. Then, these grayscale values ​​are arranged into a two-dimensional image format according to the spatial position of the scanning points to generate image texture data. The grayscale of each pixel in this data intuitively reflects the magnitude of the ultrasonic echo amplitude at that position. The higher the amplitude, the brighter the grayscale.

[0068] In practical applications, the amplitude range of 0% to 100% is mapped to the grayscale range of 0 to 255, where 30% amplitude corresponds to grayscale 77, 60% amplitude corresponds to grayscale 153, and 90% amplitude corresponds to grayscale 230. After being arranged in the scanning order, an image texture data with a resolution of 512 by 512 pixels is generated. In this image, bright areas correspond to strong echo locations such as cracks and defects, while dark areas correspond to weak echo locations such as areas with uniform material.

[0069] A2: Establish a mapping relationship between each vertex of the triangular mesh surface model and the corresponding position in the image texture data.

[0070] In step A2, the mapping relationship refers to the correspondence between each vertex in the triangular mesh surface model and the specific pixel coordinates in the image texture data, which is used to accurately attach amplitude information to the model surface.

[0071] In this embodiment, based on the position coordinates of each scanning point in three-dimensional space, the vertex index corresponding to it on the triangular mesh surface model is calculated. At the same time, based on the original acquisition order of the scanning point, the pixel coordinates corresponding to it in the image texture data are determined, and a one-to-one correspondence between the vertex and the pixel coordinates is established to ensure that each model vertex can obtain the correct amplitude information.

[0072] In practical applications, assuming that the 100th vertex in the triangular mesh surface model corresponds to the 200th point in the original acquisition sequence of the scanning points, and the pixel coordinates of this point in the image texture data are row 32 and column 64, then a mapping relationship between this vertex and pixel coordinates 32 rows and 64 columns is established so that the gray value of this pixel can be obtained subsequently.

[0073] A3: Based on the mapping relationship, the image texture data is attached to the triangular mesh surface model to form a textured triangular mesh model.

[0074] In step A3, a textured triangular mesh model refers to a three-dimensional mesh model with image texture data attached to its surface, which can simultaneously display geometric shape and amplitude information.

[0075] In this embodiment of the application, according to the established mapping relationship, the gray value of each pixel in the image texture data is assigned to the corresponding vertex on the triangular mesh surface model, and the texture information is filled into the interior of the triangular facet by bilinear interpolation calculation, so that the entire model surface is covered with a continuous gray-scale texture image, forming a textured triangular mesh model, in which the gray value at each position reflects the ultrasonic echo amplitude at that position.

[0076] In practical applications, based on the mapping relationship between vertex and pixel coordinates, the gray values ​​of each pixel in the image texture data are assigned to the corresponding model vertices, and the internal regions of the triangular facets are filled by bilinear interpolation to generate a textured triangular mesh model. The color depth of the model surface intuitively shows the distribution of ultrasonic echo intensity at various locations inside the hollow shaft.

[0077] A4: In the 3D rendering environment, set the light source for the textured triangular mesh model.

[0078] In step A4, the light source refers to the light-emitting body simulated in the 3D rendering environment, which is used to illuminate the surface of the model to produce light and shadow effects and enhance the 3D stereoscopic effect.

[0079] In this embodiment of the application, a virtual directional light source is created in the 3D rendering environment, and the direction and intensity parameters of the light source are set so that the light source can illuminate the surface of the textured triangular mesh model from a specific angle, providing lighting conditions for subsequent rendering and making the model present a stereoscopic visual effect.

[0080] In practical applications, setting a directional light source in a 3D rendering environment, with the light source direction set to illuminate from a 45-degree angle directly above the model and the light source intensity set to 0.8, produces a natural transition of light and shadow on the model surface.

[0081] A5: Based on the normal directions of each triangle on the triangular mesh surface model, determine the brightness change information of the model surface under the illumination of the light source.

[0082] In step A5, the normal direction refers to the unit direction vector perpendicular to the triangular facet, used to determine the orientation of the facet relative to the light source; the brightness variation information refers to the distribution of brightness differences in various areas of the model surface due to different illumination angles of the light source, used to enhance the sense of three-dimensionality.

[0083] In this embodiment, the normal direction of each triangular facet in the triangular mesh surface model is calculated. Then, based on the direction of the light source, the angle between the normal of each facet and the direction of the light source is calculated. Next, the brightness coefficient of each facet surface is calculated based on the standard lighting model to form the brightness change information of the entire model surface. The facets facing the light source are brighter, and the facets facing away from the light source are darker.

[0084] In practical applications, the normal direction of each triangular facet in the calculation model is used. For facets where the angle between the normal direction and the light source direction is less than 30 degrees, the brightness coefficient is close to 1.0. For facets where the angle is greater than 60 degrees, the brightness coefficient is about 0.3. This yields a brightness distribution map of the entire model surface, which reflects the three-dimensional shape of the model.

[0085] A6: Based on the image texture data and the brightness change information, the textured triangular mesh model is rendered to generate a three-dimensional image.

[0086] In this embodiment of the application, the gray value of each pixel in the image texture data is fused with the brightness change information of the corresponding position. That is, the gray value is multiplied by the brightness coefficient to obtain the final display gray value of the position. Then, the calculation is performed on all triangular facets and pixelated output to generate a three-dimensional image with stereoscopic visual effect and ultrasonic echo amplitude information. Each pixel in the image corresponds to the geometric shape and ultrasonic echo intensity of a specific position inside the hollow shaft. The inspector can intuitively identify the defect position and shape by observing the image.

[0087] In practical applications, the grayscale value of each pixel in the image texture data is multiplied by the brightness coefficient of the corresponding position to obtain the final display grayscale value. For example, if the grayscale value of a defective area is 180 and the brightness coefficient is 0.9, the final display value is 162. Scanline rendering is performed on all triangular facets to generate a three-dimensional image with a resolution of 1024 by 1024 pixels. In this image, the defective area is highlighted due to its high grayscale, and at the same time, it presents a three-dimensional shape due to the lighting rendering.

[0088] This application establishes the three-dimensional coordinates of the scanning point through geometric transformation of ultrasonic path, probe rotation angle, wall thickness and inner cavity radius. It enhances the point cloud density of the weak echo area by combining histogram equalization, generates a smooth triangular mesh surface model by using Poisson surface reconstruction, and generates a three-dimensional image with amplitude information through texture mapping and lighting rendering. This achieves high-precision three-dimensional visualization reconstruction of the internal structure of the hollow shaft, including the defect area, enabling inspectors to intuitively identify the spatial distribution of defects.

[0089] Step 104: Perform wavelet transform analysis on the ultrasonic echo amplitude in the three-dimensional image to obtain multi-scale amplitude features. Based on a preset defect pattern library, use the random forest classification method to perform pattern recognition on the multi-scale amplitude features and output the abnormal spatial region.

[0090] Among them, multi-scale amplitude features refer to the set of ultrasonic echo amplitude features extracted at different frequency scales, the preset defect pattern library refers to the pre-established database containing various typical defect feature patterns, and the abnormal spatial region refers to the set of spatial points identified as potentially having defects.

[0091] In this embodiment, step 104 includes the following process: Step 1041: Perform wavelet decomposition based on multi-resolution on the ultrasonic echo amplitude corresponding to each spatial point in the three-dimensional image to obtain amplitude component data at different frequency scales, so as to form multi-scale amplitude features of each spatial point.

[0092] In this embodiment, feature extraction is first performed on each spatial point in the three-dimensional image. Specifically, the ultrasonic echo amplitude value corresponding to the point is extracted as the original signal. Then, the original signal is subjected to multi-resolution wavelet decomposition. The amplitude component data of the spatial point at different frequency scales is obtained by decomposing layer by layer. After the decomposition is completed, the obtained frequency scale component data are arranged in order from low to high scale to finally form the multi-scale amplitude feature vector corresponding to the spatial point. This vector can reflect the energy distribution of the ultrasonic echo at the location in different frequency ranges.

[0093] Step 1042: Extract descriptive parameters with spatial statistical properties from the multi-scale amplitude features to construct a multi-dimensional feature descriptor for the spatial point.

[0094] In step 1042, the descriptive parameters of spatial statistical properties refer to the statistical quantities that reflect the distribution law of feature vectors, and the multidimensional feature descriptor refers to the feature set composed of multiple descriptive parameters.

[0095] In this embodiment of the application, after obtaining the multi-scale amplitude feature vector of each spatial point, the vector needs to be statistically analyzed. The specific calculation includes descriptive parameters such as the mean, variance, energy concentration, and proportional relationship between the components of each scale. By combining these calculated descriptive parameters in a fixed order, a multi-dimensional feature descriptor for the spatial point can be constructed. This descriptor can more comprehensively characterize the feature attributes of the ultrasound echo at that location.

[0096] Step 1043: Input the multidimensional feature descriptor into the random forest classifier, which performs feature selection and path decision on the multidimensional feature descriptor in parallel using multiple decision trees.

[0097] In step 1043, the random forest classifier adopts an ensemble learning architecture, which is composed of 100 classification and regression trees as base learners. Each decision tree is constructed using the Classification and Regression Tree (CART) algorithm and organized in the form of a binary tree. The internal nodes select the optimal feature for splitting based on the principle of minimizing the Gini coefficient, and the leaf nodes store the defect category labels that account for the majority of the training samples.

[0098] During the training of a random forest, 100 sample subsets with replacement are first extracted from the original training sample set using a bootstrap sampling method. Each subset is roughly the same size as the original training set and is used to train a decision tree. Then, when splitting at each node of each decision tree, several features are randomly selected from all the features contained in the multidimensional feature descriptor of that spatial point as candidate feature subsets. The feature with the smallest Gini coefficient is the optimal splitting feature, and the value of this feature is used as the node splitting threshold. The complete decision tree is recursively generated until the number of node samples is less than the preset threshold or the Gini coefficient no longer decreases. During this process, no pruning operations are performed on any decision tree to maintain the diversity of the model.

[0099] Once trained, the random forest classifier can be used to make parallel decisions on the input multidimensional feature descriptors. Each decision tree outputs a classification result independently, and the defect category to which the spatial point belongs is finally determined by majority voting.

[0100] It should be noted that the above structure is exemplary. This application does not impose specific limitations on the internal structure design of the random forest classifier, and can be set accordingly based on the actual situation.

[0101] In this embodiment, after constructing the multidimensional feature descriptor, the multidimensional feature descriptor of each spatial point is then input into a pre-trained random forest classifier for processing. This classifier contains multiple decision trees, and each decision tree independently judges the multidimensional feature descriptor. Specifically, at each node of the tree, feature selection is performed based on the feature value, and a downward branch is selected. This process is repeated until a leaf node is reached. Finally, each decision tree outputs a classification result. This parallel processing method achieves efficient classification of multidimensional feature descriptors.

[0102] Step 1044: Perform majority voting fusion on the output results of each decision tree to calculate the matching confidence between the multidimensional feature descriptor and various defect feature patterns in the preset defect pattern library.

[0103] In step 1044, majority voting fusion refers to the method of counting the number of times each category appears in the output results of each decision tree and taking the category with the most occurrences as the final result; matching confidence refers to the quantitative value of the degree of matching between the multidimensional feature descriptor and a certain type of defect feature pattern.

[0104] In this embodiment of the application, after all decision trees in the random forest classifier have completed their outputs, it is necessary to collect the output results of all decision trees for fusion processing. Specifically, this involves counting the number of times each defect category is selected by the decision tree, and then dividing the number of selections for each category by the total number of decision trees to calculate the matching confidence of that category. This confidence value directly reflects the degree of matching between the spatial point and various defect feature patterns in the preset defect pattern library.

[0105] Step 1045: Mark the spatial points with matching confidence greater than the preset confidence threshold as candidate defect points, and cluster and merge all candidate defect points according to spatial continuity to form abnormal spatial regions.

[0106] In step 1045, a candidate defect point refers to a spatial point that is determined to be a defect. Spatial continuity refers to the adjacency relationship of spatial points in three-dimensional space. Cluster merging refers to the process of merging spatially adjacent candidate defect points into the same region.

[0107] In this embodiment, after obtaining the matching confidence of each spatial point, a confidence threshold is first set, and the matching confidence of each spatial point is compared with the threshold. Spatial points with a matching confidence greater than the threshold are marked as candidate defect points. After marking, spatial clustering is performed on all candidate defect points. Specifically, it checks whether there are other candidate defect points around each candidate defect point and merges spatially adjacent candidate defect points into the same region. Finally, the regions formed after clustering and merging are output as abnormal spatial regions, and each region corresponds to a possible defect location.

[0108] This application achieves accurate identification and localization of abnormal regions inside hollow shafts by extracting multi-scale features from the ultrasonic echo amplitude in three-dimensional images through wavelet transform analysis and combining it with random forest classification for pattern recognition.

[0109] Step 105: Combine the three-dimensional image with the abnormal spatial region, perform a three-dimensional morphological opening operation to eliminate noise points and smooth the boundaries to obtain a three-dimensional defect distribution image.

[0110] Among them, noise points refer to isolated spatial points that are misjudged as abnormal points, and three-dimensional defect distribution images refer to three-dimensional images that can clearly reflect the distribution of defect areas after noise elimination and boundary smoothing.

[0111] In this embodiment, step 105 includes the following process: Step 1051: Based on the location of the abnormal spatial region in the three-dimensional image, mark all abnormal points to form an initial marked image, wherein the abnormal points are represented by a first mark value and the other points are represented by a second mark value.

[0112] In step 1051, the initial labeled image refers to a three-dimensional image that distinguishes between outliers and non-outliers using different labeled values. The first labeled value is a numerical identifier used to represent outliers, and the second labeled value is a numerical identifier used to represent non-outliers.

[0113] In this embodiment of the application, the specific location information of the abnormal spatial region output in step 104 in the three-dimensional image is first obtained. Then, each spatial point in the three-dimensional image is traversed. A first label value is assigned to spatial points that belong to the abnormal spatial region, and a second label value is assigned to spatial points that do not belong to the abnormal spatial region. An initial labeled image with the same spatial size as the three-dimensional image is generated through this labeling method. The label value of each spatial point in the image intuitively reflects whether the point belongs to the abnormal region.

[0114] Step 1052: Set a three-dimensional processing template. The three-dimensional processing template has a fixed size and shape. The size of the three-dimensional processing template is determined based on the scanning accuracy and noise level.

[0115] In step 1052, the three-dimensional processing template refers to a three-dimensional structural unit used for local neighborhood operations in three-dimensional space, which has fixed spatial dimensions and geometry.

[0116] In this embodiment of the application, based on the scanning accuracy index used in this ultrasonic flaw detection and the distribution of noise points in the actual acquired data, a specific size and shape of a three-dimensional processing template is set. For example, it can be set as a cube template with a side length containing three spatial points. The size selection of the template ensures that it can effectively cover the typical isolated noise point range, while not excessively affecting the boundary of the real defect area.

[0117] Step 1053: In the initial marked image, perform erosion processing on each point: Taking the current point as the center, check the mark value of all points within the range covered by the three-dimensional processing template. If the mark value of all points within the range is the first mark value, then keep the mark value of the current point as the first mark value; otherwise, modify the mark value of the current point to the second mark value to obtain the eroded marked image.

[0118] In step 1053, the etched marker image refers to the marker image obtained after etching.

[0119] In this embodiment, after obtaining the initial marked image and setting the three-dimensional processing template, the initial marked image needs to be eroded. Specifically, each spatial point in the initial marked image is taken as the current center point, and the three-dimensional processing template is placed at the center point. The marked values ​​of all spatial points within the coverage area of ​​the template are checked. If the marked values ​​of all points within the coverage area are the first marked value, it means that the center point is located in the inner core of the abnormal region, so the marked value of the center point is kept unchanged as the first marked value. Conversely, if any point within the coverage area has the marked value of the second marked value, it means that the center point is close to the edge of the abnormal region or an isolated noise point, so the marked value of the center point is modified to the second marked value. After traversing all spatial points in this way, an eroded marked image is obtained. In this image, the boundary of the abnormal region shrinks inward, and isolated noise points are eliminated.

[0120] Step 1054: In the erosion mark image, the mark value distribution is adaptively smoothed based on the bilateral filtering algorithm to obtain the smoothed erosion mark image.

[0121] In this embodiment of the application, after completing the erosion process to obtain the erosion-marked image, the image is then subjected to adaptive smoothing processing using a bilateral filtering algorithm. When processing each spatial point, the algorithm considers both the spatial distance to the surrounding spatial points and the similarity of the marker values ​​between the point and the surrounding spatial points. The marker value of the current point is adjusted by weighted averaging to make the distribution of the marker values ​​smoother and more natural, while maintaining the main boundary features between abnormal and non-abnormal regions. After this processing, a smoothed erosion-marked image is obtained.

[0122] Step 1055: In the smoothed erosion mark image, perform dilation processing on each point: If the mark value of the current point is the first mark value, then take the current point as the center and set the mark values ​​of all points within the coverage of the three-dimensional processing template to the first mark value to obtain the dilated mark image.

[0123] In this embodiment, after obtaining the smoothed erosion mark image, the next step is to perform dilation processing on the image. Specifically, each spatial point in the smoothed erosion mark image is taken as the current center point, and the mark value of the center point is checked to see if it is the first mark value. If the mark value of the center point is the first mark value, the three-dimensional processing template is placed at the center point, and the mark values ​​of all spatial points within the range covered by the template are set to the first mark value. After traversing all spatial points in this way, the dilated mark image is obtained. The boundary of the abnormal region in the image expands outward and is restored to a size close to the original abnormal region. At the same time, since the previous erosion processing has eliminated noise points, the dilation processing will not restore these noise points.

[0124] Step 1056: Based on the dilated marker image, a region growing algorithm is used, with the point whose marker value is the first marker value as the seed point, and the region is grown according to the preset spatial neighborhood conditions. Spatially adjacent regions that meet the preset amplitude similarity threshold are merged to form a merged marker image. Based on the merged marker image, a three-dimensional defect distribution image is generated.

[0125] In step 1056, the spatial neighborhood condition refers to the spatial distance standard for determining whether two points are adjacent, the amplitude similarity threshold refers to the numerical standard for determining whether the ultrasonic echo amplitudes of two points are similar, and the merged labeled image refers to the labeled image formed after region growing and merging.

[0126] The embodiments of this application do not specifically limit the value of the amplitude similarity threshold; it can be set according to the actual situation.

[0127] In this embodiment, region growing is performed based on the dilated marker image. First, all spatial points with a first marker value are selected from the dilated marker image as seed points. Then, starting from each seed point, its adjacent points in the spatial neighborhood are checked. If the marker value of the adjacent point is also the first marker value, it is included in the current region. At the same time, the neighboring points of the adjacent point are further checked. This process is repeated recursively until no new points can be added. During the growing process, the original ultrasonic echo amplitude of each point is referenced. Merging is only performed when the amplitude difference between adjacent points is less than a preset amplitude similarity threshold. In this way, spatially adjacent and amplitude-similar abnormal points are merged into the same region to form a merged marker image. Each connected region in this image corresponds to a complete suspected defect region. Finally, the merged marker image is output as a three-dimensional defect distribution image.

[0128] This application effectively eliminates isolated noise points, smooths the boundaries of defect regions, and achieves accurate merging of defect regions by combining three-dimensional morphological opening operations with bilateral filtering and region growing algorithms, thus obtaining a clear and reliable three-dimensional defect distribution image.

[0129] Step 106: In the three-dimensional defect distribution image, the image area with ultrasonic echo amplitude greater than the preset amplitude threshold is visually enhanced to generate a three-dimensional flaw detection result.

[0130] In step 106, the three-dimensional flaw detection result refers to the final generated three-dimensional visualization image that can intuitively show the location and shape of the defect.

[0131] In this embodiment, after obtaining a three-dimensional defect distribution image, the original ultrasonic echo amplitude value corresponding to each spatial point in the image is first extracted and compared with a preset amplitude threshold. For spatial points with ultrasonic echo amplitude greater than the preset amplitude threshold, they are marked as target areas requiring enhanced display. For spatial points with ultrasonic echo amplitude less than or equal to the preset amplitude threshold, their original display attributes remain unchanged. Then, a preset enhanced display color is assigned to the target area points, such as using bright red for marking. At the same time, the display transparency or brightness parameters of the area points can be adjusted to make them stand out more in the overall image. Finally, all spatial points after visual enhancement processing are recombined into a complete three-dimensional image. In this image, areas with amplitude exceeding the threshold are presented in a striking color, while areas with amplitude not exceeding the threshold retain their original display effect, thereby generating a three-dimensional flaw detection result that can intuitively distinguish between defective and non-defective areas.

[0132] In this embodiment, after step 106, the following process is also included: B1: Based on the area points within the normal range in the three-dimensional flaw detection results, establish a normal sample set, and determine the spatial distribution boundary of the normal samples based on the support vector description method. Identify the abnormal spatial points located outside the spatial distribution boundary and record them as outliers.

[0133] In step B1, the normal sample set refers to the set of area points selected from the three-dimensional flaw detection results that are determined to be defect-free. The support vector description method is a machine learning method that determines the normal data distribution boundary by finding the smallest hypersphere containing all normal samples. The spatial distribution boundary refers to the boundary of the area occupied by normal samples in the feature space. Outliers refer to spatial points located outside the boundary that are inconsistent with the distribution characteristics of normal samples.

[0134] In this embodiment of the application, firstly, all points determined to be normal areas are extracted from the three-dimensional flaw detection results generated in step 106. The ultrasonic echo amplitude and spatial location information of these points are used as features to construct a normal sample set. Then, the support vector description method is applied to train the sample set to find the smallest hypersphere that can contain all normal samples. The surface of the hypersphere is the spatial distribution boundary of the normal samples. After the boundary is determined, all spatial points in the three-dimensional flaw detection results are compared with the boundary. For spatial points located outside the boundary, they are marked as outliers. These outliers may be potential defect areas that were not previously identified.

[0135] B2: Perform spatial clustering on the outliers to obtain a set of suspicious regions.

[0136] In step B2, the suspicious region set refers to the set of regions that may contain defects, formed by spatial clustering.

[0137] In this embodiment of the application, after obtaining outliers, spatial clustering is then performed on these outliers. Specifically, it involves checking whether there are other outliers around each outlier and merging outliers with a spatial distance less than a preset distance threshold into the same region. In this way, all outliers are divided into several spatially independent regions, and these regions are aggregated to form a set of suspicious regions. Each suspicious region corresponds to a potential defect location that may require further attention.

[0138] B3: For each suspicious region in the set of suspicious regions, calculate the corresponding volume, center point location, average amplitude value of internal points, and amplitude distribution variance to obtain the spatial feature data of each suspicious region.

[0139] In step B3, volume refers to the size of the space occupied by the suspicious area, center point location refers to the geometric center coordinates of the suspicious area, average amplitude value refers to the arithmetic mean of the ultrasonic echo amplitudes of all points in the suspicious area, amplitude distribution variance refers to the statistical measure of the degree of difference between the ultrasonic echo amplitudes of each point in the suspicious area and the average amplitude value, and spatial feature data refers to the attribute information of the suspicious area composed of the above-mentioned multiple feature parameters.

[0140] In this embodiment of the application, for each suspicious region in the suspicious region set, the number of spatial points contained in the region is first counted and the volume of the region is calculated in combination with the scanning resolution. Then, the average value of the coordinates of all spatial points in the region is calculated as the center point position. Next, the ultrasonic echo amplitude of all points in the region is extracted and its arithmetic mean and variance are calculated. The above four feature parameters are combined to form the spatial feature data of the suspicious region, which is used for subsequent defect probability assessment.

[0141] B4: Based on the spatial feature data, a fuzzy logic system is used to assess the probability of defects in each suspicious area, and a defect confidence score is generated for each suspicious area.

[0142] In step B4, the defect confidence score is a numerical value that quantifies the likelihood of a defect existing in a suspected area.

[0143] In this embodiment of the application, after obtaining the spatial feature data of each suspicious area, the feature data is then input into a pre-built fuzzy logic system. The system infers the input features according to preset fuzzy rules. For example, the larger the volume, the higher the average amplitude, and the larger the amplitude distribution variance, the higher the probability of a defect. Through processes such as fuzzification, rule matching, and defuzzification, the system finally outputs the defect confidence score corresponding to each suspicious area. This score reflects the probability of a defect in the area.

[0144] B5: Select the target suspicious area with a defect confidence score greater than the preset score threshold from all suspicious areas as the defect area to be confirmed, and output a structured report for defect review.

[0145] In step B5, the target suspicious area refers to the suspicious area where the defect confidence score exceeds the preset threshold, the defect area to be confirmed refers to the potential defect area that needs further manual review, and the structured report refers to a document organized in a fixed format that contains information such as the location of the defect area, characteristic parameters, and confidence score.

[0146] In this embodiment of the application, a scoring threshold is set, and the defect confidence score of each suspicious area is compared with the threshold. For suspicious areas with scores greater than the threshold, they are marked as target suspicious areas as defect areas to be confirmed. Then, the location coordinates, volume, average amplitude, amplitude variance and confidence score of these defect areas to be confirmed are organized according to a predetermined format to generate a structured report for defect review. This report can be used by inspection personnel for further confirmation and analysis.

[0147] This application achieves secondary screening and quantitative evaluation of potential defect areas by performing outlier detection, spatial clustering, feature extraction, and fuzzy logic evaluation on the three-dimensional flaw detection results, thereby improving the reliability and verifiability of defect identification.

[0148] In the 3D model, this embodiment can use color coding, arrow indicators, transparency levels, text labels, or animation displays to intuitively show the location, size, and shape of defects, which can improve the visualization effect of the detection results.

[0149] Here is a specific example: In practical applications, the target probe can be mounted on a probe rod, and for flaw detection of a hollow shaft, there can be one or multiple probes. Taking multiple probes as an example, combined with... Figure 2 The three-dimensional flaw detection method is explained as follows: In this embodiment, a computer-controlled probe rod is spiraled forward. This probe rod is equipped with a dual-crystal focusing probe, a + angled probe, and a - angled probe. These three probe types are used in ultrasonic flaw detection. The dual-crystal focusing probe contains two independent crystals, one for emitting ultrasonic waves and the other for receiving them. The probe design includes a focusing lens to focus the ultrasonic waves to a specific depth, improving detection resolution. Due to the dual-crystal design, the blind zone near the inner surface of the hollow shaft is reduced, making it suitable for detecting defects close to the inner surface of the hollow shaft. The + angled probe has an angled design with a positive angle of incidence, typically used to detect defects perpendicular to the inner surface of the hollow shaft. The ultrasonic waves change direction due to refraction after entering the material, allowing for the detection of defects in different directions.

[0150] The angled probe (-) has a negative angle of incidence and is typically used to detect defects parallel to the inner surface of a hollow shaft. Similarly, it utilizes the refraction effect, but in the opposite direction, to detect defects parallel to the inner surface of a hollow shaft.

[0151] The dual-chip focusing probe, the angle probe (+), and the angle probe (-) respectively acquire data. In this embodiment, different probe data buffers can be set to store the one-dimensional flaw detection data (equivalent to the ultrasonic echo amplitude in this application) acquired by the corresponding probes. For example, the one-dimensional flaw detection data acquired by the dual-chip focusing probe is stored in buffer 1, the one-dimensional flaw detection data acquired by the angle probe (+) is stored in buffer 2, and the one-dimensional flaw detection data acquired by the angle probe (-) is stored in buffer 3. After performing three-dimensional image processing based on the one-dimensional flaw detection data, the three-dimensional flaw detection data (i.e., the three-dimensional image in this application) corresponding to each one-dimensional flaw detection data can be stored in different probe data buffers. For example, the three-dimensional flaw detection data corresponding to the one-dimensional flaw detection data acquired by the dual-chip focusing combined probe is stored in buffer 4, the three-dimensional flaw detection data corresponding to the one-dimensional flaw detection data acquired by the angled probe (+) is stored in buffer 5, and the three-dimensional flaw detection data corresponding to the one-dimensional flaw detection data acquired by the angled probe (-) is stored in buffer 6. Then, this embodiment can call a visualization library to present a three-dimensional image space with the added three-dimensional flaw detection data.

[0152] Figure 3 This is an example image of the rendered three-dimensional flaw detection data corresponding to the one-dimensional flaw detection data collected by the angle probe (+). Figure 3 The dotted areas, linear areas, and ring-shaped areas highlighted in the image are all defects.

[0153] For each probe, the formula used in the distance modeling method in the 3D model is as follows: , , ; in, Represents the position of the i-th coordinate in the three-dimensional image space, where i ranges from [0, the full length of the hollow axis]. This represents the displacement value in the direction of the probe's spiral advance, i.e., the probe's axial displacement; Indicates the probe spirals forward. Angle, that is, the angle of probe rotation. The range is [0, 360]; This indicates the pitch of the probe's spiral advance, i.e., the spiral advance pitch; Indicates probe acquisition Depth, i.e., ultrasonic path, This indicates the wall thickness of the hollow shaft, i.e., the wall thickness of the hollow shaft. This indicates the inner radius of the hollow shaft, that is, the radius of the inner cavity of the hollow shaft.

[0154] Figure 4 This is a schematic diagram of the structure of a three-dimensional hollow shaft ultrasonic flaw detection device provided in an embodiment of this application, as shown below. Figure 4 As shown, the device includes: The acquisition module 41 is used to acquire ultrasonic data during the process of the ultrasonic probe performing a helical scan along the hollow shaft. The ultrasonic data includes probe axial displacement, probe rotation angle, helical pitch, ultrasonic path, hollow shaft wall thickness, hollow shaft inner radius, and ultrasonic echo amplitude.

[0155] The calculation module 42 is used to calculate the axial coordinates based on the axial displacement of the probe, the rotation angle of the probe, and the pitch of the spiral advance using computer graphics technology.

[0156] The forming module 43 is used to calculate the radial plane coordinates of the same scanning point based on the ultrasonic path, the probe rotation angle, the hollow shaft wall thickness and the hollow shaft inner cavity radius. The radial plane coordinates and the axial coordinates together constitute a three-dimensional coordinate point, and the ultrasonic echo amplitude is correlated with the three-dimensional coordinate point to form a three-dimensional image reflecting the internal structure of the hollow shaft in three-dimensional space.

[0157] Analysis module 44 is used to perform wavelet transform analysis on the ultrasonic echo amplitude in the three-dimensional image to obtain multi-scale amplitude features. Based on a preset defect pattern library, the random forest classification method is used to perform pattern recognition on the multi-scale amplitude features and output the abnormal spatial region.

[0158] The elimination module 45 is used to combine the three-dimensional image with the abnormal spatial region, perform a three-dimensional morphological opening operation to eliminate noise points and smooth the boundaries, and obtain a three-dimensional defect distribution image.

[0159] The enhancement module 46 is used to visually enhance the image area in the three-dimensional defect distribution image where the ultrasonic echo amplitude is greater than a preset amplitude threshold, and generate a three-dimensional flaw detection result.

[0160] The three-dimensional hollow shaft ultrasonic flaw detection device of this application embodiment is used to implement the aforementioned three-dimensional hollow shaft ultrasonic flaw detection method. Therefore, the specific implementation of the three-dimensional hollow shaft ultrasonic flaw detection device can be found in the embodiment section of the three-dimensional hollow shaft ultrasonic flaw detection method above. The specific implementation can be referred to the description of the corresponding embodiment, and will not be repeated here.

[0161] This application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the above-described three-dimensional hollow shaft ultrasonic flaw detection methods.

[0162] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the above-described three-dimensional hollow shaft ultrasonic flaw detection methods.

[0163] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory, random access memory, portable hard drives, magnetic disks, or optical disks.

[0164] The embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the embodiments of the three-dimensional hollow shaft ultrasonic flaw detection method described above.

[0165] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0166] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0167] The above provides a detailed description of a three-dimensional hollow shaft ultrasonic flaw detection method and apparatus provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of this application.

Claims

1. A three-dimensional hollow shaft ultrasonic flaw detection method, characterized in that, include: During the process of performing a helical scan along the interior of the hollow shaft, ultrasonic data is acquired. The ultrasonic data includes probe axial displacement, probe rotation angle, helical pitch, ultrasonic path, hollow shaft wall thickness, hollow shaft inner radius, and ultrasonic echo amplitude. The axial coordinates are calculated using computer graphics technology based on the probe's axial displacement, the probe's rotation angle, and the helical pitch. Based on the ultrasonic path, the probe rotation angle, the hollow shaft wall thickness, and the hollow shaft inner cavity radius, the radial plane coordinates of the same scanning point are calculated. The radial plane coordinates and the axial coordinates together constitute a three-dimensional coordinate point. The ultrasonic echo amplitude is then correlated with the three-dimensional coordinate point to form a three-dimensional image reflecting the internal structure of the hollow shaft in three-dimensional space. Wavelet transform analysis is performed on the ultrasonic echo amplitude in the three-dimensional image to obtain multi-scale amplitude features. Based on a preset defect pattern library, the random forest classification method is used to perform pattern recognition on the multi-scale amplitude features and output the abnormal spatial region. By combining the three-dimensional image with the abnormal spatial region, a three-dimensional morphological opening operation is performed to eliminate noise points and smooth the boundaries, thereby obtaining a three-dimensional defect distribution image. In the three-dimensional defect distribution image, the image area with ultrasonic echo amplitude greater than a preset amplitude threshold is visually enhanced to generate a three-dimensional flaw detection result.

2. The method according to claim 1, characterized in that, The process involves calculating the radial plane coordinates of the same scanning point based on the ultrasonic path, the probe rotation angle, the hollow shaft wall thickness, and the hollow shaft inner cavity radius. These radial plane coordinates, together with the axial coordinates, constitute a three-dimensional coordinate point. The ultrasonic echo amplitude is then correlated with these three-dimensional coordinate points to form a three-dimensional image reflecting the internal structure of the hollow shaft in three-dimensional space. This includes: The ultrasonic path is converted into a radial distance component, and combined with the radius of the hollow shaft cavity, the initial position of the scanning point in the radial direction is obtained; Based on the probe rotation angle, determine the azimuth angle of the scanning point in the radial plane; Based on the initial position and the azimuth angle, calculate the first coordinate and the second coordinate of the scanning point in the radial plane, and the first coordinate and the second coordinate constitute the radial plane coordinates; The axial coordinate and the radial plane coordinate are combined to form a three-dimensional coordinate point in three-dimensional space; Based on the ultrasonic echo amplitude, the three-dimensional coordinate points are adaptively weighted using a histogram equalization method to obtain enhanced point cloud data. Based on the enhanced point cloud data, a triangular mesh surface model is generated using the Poisson surface reconstruction algorithm. Based on the triangular mesh surface model, a three-dimensional image representing the internal structure of the hollow shaft is generated through texture mapping and lighting rendering.

3. The method according to claim 2, characterized in that, The process of generating a 3D image representing the internal structure of the hollow shaft based on the triangular mesh surface model, through texture mapping and lighting rendering, includes: The ultrasonic echo amplitude is converted into image texture data, where the color or grayscale of each texture data point represents an amplitude value. Establish a mapping relationship between each vertex of the triangular mesh surface model and the corresponding position in the image texture data; According to the mapping relationship, the image texture data is attached to the triangular mesh surface model to form a textured triangular mesh model; In the 3D rendering environment, a light source is set for the textured triangular mesh model; Based on the normal direction of each triangle on the triangular mesh surface model, determine the brightness change information of the model surface under the illumination of the light source; Based on the image texture data and the brightness change information, the textured triangular mesh model is rendered to generate a three-dimensional image.

4. The method according to claim 1, characterized in that, The wavelet transform analysis of the ultrasonic echo amplitude in the three-dimensional image yields multi-scale amplitude features. Based on a pre-defined defect pattern library, a random forest classification method is used to perform pattern recognition on the multi-scale amplitude features, outputting anomaly spatial regions, including: The ultrasonic echo amplitude corresponding to each spatial point in the three-dimensional image is decomposed based on multi-resolution wavelet decomposition to obtain amplitude component data at different frequency scales, so as to form multi-scale amplitude features of each spatial point. Descriptive parameters with spatial statistical properties are extracted from the multi-scale amplitude features to construct multi-dimensional feature descriptors for the spatial points; The multidimensional feature descriptor is input into a random forest classifier, which performs feature selection and path decision-making on the multidimensional feature descriptor in parallel using multiple decision trees. The outputs of each decision tree are fused by majority voting to calculate the matching confidence between the multidimensional feature descriptor and various defect feature patterns in the preset defect pattern library; Spatial points with a matching confidence level greater than a preset confidence threshold are marked as candidate defect points, and all candidate defect points are clustered and merged based on spatial continuity to form abnormal spatial regions.

5. The method according to claim 1, characterized in that, The step of combining the three-dimensional image with the abnormal spatial region and performing a three-dimensional morphological opening operation to eliminate noise points and smooth boundaries to obtain a three-dimensional defect distribution image includes: Based on the location of the abnormal spatial region in the three-dimensional image, all abnormal points are marked to form an initial marked image, wherein abnormal points are represented by a first mark value and other points are represented by a second mark value; A three-dimensional processing template is set, which has a fixed size and shape. The size of the three-dimensional processing template is determined based on the scanning accuracy and noise level. In the initial marked image, erosion processing is performed on each point: taking the current point as the center, the marked values ​​of all points within the coverage area of ​​the three-dimensional processing template are checked. If the marked values ​​of all points within the coverage area are the first marked value, the marked value of the current point is kept as the first marked value; otherwise, the marked value of the current point is modified to the second marked value to obtain the eroded marked image. In the erosion-marked image, the distribution of marker values ​​is adaptively smoothed based on a bilateral filtering algorithm to obtain a smoothed erosion-marked image; In the smoothed erosion mark image, dilation processing is performed on each point: if the mark value of the current point is the first mark value, then with the current point as the center, the mark values ​​of all points within the range covered by the three-dimensional processing template are set to the first mark value to obtain the dilated mark image; Based on the dilated marker image, a region growing algorithm is used, with the point whose marker value is the first marker value as the seed point, and growing is performed according to the preset spatial neighborhood conditions. Spatially adjacent regions that meet the preset amplitude similarity threshold are merged to form a merged marker image, and a three-dimensional defect distribution image is generated based on the merged marker image.

6. The method according to claim 1, characterized in that, The step of calculating the axial coordinates using computer graphics technology based on the probe's axial displacement, the probe's rotation angle, and the helical pitch includes: Based on the probe's axial displacement and the spiral pitch, a basic position sequence for the probe's advance along the hollow shaft axis is established. Based on the probe rotation angle, each basic position in the basic position sequence is superimposed with a circumferential offset caused by the rotation, wherein the circumferential offset is obtained by converting the rotation angle into a scaling factor and multiplying it by the helical advance pitch; Using linear interpolation methods in computer graphics, the superimposed position sequences are smoothly connected to generate axial coordinate curves; Based on the axial coordinate curve, the axial coordinates of each scanning point in three-dimensional space are determined.

7. The method according to claim 1, characterized in that, After generating the 3D flaw detection results, the following is also included: Based on the area points within the normal range in the three-dimensional flaw detection results, a normal sample set is established, and the spatial distribution boundary of the normal samples is determined based on the support vector description method. Abnormal spatial points located outside the spatial distribution boundary are identified and denoted as outliers. Spatial clustering is performed on the outliers to obtain a set of suspicious regions; For each suspicious region in the set of suspicious regions, calculate the corresponding volume, center point location, average amplitude value of internal points, and amplitude distribution variance to obtain the spatial feature data of each suspicious region; Based on the spatial feature data, a fuzzy logic system is used to assess the probability of defects in each suspicious area and generate a defect confidence score for each suspicious area. Select target suspicious areas with a defect confidence score greater than a preset score threshold from all suspicious areas as defect areas to be confirmed, and output a structured report for defect review.

8. A three-dimensional hollow shaft ultrasonic flaw detection device, characterized in that, include: The acquisition module is used to acquire ultrasonic data during the process of the ultrasonic probe performing a helical scan along the interior of the hollow shaft. The ultrasonic data includes the probe axial displacement, probe rotation angle, helical pitch, ultrasonic path, hollow shaft wall thickness, hollow shaft inner radius, and ultrasonic echo amplitude. The calculation module is used to calculate the axial coordinates based on the probe's axial displacement, the probe's rotation angle, and the helical pitch using computer graphics technology. The forming module is used to calculate the radial plane coordinates of the same scanning point based on the ultrasonic path, the probe rotation angle, the hollow shaft wall thickness and the hollow shaft inner cavity radius. The radial plane coordinates and the axial coordinates together constitute a three-dimensional coordinate point, and the ultrasonic echo amplitude is correlated with the three-dimensional coordinate point to form a three-dimensional image reflecting the internal structure of the hollow shaft in three-dimensional space. The analysis module is used to perform wavelet transform analysis on the ultrasonic echo amplitude in the three-dimensional image to obtain multi-scale amplitude features. Based on a preset defect pattern library, the random forest classification method is used to perform pattern recognition on the multi-scale amplitude features and output the abnormal spatial region. The elimination module is used to combine the three-dimensional image with the abnormal spatial region, perform a three-dimensional morphological opening operation to eliminate noise points and smooth the boundaries, and obtain a three-dimensional defect distribution image. The enhancement module is used to visually enhance image areas in the three-dimensional defect distribution image where the ultrasonic echo amplitude is greater than a preset amplitude threshold, thereby generating three-dimensional flaw detection results.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the three-dimensional hollow shaft ultrasonic flaw detection method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, enables the implementation of the three-dimensional hollow shaft ultrasonic flaw detection method as described in any one of claims 1 to 7.