Two-dimensional ultrasound reference matrix reconstruction method based on edge penalty and residual smoothing

By explicitly identifying high-energy anomaly regions and fusing local reference fragments, the artifact problem of background response in complex woven structures is solved, enabling more accurate defect identification and quantitative analysis. This method is applicable to ultrasonic testing of complex structural components.

CN122368053APending Publication Date: 2026-07-10GRADUATE SCHOOL OF CHINA ACADEMY OF ENGINEERING PHYSICS

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GRADUATE SCHOOL OF CHINA ACADEMY OF ENGINEERING PHYSICS
Filing Date
2026-06-05
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

In the detection of complex woven structures, existing ultrasonic imaging methods often exhibit background responses that appear as striped, textured, or blocky structural artifacts, reducing the contrast between defects and the background. Furthermore, it is difficult to obtain a stable reference background when there is insufficient defect-free baseline data.

Method used

By explicitly identifying high-energy abnormal regions in the ultrasound matrix to be detected, an explicit defect mask is constructed by combining connected component screening, morphological shaping, and region expansion. The most similar reference fragments in the local area are retrieved from the normal reference matrix library for reconstruction and fusion. Local reference reconstruction is performed along the column and row directions respectively, and background reconstruction is performed using edge penalty and residual smoothing techniques.

Benefits of technology

It improves the background representation ability and defect enhancement effect under complex structural background conditions, enhances the accuracy and stability of defect identification and quantitative analysis, and reduces the dependence on detection conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122368053A_ABST
    Figure CN122368053A_ABST
Patent Text Reader

Abstract

This invention provides a two-dimensional ultrasonic reference matrix reconstruction method based on edge penalty and residual smoothing, belonging to the field of ultrasonic nondestructive testing data processing. The method includes: acquiring the ultrasonic data matrix to be tested and a normal reference matrix of the target; processing the ultrasonic data matrix to be tested to generate an energy intensity matrix; within a preset reference region, estimating the upper limit of background energy based on the energy intensity matrix using quantile seed thresholds and median absolute deviation, generating an adaptive energy mask, and then constructing an effective sampling point set using robust outlier removal rules; performing block processing on the ultrasonic data matrix to be tested based on two-dimensional blocks of different sizes in two directions to obtain reconstruction results in the first and second directions; calculating the average matching similarity in the first and second directions respectively, and then weighted and fused the reconstruction results in the two directions to obtain the desired reference matrix. This invention can improve the structural background suppression effect and the reliability of defect enhancement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of ultrasonic nondestructive testing data processing technology, and particularly relates to a two-dimensional ultrasonic reference matrix reconstruction method based on edge penalty and residual smoothing. Background Technology

[0002] In nondestructive testing of composite materials, ultrasonic testing is widely used due to its sensitivity to internal defects and strong engineering applicability. Phased array ultrasonic technology, in particular, and its imaging method combined with synthetic aperture focusing technology, can improve detection efficiency and imaging resolution through time-delay focusing, electronic scanning, and coherent superposition of multi-location data. However, for objects with complex woven structures, ultrasonic imaging results often include not only the actual defect response but also a background response formed by the woven texture, interface scattering, multiple reflections, and coupled fluctuations. These background responses easily manifest as striped, textured, or blocky structural artifacts, thereby reducing the contrast between the defect and the background and adversely affecting subsequent defect identification and quantitative evaluation.

[0003] Existing ultrasound background estimation methods typically employ global filtering, uniform threshold segmentation, or simple averaging to construct a reference background. While these methods can suppress noise to some extent, they still have significant limitations for ultrasound matrices with substantial structural backgrounds and local high-energy anomalous responses. First, if explicit isolation of anomalous regions is lacking during background estimation, the defective regions themselves will directly participate in background construction, leading to contamination of the reconstruction results by anomalous responses. Second, relying solely on global smoothing or uniform thresholding makes it difficult to fully utilize reference segments in the normal sample library that are more similar to the local background. Third, the structural textures of complex composite materials often exhibit directionality and spatial non-uniformity, making it difficult to obtain a stable reference background using single-direction or single-scale processing methods.

[0004] Furthermore, in practical engineering, it is often difficult to obtain defect-free baseline data that corresponds one-to-one with the component to be inspected, thus limiting the applicability of methods based on baseline difference of the same component. In contrast, if high-energy anomalous regions can be explicitly identified in the matrix to be inspected, and after these regions are removed, the most similar local segments are selected from a normal reference sample library to reconstruct the background, it is more likely to obtain a stable reference matrix without relying on the baseline of the same component. Therefore, it is necessary to propose a new ultrasonic reference matrix reconstruction method to improve background suppression and defect enhancement effects under complex structural background conditions. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a two-dimensional ultrasound reference matrix reconstruction method based on edge penalty and residual smoothing. This method explicitly identifies high-energy anomaly regions in the ultrasound matrix to be detected and constructs a strong defect mask by combining connected component filtering, morphological shaping, and region expansion. During background reconstruction, suspected defect regions are removed from similarity matching. Simultaneously, the most similar local reference segments are retrieved from the normal reference matrix library along both column and row directions and reconstructed and fused. This reduces the contamination of the background reference construction by anomaly regions, improves background representation and defect enhancement under complex structural background conditions, and ultimately enhances the accuracy and stability of defect identification and quantitative analysis in ultrasound detection.

[0006] To achieve the above objectives, this invention discloses a two-dimensional ultrasonic reference matrix reconstruction method based on edge penalty and residual smoothing, which includes the following steps: S1. Obtain the ultrasound data matrix and normal reference matrix of the target to be tested; S2. Process the ultrasound data matrix to be tested to generate an energy intensity matrix and a gradient intensity matrix; S3. Within the preset reference area of ​​the ultrasound data matrix to be detected, the upper limit of the background energy is estimated based on the energy intensity matrix by using the quantile seed threshold and the median absolute deviation to generate an adaptive energy mask; S4. Construct an effective set of sampling points by combining an adaptive energy mask and a robust outlier removal rule; S5. In the first direction, the ultrasound data matrix to be detected is divided into blocks based on two-dimensional blocks of the first size, and dual-source prediction and edge penalty fusion are performed using effective sampling points, combined with the normal reference matrix library and the non-local region of the ultrasound data matrix to be detected, to obtain the reconstruction result in the first direction. S6. In the second direction, the ultrasound data matrix to be detected is divided into blocks based on two-dimensional blocks of the second size. Using effective sampling points, combined with the normal reference matrix library and the non-local region of the ultrasound data matrix to be detected, dual-source prediction and edge penalty fusion are performed to obtain the reconstruction result in the second direction. S7. Calculate the matching similarity of each two-dimensional block during the reconstruction process in the two directions, and calculate the average matching similarity of the first and second directions respectively. After weighted fusion of the reconstruction results of the two directions based on the average matching similarity, hard constraint correction is performed on the positions that violate the background energy constraint to obtain the reconstruction reference matrix.

[0007] Furthermore, the second-direction reconstruction process of S6 also includes differentiated constraint strategies for the near-field region, such as increasing the minimum effective data threshold, reducing the non-local search radius, or increasing the edge penalty coefficient.

[0008] Furthermore, S1 includes: S11: Use an ultrasonic phased array probe to perform a global linear scan of the target under test, acquire echo data from multiple positions, angles and depths, and save it as raw matrix data according to the corresponding index; S12: Based on the principle of superposition of synthetic aperture and time delay, the original matrix data acquired by the ultrasonic phased array probe is processed to obtain the mapping matrix of the data to be measured; S13: The acquired signals are processed using Synthetic Aperture Focusing (SAFT) technology and coherent superposition to form the ultrasonic data matrix to be tested. And the normal reference matrix library.

[0009] Furthermore, S2 includes: S21: Perform absolute value transformation and energy normalization on the ultrasound data matrix to be tested to generate an energy intensity matrix; S22: Apply gradient operators to the ultrasound data matrix to be tested to obtain horizontal and vertical gradients and generate a gradient intensity matrix.

[0010] Furthermore, S3 includes: S31: Extract an energy sample set within a preset reference region; S32: Calculate the quantile seed threshold based on quantile statistics; S33: Construct a set of background candidate samples; S34: Calculate the median and median absolute deviation on the background candidate sample set to obtain the background fluctuation scale; S35: Obtain the maximum background energy; S36: Generate an adaptive energy mask based on the upper limit of background energy. ; in, Indicates position (This can be used as a valid background point to participate in subsequent 2D block matching.) Indicates position It does not participate in subsequent 2D block matching. This represents the upper limit of background energy.

[0011] Furthermore, S4 includes: S41: Based on the adaptive energy mask, retain the effective positions of the background to form an initial set of effective points; S42: To avoid local extreme points affecting similarity calculation, robust outlier detection is performed on the data; S43: Construct the final set of valid points based on the adaptive energy mask and robust outlier removal results.

[0012] Furthermore, S5 includes: S51. In the first direction, perform two-dimensional block sliding segmentation on the ultrasound data matrix to be tested; for each two-dimensional block, use the effective sampling points to perform similarity matching with the corresponding candidate reference blocks in the normal reference matrix library and the candidate reference blocks in the non-local region inside the ultrasound matrix to be tested; perform block-level fusion on the top several reference blocks with the highest similarity in the library source candidate blocks and non-local candidate blocks to obtain the library source prediction block and non-local prediction block; if the number of data points at the effective position in the current two-dimensional block is lower than the preset minimum number of effective data points, then use the mean block of the normal reference matrix library at the corresponding position as the back-down prediction block; accumulate and average the reconstruction results of each two-dimensional block according to the overlapping area to obtain the reconstruction result in the first direction; S52. Apply edge penalty to the prediction substitution intensity corresponding to the base prediction block or the fusion weight of the source prediction block and the non-local prediction block based on the gradient intensity of the current two-dimensional block to obtain the prediction block of the current two-dimensional block. After smoothing, inject the residual between the prediction block and the original two-dimensional block into the original two-dimensional block proportionally to obtain the reconstruction block of the current two-dimensional block. Accumulate and average the reconstruction results of each two-dimensional block according to the overlapping area to obtain the reconstruction result in the first direction.

[0013] Furthermore, S51 includes: S511: In the first direction, perform two-dimensional block sliding segmentation on the ultrasound data matrix to be tested; S512: For each 2D block, construct an effective pixel set within that block using an adaptive energy mask and robust outlier removal, and calculate the similarity between the current 2D block and the library source candidate reference blocks; sort all library source candidate reference blocks by similarity from largest to smallest, and select the top... The candidate reference blocks are fused to obtain the source prediction block; S513: For each two-dimensional block, search for non-local candidate reference blocks within the ultrasound matrix to be detected, and filter out valid non-local candidate reference blocks whose mean difference is less than or equal to a preset threshold; calculate the similarity at the common valid positions of the current two-dimensional block and the valid non-local candidate reference blocks, and select the top... The candidate reference blocks are fused to obtain a nonlocal prediction block; S514: Determine the dual-source basic fusion weights based on the maximum similarity between the source prediction block and the non-local prediction block, and obtain the basic prediction block of the current two-dimensional block.

[0014] Furthermore, S52 includes: S521: Calculate the average edge strength on the valid data set of the current 2D block: ; in, This is the valid data set for the current two-dimensional block. The gradient intensity of the two-dimensional block; For grid indexing; S522: Construct an edge penalty factor based on the average edge strength, which is used to modulate the predicted substitution strength or the fusion weight of the library source prediction block and the non-local prediction block. ; in, The average edge strength of the current 2D block. This is the edge penalty coefficient, and the edge penalty factor decreases as the average edge strength increases; S523: Adjust the basic prediction process according to the edge penalty factor to obtain the prediction block of the current two-dimensional block; S524: Calculate the residual between the predicted block and the original 2D block; S525: Smooth the residuals; S526: Inject the smoothed residuals proportionally into the original 2D block to obtain the reconstructed block of the current 2D block; S527: The reconstruction results of each two-dimensional block are accumulated and averaged according to the overlapping areas to obtain the reconstruction result in the first direction.

[0015] Furthermore, S7 includes: S71: Calculate the matching similarity of each two-dimensional block during the reconstruction process in two directions, calculate the average matching similarity of the first direction and the average matching similarity of the second direction respectively, and determine the directional fusion weight based on the average matching similarity of the two directions. ; ; in, The average vertical similarity is calculated for all two-dimensional blocks. The average horizontal similarity is calculated for all two-dimensional blocks. For vertical fusion weights, This refers to the horizontal fusion weights.

[0016] S72: Weighted fusion of the reconstruction results from the first and second directions yields the final reconstructed reference matrix. : ; in, For the final reference matrix, and The images show the reconstruction results for the first and second directions, respectively.

[0017] Compared with the prior art, the present invention has at least the following beneficial effects: 1. This invention explicitly identifies high-energy abnormal regions in the ultrasound matrix to be detected, and constructs an explicit defect mask by combining connected component screening, morphological shaping and region expansion. This effectively eliminates suspected defect regions during local matching, preventing abnormal responses from directly participating in the background reference construction, thereby improving the ability of the reference matrix to express normal structural backgrounds.

[0018] 2. This invention performs background reconstruction on the matrix to be detected by retrieving the reference fragment most similar to the current local region from the normal reference matrix library. This overcomes the shortcomings of simple smoothing or overall averaging methods in representing complex local textures, and helps to improve the accuracy and stability of local background restoration.

[0019] 3. This invention performs local reference reconstruction along the column and row directions respectively, and performs adaptive fusion based on the matching stability of the two directions, thereby making fuller use of the structural texture features in different directions of complex composite materials, reducing the reconstruction deviation in a single direction, and improving the robustness of the overall reconstruction results.

[0020] 4. This invention constructs a background reference matrix using a normal reference sample library, eliminating the need to acquire defect-free baseline data corresponding one-to-one with the component to be inspected. This reduces dependence on inspection conditions and is suitable for practical engineering inspection scenarios involving complex structural components. The reconstructed reference matrix can more accurately represent the normal background, providing a more reliable background foundation for subsequent differential mapping, anomaly enhancement, defect boundary extraction, and quantitative evaluation, thereby improving the reliability of defect detection results. Attached Figure Description

[0021] Figure 1 The flowchart shows the two-dimensional ultrasonic reference matrix reconstruction method based on edge penalty and residual smoothing of the present invention. Figure 2 This is a schematic diagram of the sampling point mapping algorithm parameters according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the ultrasonic testing process for a flat panel component according to an embodiment of the present invention; Figure 4 This is an ultrasonic reference matrix imaging diagram of a composite material flat plate according to an embodiment of the present invention; Figure 5 This is a differential defect detection result diagram of a composite material flat plate according to an embodiment of the present invention. Figure 6 This is a graph showing the quantitative results of ultrasonic testing of defects in a composite material flat plate according to an embodiment of the present invention. Detailed Implementation

[0022] The following will refer to the appendix Figures 1-6Exemplary embodiments, features, and aspects of the present invention are described in detail below. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.

[0023] As attached Figure 1 As shown, this invention provides a two-dimensional block-level ultrasonic reference matrix reconstruction method based on edge penalty and residual smoothing injection, which is applicable to the processing of phased array ultrasonic testing data of composite plate components.

[0024] This method robustly estimates the background energy distribution in the ultrasound matrix to be tested using statistical methods, constructs a mask for selecting effective background points, and filters reliable background sampling points at the two-dimensional block scale by combining outlier removal. Simultaneously, it retrieves locally highly similar candidate reference blocks from both a normal reference matrix library and the non-local regions (referring to the areas near the physical locations of the selected two-dimensional blocks) within the ultrasound matrix to be tested. Block-level fusion of these two types of candidate reference blocks yields a predicted block. Furthermore, it penalizes the predicted substitution intensity or dual-source fusion weights based on the edge strength of the current two-dimensional block to suppress excessive substitution in structural edge regions. Based on this, it calculates the residual between the predicted block and the original two-dimensional block, smooths the residual, and injects it proportionally into the original two-dimensional block. This achieves background reference reconstruction while preserving normal structural details, thereby improving the background representation ability, edge preservation ability, and defect enhancement effect under complex structural background conditions, and ultimately enhancing the accuracy and stability of defect identification and quantitative analysis in ultrasound testing.

[0025] S1. Obtain the ultrasound data matrix and normal reference matrix of the target object, specifically including: S11: Use an ultrasonic phased array probe to perform a global linear scan of the target under test, acquire echo data from multiple positions, angles and depths, and save it as raw matrix data according to the corresponding index; The target of the ultrasonic phased array probe is a composite material component, preferably a 3D woven composite material component. (See attached image) Figure 3 As shown, the detection system uses a phased array ultrasonic probe for linear mechanical scanning. The probe moves stepwise along the scanning direction and emits multiple ultrasonic beams at different angles at each position to acquire raw echo signals from multiple angles, positions, and depths. Specifically, taking a cuboid component as an example, the probe performs nested scanning movement with the length direction of the component as the main scanning direction and the width direction as the secondary scanning direction. The probe moves stepwise along the main scanning direction and emits ultrasonic beams at each position. After completing the traversal of the main scanning direction, it moves one interval along the secondary scanning direction, and this cycle continues until the surface of the cuboid to be scanned is covered, thereby acquiring raw echo signals from multiple positions, angles, and depths to achieve global scanning.

[0026] In this embodiment, the original echo signal can be denoted as: in, This serves as an index for the movement position of the phased array probe along the scanning path. For the sector sweep index of the phased array probe, Index of sampling points in the depth direction inside the component.

[0027] In a preferred embodiment, the probe center frequency can be set to 5MHz to 10MHz, the scanning step size to 0.5mm to 1.0mm, and the sector scanning angle range can be set according to the specimen thickness, detection depth, and acoustic beam coverage. For example, with a probe center frequency of 5MHz, a step size of 0.5mm, a sector scanning range of -10° to 10°, and a time axis resolution of 0.01µs. For normal specimens and specimens under test, it is preferable to use consistent transmission and reception parameters, scanning step size, and imaging parameters. The determination of imaging parameters is related to the sampling parameters of the device and the encoder step size to improve the comparability between the normal reference matrix library and the ultrasonic data matrix under test. Taking a sound velocity of 10mm / µs as an example, the time axis resolution is 0.01µs, the encoder step size is 0.02mm; the grid imaging parameters are a horizontal grid width of 0.02mm and a vertical grid width of 10 x 0.01 = 0.1mm; the grid size is the sound velocity x time interval in the vertical direction (unit: mm); and equal to the encoder step size in the horizontal direction.

[0028] S12: Based on the principle of synthetic aperture and time delay superposition, the raw matrix data acquired by the ultrasonic phased array probe is processed to obtain the mapping matrix of the data to be measured. .

[0029] Calculate the physical coordinates of the sampling point: in, This serves as an index for the movement position of the phased array probe along the scanning path. For the sector sweep index of the phased array probe, Index of sampling points in the depth direction inside the component. The distance is in the depth direction. This represents the distance the probe moves. It refers to the fan sweep angle, as shown in the attached image. Figure 2 As shown.

[0030] In this embodiment, Possible forms: in, The initial distance in the depth direction. The sampling interval is in the depth direction. Index of sampling points in the depth direction inside the component.

[0031] Calculate the mapped mesh cell index corresponding to the physical coordinate position: in, and ... It is 1 / 12mm. It is 1mm. x and y are as described above. .

[0032] Coherent superposition of signal information at the same mapping unit, i.e., the same grid index: in, To map to grid cells The set of sampling points This represents the echo amplitude at the corresponding sampling point.

[0033] The mapping matrix of the ultrasound data to be tested is obtained by calculating based on the synthetic aperture focusing technique SAFT and the principle of coherent superposition. .

[0034] It should be noted that the method of this invention is based on a slice of the target to be tested. That is, along the scanning path of the phased array probe of the target under test, the target body is sliced ​​to obtain several slices that are parallel to each other and perpendicular to the scanning path direction, for example, i is the slice depth direction; subsequent data acquisition and reconstruction processing are performed on each slice to obtain the reconstruction reference matrix of this slice, and the combination forms the reconstruction reference matrix of the target under test.

[0035] For one slice, each time the phased array probe moves along the scanning path, it assigns a value to each grid within its sector scanning angle range. Therefore, when the phased array probe has moved along the scanning path, the number of data in each grid is actually different. The coherent superposition of signal information with the same grid index is to superimpose all the data in this grid.

[0036] S13: The acquired signals are processed using Synthetic Aperture Focusing (SAFT) technology and coherent superposition to form the ultrasonic data matrix to be tested. and normal reference matrix library .

[0037] Ultrasound data matrix to be tested This is an ultrasound data matrix containing the target abnormal or defective region; the normal reference matrix library is constructed from standard test blocks without defects using the same scanning area processing method described above. Standard test blocks are generally high-standard, defect-free parts with the same manufacturing process, thickness, and material.

[0038] In this embodiment, the number of samples in the normal reference matrix library is preferably between 10 and 100. Too few samples will result in insufficient normal background prior, while too many samples will increase the computational burden of candidate search and matching.

[0039] S2. Process the ultrasound data matrix to be tested to generate an energy intensity matrix and a gradient intensity matrix; including the following steps: S21: Perform absolute value transformation and energy normalization on the ultrasound data matrix to be tested to generate an energy intensity matrix.

[0040] To measure data intensity, we first construct an energy intensity matrix: in, Let X be the absolute value of the mapped data in the matrix to be tested. The normalized energy intensity matrix satisfies . The minimum value in the matrix X of the current slice. The maximum value in the matrix X of the current slice, ( ) is a position index.

[0041] The energy intensity matrix is ​​used to characterize the relative energy intensity at each position in the ultrasound matrix to be detected. In practical implementation, to avoid the denominator being zero, a very small positive number can be added to the denominator. . The preferred value is to .

[0042] S22: Apply gradient operators to the ultrasound data matrix to be tested to obtain horizontal and vertical gradients and generate a gradient intensity matrix.

[0043] Simultaneously with generating the energy intensity matrix, gradient calculations are performed on the ultrasound data matrix to be detected, constructing a gradient intensity matrix. The gradient intensity matrix is ​​used to characterize the intensity of local structural edges, texture abrupt changes, and response variations.

[0044] Horizontal gradient Vertical gradient Gradient intensity matrix: in, It is the gradient operator in the horizontal direction. It is the gradient operator in the vertical direction.

[0045] gradient The Sobel operator is preferred. The reason is that the Sobel operator has a certain smoothing effect while calculating the local first-order difference, and can reflect the intensity of edge and texture changes in ultrasound images relatively stably, making it suitable for scenes with speckle and directional textures in composite material backgrounds.

[0046] The physical significance of constructing the gradient intensity matrix lies in the fact that when a certain two-dimensional block used in subsequent steps has obvious structural boundaries, abrupt texture changes, or strong local reflection variations, its corresponding gradient intensity will increase. This phenomenon indicates that the local structure of that region is more complex. If the predicted block is directly used to replace the original block, it is easy to cause edge blunting, loss of texture details, or block boundary artifacts. Therefore, this invention uses the gradient intensity matrix to adjust the predicted replacement intensity, making the reconstruction process more conservative in structural edge regions.

[0047] S3. Within the preset reference area of ​​the ultrasound data matrix to be detected, the upper limit of the background energy is estimated based on the energy intensity matrix through the quantile seed threshold and the median absolute deviation, and an adaptive energy mask is generated.

[0048] Within a preset reference region, the upper limit of background energy is estimated based on the statistical distribution of the energy intensity matrix, forming a background effective point selection mask. The preset reference region is a pre-specified row segment region in the ultrasound data matrix to be tested. Background energy upper limit estimation is performed only within this row segment region to avoid the near-field region affecting the background statistical results. The principle for specifying the row segment region can be to exclude the time axis from 0 to 2 µs, focusing only on the subsequent region. This is because, empirically, the near-field region, due to probe coupling and probe physical properties causing amplitude oversaturation, cannot transmit effective information and is therefore not considered as valid data for subsequent calculations.

[0049] S31: Extract an energy sample set within a preset reference region: in, It is a specified row segment region, representing the non-near field region, where N is the total number of rows in the grid. The normalized energy intensity matrix in S21 satisfies .

[0050] S32: Calculate the quantile seed threshold based on quantile statistics: Among them, quantile parameter The preferred value range is 0.75 to 0.95, and more preferably 0.85 to 0.90.

[0051] when When the value is too low, the number of background candidate samples is insufficient, and the statistical results are prone to being overly conservative; when When the value is too high, some high-energy outliers may be included in the background candidate set, thus inflating the background scale estimation result. A value close to 0.90 is preferred, as it balances the number of background samples and the anomaly suppression effect. This is a well-known function and will not be elaborated further here.

[0052] S33: Construct a set of candidate background samples.

[0053] .

[0054] S34: Calculate the median on the background candidate sample set. and median absolute deviation The background fluctuation scale is obtained.

[0055] median ; absolute deviation of median ; Background fluctuation scale S35: Obtain the maximum background energy. .

[0056] The upper limit of background energy is used to distinguish between high-energy anomaly regions and the effective background region. : That In the middle, energy threshold multiple The preferred value range is 1.5 to 3.0, more preferably 1.8 to 2.5, and in this embodiment, 2.0 is preferred. If the background fluctuation is approximated as a standard normal distribution, then... Corresponding one-sided cumulative retention probability: when At this point, the cumulative probability on one side is approximately 97.72%, meaning that only about 2.28% of high-energy points on the upper side are considered as anomalous candidates and suppressed. This value can suppress high-energy anomalous responses from entering the background modeling process while ensuring a high retention rate of background samples.

[0057] S36: Generate an adaptive energy mask based on the upper limit of background energy. in, This indicates that the location can be used as a valid background point in subsequent 2D block matching. This indicates that the position will not participate in subsequent 2D block matching. The normalized energy intensity matrix in S21.

[0058] The physical significance of adaptive energy masks lies in the fact that in ultrasonic inspection images, high-energy regions often correspond to defect echoes, boundary reflections, coupling anomalies, or localized strong scattering areas. Directly incorporating these locations into the background matching process can easily lead to the inclusion of anomalous information in the reconstructed background. By using the energy upper limit to filter effective background points, normal background response locations can be preferentially retained, allowing subsequent 2D block matching to focus more on stable background structures.

[0059] S4. Construct an effective set of sampling points by combining an adaptive energy mask and a robust outlier removal rule.

[0060] This invention constructs an effective set of sampling points based on an adaptive energy mask and a robust outlier removal rule to further reduce the interference of local spikes and anomalous responses on similarity matching.

[0061] S41: Based on the adaptive energy mask, retain the effective positions of the background to form an initial set of effective points. The effective positions are the set of physical locations of the effective points after removing high-energy values.

[0062] S42: Perform robust outlier detection on the data based on the outlier threshold, and define the local outlier score of the initial valid points to avoid local extreme points affecting subsequent similarity calculations.

[0063] Robust outlier removal includes the following operations: calculating the median of the data. and median absolute deviation Construct a normalized outlier score, assuming the median of the current block of data is . The absolute deviation of the median is Then define the local outlier score. for: S43: Construct the final set of valid points based on the adaptive energy mask and robust outlier removal results.

[0064] If the local background fluctuations approximately follow a standard normal distribution, then the outlier threshold... Corresponding bilateral central coverage probability: when When the corresponding data point is considered a normal background point, it is retained, and the corresponding position is retained as the final valid point; when When this happens, the corresponding data point is considered a local outlier and is removed.

[0065] Among them, outlier threshold The value ranges from 1.5 to 3.0, preferably from 2.0 to 2.5, and in this embodiment, 2.0 is preferred. When At this setting, the two-sided retention probability is approximately 95.45%. This setting can retain the vast majority of normal background sampling points while suppressing a small number of extreme deviation values, thereby improving the robustness of similarity calculation.

[0066] The physical significance of robust outlier removal lies in the fact that even data within the energy range of the background may contain local spikes, random noise, or anomalous scattering points. If these points directly participate in similarity calculations, it can distort the candidate block ranking. By introducing local outlier removal, the effective matching set can be further purified, making the block-level matching results more stable. This step corresponds to the generation of the mask matrix, as shown in the attached diagram. Figure 4 As shown.

[0067] S5. In the first direction, the ultrasound data matrix to be detected is divided into blocks based on two-dimensional blocks of the first size. Using effective sampling points, combined with a normal reference matrix library and the non-local region of the ultrasound data matrix to be detected, dual-source prediction and edge penalty fusion are performed to obtain the reconstruction result in the first direction; specifically including: S51. In the first direction, perform two-dimensional block sliding segmentation on the ultrasound data matrix to be tested; for each two-dimensional block, use the effective sampling points to perform similarity matching with the corresponding candidate reference blocks in the normal reference matrix library and the candidate reference blocks in the non-local region inside the ultrasound matrix to be tested; perform block-level fusion on the top several reference blocks with the highest similarity among the library source candidate blocks and the non-local candidate blocks to obtain the library source prediction block and the non-local prediction block; if the number of data points at the effective position in the current two-dimensional block is lower than the preset minimum number of effective data points, then use the mean block of the normal reference matrix library at the corresponding position as the back-down prediction block; accumulate and average the reconstruction results of each two-dimensional block according to the overlapping area to obtain the reconstruction result in the first direction. Including: S511: In the first direction, perform two-dimensional block sliding segmentation on the ultrasound data matrix to be tested; the set of two-dimensional block indices for the current slice after two-dimensional block sliding segmentation is: in, and Here, p and q are the height and width of the two-dimensional block, respectively, and p and q are the indices of the two-dimensional block.

[0068] In this embodiment, the two-dimensional block size parameter The size is preferably set based on the data texture scale and directional features. When the 2D block size is too small, there is insufficient structural information within the block to characterize the local background texture, making matching susceptible to noise disturbances. When the 2D block size is too large, multiple different structural regions may be covered simultaneously within the block, leading to decreased stability and weakened local matching accuracy. In the embodiments, it is preferable to make the 2D block cover a longer texture range in the main scanning direction and maintain a smaller width in the lateral direction, so as to balance structural expressiveness and local consistency. The embodiments of the present invention adopt the following in the first direction: The size of the two-dimensional block.

[0069] S512: For each 2D block, construct an effective pixel set within that block using an adaptive energy mask and robust outlier removal, and calculate the similarity between the current 2D block and the library source candidate reference blocks: sort all library source candidate reference blocks by similarity from largest to smallest, and select the top... =The three candidate reference blocks are fused to obtain the source prediction block.

[0070] The library source candidate reference block is obtained by extracting the two-dimensional block corresponding to the current two-dimensional block position from the normal reference matrix library.

[0071] Within each two-dimensional block, an effective sampling point dataset is constructed based on an adaptive energy mask and robust outlier removal. The effective sampling points are then used to perform similarity matching with library source candidate reference blocks and non-local candidate reference blocks, respectively, to calculate the similarity between the current two-dimensional block and all library source candidate reference blocks of the normal reference matrix library. Similarity matching uses Spearman's rank correlation coefficient or correlation coefficient as the matching criterion. Similarity is calculated at the common valid locations of the current 2D block and the candidate reference block. These common valid locations are determined by the intersection of the set of valid sample points of the current 2D block and the set of valid sample points of the candidate reference block.

[0072] Sort all candidate reference blocks from library sources by similarity from highest to lowest, and select the top... =The three candidate reference blocks are fused to obtain the source prediction block: in, For the first Individual library source candidate reference blocks The fusion weight.

[0073] In this embodiment, the fusion of library source candidate reference blocks can be performed using either a linear weighting method or a Softmax probabilistic weighting method.

[0074] S513: For each two-dimensional block, search for non-local candidate reference blocks within the ultrasound matrix to be detected, and filter out valid non-local candidate reference blocks whose mean difference is less than or equal to a preset threshold; calculate the similarity at the common valid positions of the current two-dimensional block and the valid non-local candidate reference blocks, and select the top... The candidate reference blocks are fused to obtain the nonlocal prediction block: Search for nonlocal candidate reference blocks within the ultrasound matrix to be detected, and filter them based on the mean difference between the current two-dimensional block and the nonlocal candidate reference blocks at the common effective position; obtain effective nonlocal candidate reference blocks whose mean difference is less than or equal to a preset threshold; Non-local candidate reference blocks are obtained by searching for two-dimensional blocks at different positions from the current two-dimensional block within a preset search radius inside the ultrasound data matrix to be detected. Before calculating the similarity, filtering is performed based on the mean difference between the current two-dimensional block and the candidate reference block at common valid positions; when the mean difference is greater than a preset threshold, the candidate reference block is considered an invalid candidate.

[0075] Calculate the similarity at the common valid locations of the current 2D block and the valid non-local candidate reference blocks, and select the top... The candidate reference blocks are fused to obtain the nonlocal prediction block: Preferably, the similarity calculation method is the same as the similarity calculation in the above steps. Non-local candidate reference blocks that meet the conditions are sorted by similarity, and the top-ranked blocks are selected. The candidate reference blocks are fused to obtain the nonlocal prediction block: in, For the first Fusion weights for non-local candidate reference blocks.

[0076] In this embodiment, the candidate quantity parameter and The preferred value range is 3 to 10, and more preferably 3 to 5. Values ​​that are too small will result in insufficient utilization of candidate redundancy; values ​​that are too large may introduce more low-quality candidates, increasing computational load and weakening prediction stability.

[0077] Furthermore, before calculating the similarity of non-local candidate reference blocks, filtering is performed based on the mean difference between the current 2D block and the candidate reference block at common valid positions. When the mean difference is greater than a preset threshold, the candidate reference block is considered an invalid candidate. The mean difference filtering threshold is preferably set according to the normalized amplitude range, preferably ranging from 0.01 to 0.10, and more preferably from 0.02 to 0.05.

[0078] The physical significance is that even if two 2D blocks have a certain similarity in texture arrangement, if the average response level of their common effective region differs too much, it usually indicates that they originate from different attenuation levels, different coupling states, or different local structural backgrounds. Mean difference filtering can reduce nonlocal mismatches that are "similar in form but different in value".

[0079] S514: Determine the dual-source basic fusion weights based on the maximum similarity between the source prediction block and the non-local prediction block, and obtain the basic prediction block of the current two-dimensional block.

[0080] Dual-source basic fusion weights: Basic prediction block : in, The maximum similarity of the two-dimensional blocks corresponding to the reference library; The maximum similarity of two-dimensional blocks corresponding to non-local regions; The weights corresponding to the reference library; The weights are for non-local regions.

[0081] Furthermore, it is determined whether the number of valid data in the current two-dimensional block is lower than the preset minimum number of valid data. If so, the mean block of the current two-dimensional block is reverted to the mean block of the normal reference matrix library at the corresponding position as the prediction block.

[0082] The minimum effective data threshold is preferably set to 10% to 30% of the total data in the two-dimensional block, more preferably 15% to 20%. If the effective data is too small, the similarity estimation lacks statistical stability. In this case, using library mean block backoff can improve the robustness of the results.

[0083] S52. Apply edge penalty to the prediction substitution intensity corresponding to the base prediction block or the fusion weight of the source prediction block and the non-local prediction block based on the gradient intensity of the current two-dimensional block to obtain the prediction block of the current two-dimensional block. After smoothing, inject the residual between the prediction block and the original two-dimensional block into the original two-dimensional block proportionally to obtain the reconstruction block of the current two-dimensional block. Accumulate and average the reconstruction results of each two-dimensional block according to the overlapping area to obtain the reconstruction result in the first direction.

[0084] After obtaining the base prediction block of the current 2D block, edge penalties are applied to the prediction substitution intensity or dual-source fusion weights based on the gradient intensity of the current 2D block to obtain the prediction block; then, the residual between the prediction block and the original 2D block is calculated, the residual is smoothed, and injected proportionally into the original 2D block to obtain the reconstructed block of the current 2D block. Specifically, this includes: S521: Calculate the average edge strength on the valid data set of the current 2D block: in, This is the valid data set for the current two-dimensional block. Let be the gradient intensity of the two-dimensional block.

[0085] S522: Construct the edge penalty factor based on the average edge strength: in, The average edge strength of the current 2D block. This is the edge penalty factor, which decreases as the average edge strength increases. The edge penalty factor is used to modulate the prediction substitution strength or the fusion weight between the modulation library source prediction block and the nonlocal prediction block.

[0086] Edge penalty coefficient The value used to control the degree to which the gradient intensity suppresses the predicted substitution intensity is preferably in the range of 1 to 10, more preferably 4 to 8. In the embodiments, a value of 6 is preferred. When When the edge strength is small, its impact on the predicted replacement process is weak, and the algorithm is closer to ordinary block-level fusion; when When the value is large enough, the predicted substitution in areas with strong edges will be significantly suppressed, which is more conducive to preserving local structural edges and texture details. However, if it is too large, the prediction correction effect may be insufficient. Therefore, the above range is preferred to balance edge preservation and background reconstruction.

[0087] The physical meaning of the edge penalty factor is that a larger gradient indicates that the current 2D block is more likely to be located in a region of structural boundary, texture transition, or drastic echo change. In these regions, directly replacing the original block with a large predicted block can easily smooth out normal boundary details. Therefore, edge penalty automatically weakens the predicted replacement intensity in these regions, thereby preserving the original structural information while reconstructing the background.

[0088] S523: Adjust the basic prediction process according to the edge penalty factor to obtain the prediction block of the current two-dimensional block.

[0089] The basic prediction process can be adjusted based on the marginal penalty factor in one of the following ways: First, the predicted substitution intensity is attenuated overall, thereby reducing the predicted substitution level in the marginal strong regions; Secondly, the fusion weights of the source prediction block and the non-local prediction block are modulated to reduce the dependence of the prediction results in the edge strong regions.

[0090] In a preferred embodiment, the predicted block of the current two-dimensional block can be represented as: in, This is the original data block for the current two-dimensional block.

[0091] S524: Calculate the residual between the predicted block and the original 2D block: S525: Smooth the residuals: in, The standard deviation is A two-dimensional Gaussian smoothing kernel. Smoothing parameters. The preferred value range is 0.3 to 2.0, more preferably 0.5 to 1.0. When When the value is too small, it is insufficient to suppress sharp local changes in the residuals; when If the size is too large, it may cause excessive diffusion of details between blocks. It is preferable to use a smaller Gaussian smoothing kernel to achieve gentle smoothing of the prediction residuals.

[0092] The physical significance of residual smoothing injection lies in the fact that this invention does not directly replace the original block with the predicted block, but only smooths the differences between the predicted block and the original block, and injects it into the original block at a controlled ratio. This approach is essentially a "mild repair," which can reduce block stitching artifacts, avoid excessive smoothing of edge regions, and enhance tolerance to local mismatches.

[0093] S526: Inject the smoothed residuals proportionally into the original 2D block to obtain the reconstructed block of the current 2D block: in, Let be the residual injection coefficient. It satisfies: .

[0094] Residual injection coefficient The preferred value range is 0.2 to 0.8, more preferably 0.4 to 0.6, and in this embodiment, 0.5 is preferred. When When no residual injection is performed, the reconstruction result completely preserves the original block; when When the value is 0.5, it is equivalent to fully accepting the smoothed prediction correction; when it is in the middle range, it can achieve a balance between preserving the original structure and background correction. A value of approximately 0.5 is preferred, as it can suppress the effects of anomalies while retaining more normal details.

[0095] S527: The reconstruction results of each two-dimensional block are accumulated and averaged according to the overlapping areas to obtain the reconstruction result in the first direction.

[0096] S6. In the second direction, the ultrasound data matrix to be detected is divided into blocks based on two-dimensional blocks of the second size. Using effective sampling points, combined with the normal reference matrix library and the non-local region of the ultrasound data matrix to be detected, dual-source prediction and edge penalty fusion are performed to obtain the reconstruction result in the second direction. In the second direction, a two-dimensional block sliding reconstruction process corresponding to the first direction is performed on the ultrasound data matrix to be detected. In addition, for the near-field region, stricter effective data constraints, smaller non-local search range, or stronger edge penalty are adopted to improve robustness in complex regions. The reconstruction results of each two-dimensional block are accumulated and averaged according to the overlapping region to obtain the reconstruction result in the second direction.

[0097] S61: Perform the two-dimensional block matching, prediction, edge penalty and residual smoothing injection reconstruction process in the second direction, which corresponds to the first direction.

[0098] In the second direction, it can be adopted The size of the two-dimensional block.

[0099] S62: Differentiated constraint strategies are adopted for near-field and non-near-field regions. If the current 2D block is located in the near-field region, the minimum effective data threshold is increased, the non-local search radius is reduced, or the edge penalty coefficient is increased.

[0100] The near-field region typically exhibits stronger coupling fluctuations, mode transitions, near-surface echoes, and non-stationary background variations, resulting in lower background stability compared to the far-field region. Therefore, this invention employs a differentiated control strategy in the near-field region.

[0101] The minimum effective data threshold amplification factor for the near field is preferably in the range of 1.2 to 3.0, more preferably 1.5 to 2.5, and preferably 2 in this embodiment. The physical meaning is that if the near-field block relies on only a small amount of effective data for matching, it is more susceptible to interference from local unstable responses. Therefore, by increasing the effective data requirement, the reliability of near-field matching can be improved.

[0102] The near-field nonlocal search radius reduction factor is preferably in the range of 1 to 3, more preferably 1.5 to 2.5, and preferably 2 in this embodiment. Its physical significance lies in the fact that the background in the near-field region is highly non-stationary, and candidate blocks that are too far from the current block, even if numerically similar, may not have true background homology. Therefore, narrowing the search range helps improve the reliability of nonlocal candidates.

[0103] The near-field edge penalty enhancement coefficient can be greater than the far-field edge penalty coefficient to further reduce the risk of over-substitution in complex boundary regions.

[0104] S7. Calculate the matching similarity of each two-dimensional block during the reconstruction process in the two directions, and calculate the average matching similarity of the first and second directions respectively. After weighted fusion of the reconstruction results of the two directions based on the average matching similarity, hard constraint correction is performed on the positions that violate the background energy constraint to obtain the reconstruction reference matrix.

[0105] The matching similarity of each two-dimensional block during the reconstruction process in two directions is statistically analyzed, and the average matching similarity of the first direction and the average matching similarity of the second direction are calculated respectively. The directional fusion weight is determined based on the average matching similarity of the two directions. The reconstruction results of the two directions are weighted and fused using the fusion weight to obtain the final reference matrix. Hard constraint correction is applied to the positions that still obviously violate the background energy constraint within the preset reference region.

[0106] S71: Calculate the matching similarity of each two-dimensional block during the reconstruction process in two directions, and calculate the average matching similarity of the first direction and the average matching similarity of the second direction respectively; determine the directional fusion weight based on the average matching similarity of the two directions. in, The average similarity in the first direction is calculated for all two-dimensional blocks. The average similarity in the second direction is calculated for all two-dimensional blocks. The fusion weights for the first direction, This represents the fusion weight for the second direction.

[0107] S72: Merge the reconstruction results from the first and second directions to obtain the final reconstructed reference matrix. .

[0108] Bidirectional matrix fusion: in, For the final reference matrix, and These are the reconstruction results for the first and second directions, respectively. When the average matching similarity for both the first and second directions is not greater than zero, the fusion weight for both directions is set to 0.5.

[0109] Furthermore, within the preset reference area, if the energy value at a certain location is still higher than the upper limit of the background energy, the reconstruction result at that location is replaced using the mean map from the normal reference matrix library. like and Then let: Furthermore, the sliding step size of the 2D block is preferably smaller than the size of the 2D block, typically taking 1 / 4 to 1 / 2 of the block height and width, to ensure sufficiently smooth overlapping write-back. If the step size is too large, the connection between blocks will be insufficient, easily producing block artifacts; if the step size is too small, although the smoothness is enhanced, the computational load will increase significantly.

[0110] The physical significance of the hard constraint on the reference region lies in the fact that, theoretically, the normal background response should dominate within the preset reference region. If the reconstruction result still retains significant high-energy anomalies in this region, it indicates that the local prediction or fusion has failed to adequately eliminate the influence of the anomalies. In this case, forced correction of the corresponding positions using the library mean map can further improve the background consistency of the reference matrix.

[0111] After reconstruction of the reference matrix, a clearer background suppression effect and defect enhancement result can be obtained, and the size of component defects can be quantified accordingly.

[0112] In one embodiment, the test object may be a component containing two adjacent artificial defects, both with a diameter of 2.95 mm. For example... Figures 5-6 As shown, after processing by the method of the present invention, this embodiment provides a two-dimensional block-level ultrasonic reference matrix reconstruction method based on edge penalty and residual smoothing injection. By adaptively estimating the upper limit of background energy based on quantile seed threshold and median absolute deviation (MAD) within a preset reference region, a background effective point selection mask is constructed. Furthermore, robust outlier removal rules are combined within the two-dimensional block, enabling reliable background sampling points to participate more stably in subsequent block-level similarity matching, thereby reducing the interference of outliers and high-energy regions on the background reconstruction process.

[0113] (1) In this embodiment, highly similar candidate reference blocks are retrieved from the normal reference matrix library and the non-local region inside the ultrasound matrix to be detected, and dual-source prediction is achieved through block-level fusion. This can simultaneously utilize the non-local redundant information of the external normal reference and the sample to be detected, thereby improving the expressive power and robustness of the background reference construction.

[0114] (2) This implementation introduces a gradient intensity matrix and an edge penalty factor to reduce the predicted substitution intensity of the current two-dimensional block in the strong edge region, thereby reducing the risk of the structural boundary being over-smoothed and enhancing the ability of the background reconstruction result to preserve normal texture edges and local structural details.

[0115] (3) This embodiment reduces block stitching artifacts and enhances tolerance to local mismatches by smoothing the prediction residuals and injecting them into the original two-dimensional blocks proportionally, instead of directly replacing the original blocks with prediction blocks. It also achieves a better balance between background correction and preservation of the original structure.

[0116] (4) In this embodiment, two-dimensional block-level reconstruction is performed along two directions respectively, and adaptive fusion is performed based on the average matching stability of the two directions, so as to make fuller use of the structural texture features in different directions of complex composite materials and improve the stability of the overall reconstruction results and the accuracy of background expression.

[0117] (5) This embodiment further improves the reconstruction reliability in complex near-field regions and reference regions through near-field differential constraints and hard constraints in the reference region, and has strong engineering applicability.

[0118] The embodiments described above are merely preferred embodiments of the present invention, used to illustrate the technical solutions of the present invention, and not to limit the scope of protection of the present invention. For those skilled in the art, various modifications, substitutions, and improvements made to the above embodiments without departing from the technical concept of the present invention should fall within the scope of protection defined by the claims of the present invention.

Claims

1. A two-dimensional ultrasonic reference matrix reconstruction method based on edge penalty and residual smoothing, characterized in that, The steps include the following: S1. Obtain the ultrasound data matrix and normal reference matrix of the target to be tested; S2. Process the ultrasound data matrix to be tested to generate an energy intensity matrix and a gradient intensity matrix; S3. Within the preset reference area of ​​the ultrasound data matrix to be detected, the upper limit of the background energy is estimated based on the energy intensity matrix by using the quantile seed threshold and the median absolute deviation to generate an adaptive energy mask; S4. Construct an effective set of sampling points by combining an adaptive energy mask and a robust outlier removal rule; S5. In the first direction, the ultrasound data matrix to be detected is divided into blocks based on two-dimensional blocks of the first size, and dual-source prediction and edge penalty fusion are performed using effective sampling points, combined with the normal reference matrix library and the non-local region of the ultrasound data matrix to be detected, to obtain the reconstruction result in the first direction. S6. In the second direction, the ultrasound data matrix to be detected is divided into blocks based on two-dimensional blocks of the second size. Using effective sampling points, combined with the normal reference matrix library and the non-local region of the ultrasound data matrix to be detected, dual-source prediction and edge penalty fusion are performed to obtain the reconstruction result in the second direction. S7. Calculate the matching similarity of each two-dimensional block during the reconstruction process in the two directions, and calculate the average matching similarity of the first and second directions respectively. After weighted fusion of the reconstruction results of the two directions based on the average matching similarity, hard constraint correction is performed on the positions that violate the background energy constraint to obtain the reconstruction reference matrix.

2. The two-dimensional ultrasonic reference matrix reconstruction method based on edge penalty and residual smoothing according to claim 1, characterized in that, The second-direction reconstruction process of S6 also includes differentiated constraint strategies for the near-field region, such as increasing the minimum effective data threshold, reducing the non-local search radius, or increasing the edge penalty coefficient.

3. The two-dimensional ultrasonic reference matrix reconstruction method based on edge penalty and residual smoothing according to claim 1, characterized in that, S1 includes: S11: Use an ultrasonic phased array probe to perform a global linear scan of the target under test, acquire echo data from multiple positions, angles and depths, and save it as raw matrix data according to the corresponding index; S12: Based on the principle of superposition of synthetic aperture and time delay, the original matrix data acquired by the ultrasonic phased array probe is processed to obtain the mapping matrix of the data to be measured; S13: The acquired signals are processed using Synthetic Aperture Focusing (SAFT) technology and coherent superposition to form the ultrasonic data matrix to be tested. And the normal reference matrix library.

4. The two-dimensional ultrasonic reference matrix reconstruction method based on edge penalty and residual smoothing according to claim 1, characterized in that, S2 include: S21: Perform absolute value transformation and energy normalization on the ultrasound data matrix to be tested to generate an energy intensity matrix; S22: Apply gradient operators to the ultrasound data matrix to be tested to obtain horizontal and vertical gradients and generate a gradient intensity matrix.

5. The two-dimensional ultrasonic reference matrix reconstruction method based on edge penalty and residual smoothing according to claim 1, characterized in that, S3 include: S31: Extract an energy sample set within a preset reference region; S32: Calculate the quantile seed threshold based on quantile statistics; S33: Construct a set of background candidate samples; S34: Calculate the median and median absolute deviation on the background candidate sample set to obtain the background fluctuation scale; S35: Obtain the maximum background energy; S36: Generate an adaptive energy mask based on the upper limit of background energy. ; in, Indicates position (This can be used as a valid background point to participate in subsequent 2D block matching.) Indicates position It does not participate in subsequent 2D block matching. This represents the upper limit of background energy.

6. The two-dimensional ultrasonic reference matrix reconstruction method based on edge penalty and residual smoothing according to claim 1, characterized in that, S4 include: S41: Based on the adaptive energy mask, retain the effective positions of the background to form an initial set of effective points; S42: To avoid local extreme points affecting similarity calculation, robust outlier detection is performed on the data; S43: Construct the final set of valid points based on the adaptive energy mask and robust outlier removal results.

7. The two-dimensional ultrasonic reference matrix reconstruction method based on edge penalty and residual smoothing according to claim 1, characterized in that, S5 include: S51. In the first direction, perform two-dimensional block sliding segmentation on the ultrasound data matrix to be tested; for each two-dimensional block, use the effective sampling points to perform similarity matching with the corresponding candidate reference blocks in the normal reference matrix library and the candidate reference blocks in the non-local region inside the ultrasound matrix to be tested; perform block-level fusion on the top several reference blocks with the highest similarity in the library source candidate blocks and non-local candidate blocks to obtain the library source prediction block and non-local prediction block; if the number of data points at the effective position in the current two-dimensional block is lower than the preset minimum number of effective data points, then use the mean block of the normal reference matrix library at the corresponding position as the back-down prediction block; accumulate and average the reconstruction results of each two-dimensional block according to the overlapping area to obtain the reconstruction result in the first direction; S52. Apply edge penalty to the prediction substitution intensity corresponding to the base prediction block or the fusion weight of the source prediction block and the non-local prediction block based on the gradient intensity of the current two-dimensional block to obtain the prediction block of the current two-dimensional block. After smoothing, inject the residual between the prediction block and the original two-dimensional block into the original two-dimensional block proportionally to obtain the reconstruction block of the current two-dimensional block. Accumulate and average the reconstruction results of each two-dimensional block according to the overlapping area to obtain the reconstruction result in the first direction.

8. The two-dimensional ultrasonic reference matrix reconstruction method based on edge penalty and residual smoothing according to claim 7, characterized in that, S51 includes: S511: In the first direction, perform two-dimensional block sliding segmentation on the ultrasound data matrix to be tested; S512: For each 2D block, construct an effective pixel set within that block using an adaptive energy mask and robust outlier removal, and calculate the similarity between the current 2D block and the library source candidate reference blocks; sort all library source candidate reference blocks by similarity from largest to smallest, and select the top... The candidate reference blocks are fused to obtain the source prediction block; S513: For each two-dimensional block, search for non-local candidate reference blocks within the ultrasound matrix to be detected, and filter out valid non-local candidate reference blocks whose mean difference is less than or equal to a preset threshold; calculate the similarity at the common valid positions of the current two-dimensional block and the valid non-local candidate reference blocks, and select the top... The candidate reference blocks are fused to obtain a nonlocal prediction block; S514: Determine the dual-source basic fusion weights based on the maximum similarity between the source prediction block and the non-local prediction block, and obtain the basic prediction block of the current two-dimensional block.

9. The two-dimensional ultrasonic reference matrix reconstruction method based on edge penalty and residual smoothing according to claim 7, characterized in that, S52 includes: S521: Calculate the average edge strength on the valid data set of the current 2D block: ; in, This is the valid data set for the current two-dimensional block. The gradient intensity of the two-dimensional block. For grid indexing; S522: Construct an edge penalty factor based on the average edge strength, which is used to modulate the predicted substitution strength or the fusion weight of the library source prediction block and the non-local prediction block. ; in, The average edge strength of the current 2D block. This is the edge penalty coefficient, and the edge penalty factor decreases as the average edge strength increases; S523: Adjust the basic prediction process according to the edge penalty factor to obtain the prediction block of the current two-dimensional block; S524: Calculate the residual between the predicted block and the original 2D block; S525: Smooth the residuals; S526: Inject the smoothed residuals proportionally into the original 2D block to obtain the reconstructed block of the current 2D block; S527: The reconstruction results of each two-dimensional block are accumulated and averaged according to the overlapping areas to obtain the reconstruction result in the first direction.

10. The two-dimensional ultrasonic reference matrix reconstruction method based on edge penalty and residual smoothing according to claim 1, characterized in that, S7 includes: S71: Calculate the matching similarity of each two-dimensional block during the reconstruction process in two directions, and calculate the average matching similarity in the first direction and the average matching similarity in the second direction respectively; The directional fusion weights are determined based on the average matching similarity between the two directions. ; ; in, The average vertical similarity is calculated for all two-dimensional blocks. The average horizontal similarity is calculated for all two-dimensional blocks. For vertical fusion weights, For horizontal fusion weights; S72: Weighted fusion of the reconstruction results from the first and second directions yields the final reconstructed reference matrix. : ; in, For the final reference matrix, and The images show the reconstruction results for the first and second directions, respectively.