Full focus two-dimensional raster scanning imaging method and system based on position synchronization and overlap fusion
Patent Information
- Application Number
- CN202611168937.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-04
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2046-08-04
AI Technical Summary
[0010]有鉴于此,本发明的目的在于提供一种基于位置同步与重叠融合的全聚焦二维栅格扫查成像方法和系统,旨在解决全聚焦二维栅格扫查中灵敏度不均、步进规划失当、编码器误差致数据缺失及行间接缝幅值下降等问题,通过建立横向校准、有效范围驱动步进、三态同步及跨行融合机制,实现高一致性、高可靠性的C扫成像
(1)成像幅值一致性提升。横向灵敏度补偿通过标定试块实测补偿因子,有效校正了S扫图像中心和边缘因阵元指向性、声程差异等因素导致的幅值不均,使同一反射体在有效横向范围内响应趋于一致,提高了C扫定量准确性;
Smart Images

Figure CN122709600B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of ultrasonic nondestructive testing technology. Specifically, it relates to a full-focus two-dimensional grid scanning imaging method and system based on position synchronization and overlapping fusion, which is suitable for high-precision and high-efficiency two-dimensional ultrasonic C-scan imaging inspection of materials or workpieces. Background Technology
[0002] The Total Focusing Method (TFM) is an advanced post-processing technique for ultrasonic array imaging. It typically uses Full Matrix Capture (FMC) data as input, where each element of the ultrasonic array probe sequentially emits ultrasonic waves, and all elements receive and store the echo signals. Subsequently, the TFM reconstruction engine precisely calculates the delay time of each transmit-receive element pair for each pixel within a preset imaging area, based on the sound wave propagation path, and performs delay compensation and amplitude extraction, ultimately synthesizing a high-resolution two-dimensional S-scan cross-sectional image. In this image, the horizontal coordinate typically corresponds to the probe's beam coverage direction, and the vertical coordinate corresponds to the depth direction of the material.
[0003] In engineering applications, two-dimensional grid scanning is typically used to achieve comprehensive detection of large areas. In this process, the probe moves continuously along one main axis (scanning axis) and, after scanning one line, steps a predetermined distance along the other axis (stepping axis). For each frame of the S-scan image acquired, the system extracts the signal peak value of each lateral pixel within a preset depth gate, forming a C-scan projection amplitude band. This amplitude band is then written into the global C-scan data matrix based on the current encoder position. By accumulating multiple amplitude bands along the two mechanical axes, a two-dimensional C-scan image covering the entire detected area is finally formed.
[0004] However, existing total focusing imaging technology and two-dimensional grid scanning methods still have a series of problems in engineering practice, which limit imaging quality, detection efficiency and automation.
[0005] First, the lateral sensitivity of S-scan images exhibits significant inhomogeneity. The amplitude response of full-focus imaging is affected by various factors, such as the directivity of the array elements, changes in sound path, sound attenuation in the wedge, attenuation of the material itself, and boundary effects of the focusing aperture. For the same type of standard reflector, the response amplitude typically differs considerably between the central and edge regions of the S-scan image. If this lateral sensitivity is not effectively calibrated, the amplitude of the same defect at different locations along the scanning direction or between different scan lines will be inconsistent in the C-scan image, which will severely affect the accurate determination of defect size and severity.
[0006] Second, there is a lack of physical correlation between the effective coverage of the imaging and the mechanical stepping. In actual inspection, the effective coverage of a frame of S-scan image should not be determined solely by the image size or the nominal width of the probe, but should be based on the actual acoustic beam coverage and sensitivity. Ideally, the effective coverage should be determined by the degree to which the reflector amplitude decreases relative to its maximum amplitude (e.g., the commonly used -6dB threshold in engineering). However, traditional scanning schemes often overlook this point, and the mechanical stepping settings are often empirical. If the stepping distance between adjacent scan lines exceeds the effective coverage width, the two lines may only be connected by an edge region below the effective threshold, resulting in a significant decrease in the signal-to-noise ratio at the seam, forming a weak detection area and creating a risk of missed detections.
[0007] Third, encoder triggering errors and position conversion errors can cause grid index jumps in C-scan images, resulting in data gaps. In automated scanning, system data acquisition is usually triggered by encoder pulses. However, hardware triggering has errors. For example, theoretically, every 1000 encoder pulses correspond to a 1mm displacement, but the actual number of pulses between two triggers may be slightly greater or slightly less than 1000. If not handled properly (such as directly truncating by interval or simply rounding), encoder counting deviations may cause multiple frames of data to be mapped onto discontinuous grid indices, forming one or more unfilled pixel gaps in the final C-scan image, resulting in the loss of local image information and distortion of defect display.
[0008] Fourth, traditional inter-row data writing methods can lead to a decrease in amplitude at seams. In conventional raster scan data processing, the data of the current scan row is directly written to the C-scan buffer, overwriting the old data at the same physical location. Since the amplitude of the new scan row in the overlapping area (especially at the edge) is often below the threshold, while the same location in the previous row may have a stronger response from the center area, this direct overwriting method will create a "saddle-shaped" amplitude trough in the final C-scan image. In severe cases, it may even reduce the response of detectable defects to below the detection threshold, resulting in missed defects.
[0009] In summary, existing full-focus two-dimensional grid scanning imaging methods have significant shortcomings in terms of sensitivity consistency, rationality of scanning step planning, robustness of position synchronization, and effectiveness of inter-row data fusion. There is an urgent need for a new imaging method that can systematically solve the above problems. Summary of the Invention
[0010] In view of this, the purpose of this invention is to provide a full-focus two-dimensional grid scanning imaging method and system based on position synchronization and overlap fusion, which aims to solve problems such as uneven sensitivity, improper step planning, data loss due to encoder error, and decrease in line-to-line slit amplitude in full-focus two-dimensional grid scanning. By establishing a lateral calibration, effective range driven stepping, three-state synchronization, and cross-line fusion mechanism, high consistency and high reliability of C-scan imaging can be achieved.
[0011] To achieve the above objectives, the present invention provides the following technical solution: This invention first proposes a full-focus two-dimensional grid scanning imaging method based on position synchronization and overlap fusion, comprising the following steps: Step 1: Establish detection coordinates and imaging parameters: Based on the detection area and the probe beam coverage direction, establish the coordinate relationship of the scanning axis, stepping axis and depth axis, and set the horizontal pixel count, depth pixel count, horizontal and depth sampling interval, depth gate, preset amplitude drop threshold, target inter-row overlap rate, and grid interval of the scanning axis and stepping axis for a single frame of full-focus S-scan image. Step 2: Acquire calibration data and complete lateral sensitivity compensation: Select a comparison block with known reflector position and reflection amplitude, and move the probe or workpiece point by point along the horizontal direction of the S-scan. Acquire reflector amplitude at multiple lateral positions and target depths to form calibration data; determine the reference amplitude at each target depth based on the calibration data, and generate a lateral compensation factor based on the ratio of the reference amplitude to the lateral calibration amplitude. For a fully focused S-scan image, perform lateral sensitivity compensation by directly looking up a table before the gate projection. Step 3: Determine the effective lateral range from the amplitude threshold: At each target depth, normalize the calibrated effective amplitude, calculate the amplitude difference between the lateral position and the reference amplitude, search left and right from the main response region of the amplitude curve to determine the continuous interval that simultaneously satisfies the amplitude threshold and the minimum signal-to-noise ratio condition, and determine the effective imaging width at that depth accordingly. Within the entire target detection depth range, take the minimum value or the preset quantile value as the safe effective width. Step 4: Calculate and suggest recommended mechanical stepping: Calculate the upper limit of mechanical stepping based on the safe effective width and the target inter-row overlap rate, and convert the upper limit of mechanical stepping into the distance or encoder pulse number that the detection device can set, and output the recommended value, the current setting value and the coverage risk warning; Step 5: Complete encoder synchronization, three-state frame index determination and incremental refresh: When the encoder triggers acquisition, synchronously record the scan axis count, step axis count and frame sequence number, calculate the count difference between adjacent triggers for the scan axis and step axis respectively, perform three-state determination of no change, single step and jump for each motion axis respectively, and update the grid index according to the determination result; Step 6: Perform S-scan projection, global mapping, and cross-line maximum value fusion: Take the maximum value of each horizontal pixel within the depth gate to form the local projection band of the current frame, and convert the projected pixels to the global C-scan grid. Perform pixel-level maximum value fusion on the same global physical location in the overlapping area of adjacent scan lines to update the global C-scan cache.
[0012] Furthermore, in step two, the method for generating calibration data is as follows: when repeatedly collecting data at the same location, the average value, median value, or maximum stable value is used as the calibration amplitude at that location, and the calibration data at least covers the predetermined detection depth range and the S-scan field of view.
[0013] Furthermore, in step two, the lateral compensation factor is expressed as:
[0014]
[0015] in: To calibrate the stage depth The reference amplitude at that depth is taken as the maximum value of the calibrated amplitude at each lateral position. It is a horizontal compensation factor; For calibration data; To prevent positive numbers from being divided by zero; and To limit the lower and upper limits of the edge noise amplification factor; The horizontal position; For depth location; This is a clipping function used to restrict input values to a specified range. Inside.
[0016] Furthermore, in step two, the method for lateral sensitivity compensation is as follows:
[0017] in: For the compensated first frame Scan image; For the first Original full focus frame Scan image; This is the depth-direction compensation factor; It is a horizontal compensation factor; For effective imaging area or signal-to-noise ratio mask; The horizontal position; This represents the depth position.
[0018] Furthermore, in step three, the amplitude difference between the lateral position and the reference amplitude is expressed as:
[0019]
[0020] in: For depth The reference amplitude at that depth is taken as the maximum value of the calibrated effective amplitude at each lateral position. The effective amplitude after calibration; The difference in amplitude; The horizontal position; For depth location; The conditions for determining the continuous interval are:
[0021]
[0022] in: The preset amplitude decrease threshold; Current horizontal position Location, depth Signal-to-noise ratio at the location; This is the preset minimum signal-to-noise ratio threshold.
[0023] Furthermore, in step four, the upper limit of the mechanical step is expressed as:
[0024] in: This is the upper limit of the mechanical stepping speed; For safe and effective width; The target line overlap rate.
[0025] Furthermore, in step five, the method for determining the three states of no change, single step, and jump for each motion axis is as follows: The first state is an unchanged state, and the determination condition is: Maintain the grid index of the previous frame. ; The second state is a single-step state, and the determination condition is: Update the grid index according to the sign of the count difference. ; The third state is the transition state. When the conditions for the unchanged state and the single-step state are not met, the grid index is re-determined based on the current absolute position. ; in: For the first The difference in the counts triggered by adjacent axes; This represents the theoretical number of pulses corresponding to one grid step. For absolute count tolerance; For the current frame in the 1st... Absolute physical position on each axis; For the first The origin of the grid along each axis; The target grid step size; It is an absolute value function; This is a sign function; it takes +1 when the input value is greater than 0, -1 when it is less than 0, and 0 when it is equal to 0.
[0026] Furthermore, in step six, the method for performing S-scan projection is as follows: within the depth gate, take the maximum value of each horizontal pixel to form the local projection band of the current frame, and generate a validity flag.
[0027] in: This is the magnitude vector of the local projection band, and its length is the number of horizontal pixels. ; For the compensated first Frame S-scan image in horizontal position Depth position The amplitude at that point; For depth location; Horizontal pixel index; For depth gates; The method for performing global mapping is as follows: convert the projected pixels to a global C-scan mesh, and the axial alignment coordinate relationship is as follows:
[0028]
[0029] in: and These are the column index and row index of the global grid, respectively; and These are the coordinates of the pixel on the global scan axis and the step axis, respectively; and These are the grid origins for the scan axis and the step axis, respectively; and These are the grid intervals for the scanning axis and the stepping axis, respectively; This is the floor function; The method for performing cross-line maximum value fusion is as follows: perform pixel-level maximum value fusion on the same global physical location in the overlapping area of adjacent scan lines to update the global C-scan cache, with the following rules: When the global C scan cache location If there is no valid data at a given position and the candidate value for that position in the current frame is valid, the candidate value is directly written to the buffer, as shown below:
[0030] When the global C scan cache location If valid data already exists at a given position and the candidate value for that position in the current frame is valid, then the maximum value of the two is used for updating, as shown below:
[0031] in: It is an amplitude array; Position of the current frame The validity indicator at the location; The current frame's global position Candidate values formed at the location; When all candidate values are invalid, the system remains in an uncollected state.
[0032] This invention also proposes a full-focus two-dimensional grid scanning imaging system based on position synchronization and overlap fusion, comprising: The parameter setting module is used to establish detection coordinates and imaging parameters, including setting the number of horizontal pixels, number of depth pixels, horizontal and depth sampling interval, depth gate, preset amplitude drop threshold, target inter-row overlap rate, and grid interval of the scanning axis and step axis for a single frame of full-focus S-scan image. The lateral calibration module is used to collect calibration data and complete lateral sensitivity compensation. It collects reflector amplitudes at multiple lateral positions and target depths of the comparison test block to form calibration data. Based on the calibration data, it generates a lateral compensation factor and performs lateral sensitivity compensation on each frame of the full-focus S-scan image before the gate projection. The effective range determination module is used to determine the effective lateral range from the amplitude threshold, normalize the calibrated effective amplitude, determine the continuous interval that simultaneously meets the amplitude threshold and the minimum signal-to-noise ratio condition, and calculate the safe effective width. The step recommendation module is used to calculate the upper limit of mechanical step based on the safe effective width and the target inter-row overlap rate, and output the recommended value, the current setting value and the coverage risk warning; The position synchronization module is used to synchronously record the scan axis count, step axis count, and frame sequence number when the encoder triggers acquisition. It performs three-state judgments for each motion axis: no change, single step, and jump, and updates the grid index according to the judgment results. The fusion imaging module is used to take the maximum value of each horizontal pixel within the depth gate to form the local projection band of the current frame, convert the projected pixels to the global C-scan grid, and perform pixel-level maximum value fusion on the same global physical location in the overlapping area of adjacent scan lines to generate a global C-scan image.
[0033] Furthermore, in the lateral calibration module, the calibration data at least covers the predetermined detection depth range and the S-scan field of view. When repeatedly acquiring data at the same location, the average value, median value, or maximum stable value is used as the calibration amplitude at that location. Before searching for a continuous interval, the effective range determination module first smooths the horizontal amplitude curve and requires that the length of the continuous interval that meets the amplitude threshold is greater than the preset minimum length, so as to avoid boundary misjudgment caused by noise spikes. The position synchronization module includes: an encoder interface unit, used to latch the count values of the scanning axis and the stepping axis after the encoder count reaches the set trigger interval, and send a full matrix capture transmit / receive start signal; a data registration unit, used to write the original channel data or the reconstructed S-scan data into the buffer, and append the frame sequence number, count value and timestamp to the data header to complete the pairing of position data and acoustic data with the frame sequence number or timestamp; a three-state determination unit, used to calculate the count difference between adjacent triggers for the scanning axis and the stepping axis respectively, and perform three-state determination of no change, single step and jump to update the grid index; and an incremental refresh unit, used to construct a local update domain based on the previously processed position and the current updated position, refresh only the projection, fusion and display of this area, and perform a full refresh when the compensation parameters, gate parameters or coordinate model change. The fusion imaging module includes: a gate projection unit, used to take the maximum amplitude value of each horizontal pixel within the depth gate to form a local projection band of the current frame and generate a validity flag; a coordinate mapping unit, used to convert the projected pixels to the global C-scan grid according to the probe reference point and the local pixel coordinates; and a maximum value fusion unit, used to perform pixel-level maximum value fusion on the same global physical location in the overlapping area of adjacent scan lines to update the amplitude array and validity array of the global C-scan cache.
[0034] The beneficial effects of this invention are as follows: This invention, based on a full-focus two-dimensional grid scanning imaging method using position synchronization and overlap fusion, achieves the following technical effects: (1) Improved image amplitude consistency. Lateral sensitivity compensation effectively corrects the amplitude inconsistency between the center and edge of the S-scan image caused by factors such as array element directivity and sound path difference through the measured compensation factor of the calibrated test block, making the response of the same reflector tend to be consistent within the effective lateral range, thus improving the quantitative accuracy of C-scan; (2) Scientific planning of scanning parameters. The detection sensitivity threshold is quantified into the effective imaging width, and the upper limit of mechanical stepping is calculated accordingly, so that the stepping setting is physically related to the effective acoustic coverage range, thus avoiding the decrease in signal-to-noise ratio at the seam from the source; (3) Enhanced robustness of position synchronization. The three-state determination (no change / single step / jump) combined with incremental index update overcomes the grid index jump caused by encoder pulse counting error and floating point conversion error, prevents local gaps in C-scan, and ensures strict correspondence between data and position; (4) Interline seam amplitude preservation. The maximum value of cross-line fusion is combined with the validity flag to ensure that the weak signal at the edge of the subsequent scan line will not cover the strong signal at the center of the previous line, effectively eliminating the "saddle-shaped" amplitude trough caused by the traditional direct coverage method; (5) Optimized computational efficiency. The incremental refresh mechanism that only refreshes the local update domain reduces redundant computation and improves real-time processing capabilities. Attached Figure Description
[0035] To make the objectives, technical solutions, and beneficial effects of this invention clearer, the following figures are provided for illustration: Figure 1 This is a flowchart of the all-focusing two-dimensional grid scanning imaging method based on position synchronization and overlap fusion according to the present invention; Figure 2 Lateral calibration of TFM S-scan; (a) Full-focus S-scan before calibration; (b) Full-focus S-scan after calibration; Figure 3 A schematic diagram illustrating the calculation of effective coverage area; Figure 4 A comparative diagram of C-scan fill modes; (a) Coverage mode; (b) Maximum value fusion mode. Detailed Implementation
[0036] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.
[0037] The present invention proposes a full-focus two-dimensional grid scanning imaging method based on position synchronization and overlap fusion. Its core lies in systematically solving the problems of uneven sensitivity, improper step planning, data loss due to encoder error, and decrease in the amplitude of inter-row seams in two-dimensional grid scanning by means of lateral sensitivity calibration, effective range driven stepping, three-state synchronization and cross-row fusion mechanism.
[0038] Figure 1 The overall flow of the full-focus two-dimensional grid scanning imaging method based on position synchronization and overlap fusion of the present invention is shown. The specific implementation of each step is described in detail below.
[0039] Step 1: Establish detection coordinates and imaging parameters: Based on the detection area and the probe beam coverage direction, establish the coordinate relationship of the scanning axis, stepping axis and depth axis. Set the horizontal pixel count, depth pixel count, horizontal and depth sampling interval, depth gate, preset amplitude drop threshold, target inter-row overlap rate, and grid interval of the scanning axis and stepping axis for a single frame of full-focus S-scan image.
[0040] Specifically, firstly, a three-dimensional spatial coordinate relationship is established based on the geometry of the workpiece being inspected and the scope of the inspection area. Using the workpiece surface as the reference plane, the scanning axis (denoted as...) is... The stepping axis (denoted as) extends along the direction of the probe's acoustic beam coverage. The scanning axis is perpendicular to the workpiece surface, and the depth axis (denoted as...) is perpendicular to the scanning axis. The shaft extends downwards along the thickness direction of the workpiece.
[0041] Regarding imaging parameter settings, the following parameters need to be configured.
[0042] (1) Number of horizontal pixels in a single frame of a fully focused S-scan image and depth pixels The number of horizontal pixels is determined based on the number of probe array elements and the coverage area of the sound beam, while the number of depth pixels is determined based on the detection depth range and the required depth resolution. Specifically, the number of horizontal pixels can be 2 to 8 times the number of array elements, and the number of depth pixels can be set to 2 to 20 pixels per millimeter based on the sampling frequency and sound velocity.
[0043] (2) Lateral sampling interval and depth sampling interval The sampling interval determines the fineness of the imaging grid and should be determined comprehensively based on the minimum detectable defect size and computational resources. Specifically, The spacing between array elements can be 0.1 to 0.5 times. It can be calculated based on the sampling period and the sound velocity of the material, usually taking... ,in: For the material's sound velocity, The sampling frequency.
[0044] (3) Depth gate The depth gate is used to limit the depth range of peak values extracted during C-scan projection and should be set according to the thickness range of the workpiece being inspected and the depth location of the target defect. Specifically, the starting and ending depths of the gate should be dynamically adjusted according to the echo position on the bottom surface of the workpiece to ensure that the gate covers the target detection depth range.
[0045] (4) Preset amplitude decrease threshold Preset amplitude decrease threshold The boundary used to define the effective lateral range is expressed as the decrease in magnitude (in dB) relative to the reference maximum amplitude. Specifically, The preferred value is 6dB, meaning the effective area must be at least -6dB; however, it can also be set to 3dB or 10dB under different detection standards. The physical meaning of this threshold is: when the response amplitude at a certain lateral position decreases by more than this threshold relative to the maximum amplitude at the center, that position is considered outside the effective imaging range.
[0046] (5) Target line overlap rate Target line overlap rate This indicates the expected overlap between adjacent scan lines, expressed as the ratio of the overlap width to the effective imaging width. Specifically, The percentage can be 20% to 50%, which can be determined by a comprehensive balance between the requirements for detection sensitivity and the efficiency of scanning.
[0047] (6) Scan axis grid interval and step axis grid spacing The grid spacing determines the spatial resolution of the final C-scan image and should be set according to the inspection standard requirements and the minimum detectable defect size. Specifically, and Values between 0.1 mm and 1 mm are acceptable.
[0048] The number of global C-scan grids is calculated using the following formula:
[0049]
[0050] in: This represents the total number of columns in the global C-scan grid along the scan axis. This represents the total number of rows in the global C-scan mesh along the step axis direction; and These are the start and end positions of the scanning axis, respectively; and These are the start and end positions of the stepper axis, respectively. This is a rounding function that returns the smallest integer not less than the input value. Based on the above calculations, the size of the global C scan cache can be determined as follows: .
[0051] Step 2: Acquire calibration data and complete lateral sensitivity compensation: Select a comparison block with known reflector position and reflection amplitude, and move the probe or workpiece point by point along the horizontal direction of the S-scan. Acquire reflector amplitude at multiple lateral positions and target depths to form calibration data. Determine the reference amplitude at each target depth based on the calibration data, and generate a lateral compensation factor based on the ratio of the reference amplitude to the lateral calibration amplitude. For a fully focused S-scan image, perform lateral sensitivity compensation by directly looking up a table before the gate projection.
[0052] Specifically, a comparison test block with known reflector positions and reflection amplitudes is first selected. The material and acoustic properties of the comparison test block should be the same as or similar to those of the workpiece under inspection. A series of standard reflectors of the same size (such as horizontal through holes or flat-bottomed holes) should be machined in the test block at different depths. The reflectors should be evenly distributed along the horizontal direction of the S-scan, and the distribution range should at least cover the predetermined inspection field of view.
[0053] During calibration data acquisition, the probe or workpiece is moved point-by-point along the horizontal direction of the S-scan, and the response amplitude of the standard reflector at the same depth is acquired at multiple lateral positions. When acquiring data repeatedly at the same position, the average, median, or maximum stable value can be used as the calibration amplitude for that position to reduce the influence of random noise. The calibration data should at least cover the predetermined detection depth range and the S-scan field of view to ensure that the lateral sensitivity of each depth layer is effectively calibrated.
[0054] Let the calibration data be ,in: The horizontal position; For each target depth, the location is determined by depth. The reference amplitude is determined using the following formula:
[0055] That is, the reference amplitude is taken as the maximum value of the calibrated amplitude at each lateral position at that depth.
[0056] Horizontal compensation factor Calculate using the following formula:
[0057] in: To calibrate the stage depth The reference amplitude at that depth is taken as the maximum value of the calibrated amplitude at each lateral position. It is a horizontal compensation factor; For calibration data; To prevent positive numbers from being divided by zero, the maximum value of the calibration data is usually multiplied by a very small coefficient (e.g., to ); and To limit the lower and upper limits of the edge noise amplification factor and avoid excessive compensation gain at locations with extremely small calibrated amplitudes, specifically, as a preferred embodiment, 0.1 is acceptable. 10 is acceptable. This is a clipping function used to restrict input values to a specified range. Within the range.
[0058] In situations where on-site calibration conditions are limited and complete two-dimensional calibration data cannot be obtained, the following can be used: Simplified to a one-dimensional horizontal curve This involves averaging data from different depths or using only calibration data from representative depths for calculation. When sufficient data is available, a complete two-dimensional compensation matrix can be used to achieve more accurate compensation at each depth layer.
[0059] For the Full-focus S-scan image Lateral sensitivity compensation is performed directly by referring to a table before the gate projection. The compensation formula is:
[0060] in: For the compensated first frame Scan image; For the first Original full focus frame Scan image; The existing depth direction compensation factor (TCG compensation) is used to correct the differences in sound attenuation at different depths. It is a horizontal compensation factor; It serves as an effective imaging area or signal-to-noise ratio mask, used to shield invalid areas or areas with excessively low signal-to-noise ratios outside the coverage of the sound beam. The value is 1 within the effective imaging region and 0 within the invalid region. (This refers to calibration data.) Perform the same processing to obtain the calibrated effective amplitude. and will The data is stored as lookup table data for direct access in subsequent frames, eliminating the need for repeated calculations.
[0061] Figure 2 The comparison of the effects before and after lateral calibration is shown, in which Figure 2 (a) is the S-scan image before calibration, which shows that the amplitude of the same reflector varies significantly at different lateral positions; Figure 2 (b) in the image is the calibrated S-scan image, where the lateral amplitude distribution tends to be uniform.
[0062] Step 3: Determine the effective lateral range from the amplitude threshold: At each target depth, normalize the calibrated effective amplitude, calculate the amplitude difference between the lateral position and the reference amplitude, search left and right from the main response region of the amplitude curve to determine the continuous interval that simultaneously satisfies the amplitude threshold and the minimum signal-to-noise ratio condition, and determine the effective imaging width at that depth accordingly. Within the entire target detection depth range, take the minimum value or the preset quantile value as the safe effective width.
[0063] In practice, firstly at each target depth At this point, the effective amplitude after calibration in step two is... After normalization, calculate the amplitude difference between the lateral position and the reference amplitude:
[0064]
[0065] in: For depth The reference amplitude at that depth is taken as the maximum value of the calibrated effective amplitude at each lateral position. The effective amplitude after calibration; This represents the amplitude difference in dB. A negative value or zero reflects the degree of sensitivity decrease at each lateral position relative to the optimal position.
[0066] Search point by point from the main response region of the amplitude curve to the left and right to determine the continuous interval that simultaneously satisfies the following two conditions:
[0067]
[0068] in: The preset amplitude decrease threshold set in step one; The signal-to-noise ratio at the current lateral position; This is the preset minimum signal-to-noise ratio threshold. The signal-to-noise ratio can be calculated as the ratio of the peak signal value to the root mean square noise value.
[0069] To avoid boundary misjudgment caused by noise spikes, as a preferred implementation, the horizontal amplitude curve is smoothed (e.g., by median filtering or Gaussian smoothing) before searching for continuous intervals, and the length of the continuous interval that meets the amplitude threshold is required to be greater than a preset minimum length (e.g., no less than 5 consecutive pixels). Let the left and right boundaries of the searched continuous valid intervals be respectively... and The effective imaging width at that depth for:
[0070] Throughout the entire target detection depth range Within this range, the minimum effective imaging width at each depth is taken as the safe effective width, or a preset quartile value (as shown below) is taken to ensure effective coverage of most depth layers:
[0071] or
[0072] in: For safe and effective width; The preset quantile value (e.g., 25%) is used. The minimum value strategy is the most conservative, ensuring effective coverage of all depth layers; the quantile value strategy strikes a balance between detection reliability and scanning efficiency.
[0073] Figure 3 This diagram illustrates the calculation of effective coverage, visually showing the relationship between the amplitude curve, amplitude threshold, and effective width.
[0074] Step 4: Calculate and suggest recommended mechanical stepping: Calculate the upper limit of mechanical stepping based on the safe effective width and the target inter-row overlap rate, and convert the upper limit of mechanical stepping into the distance or encoder pulse number that the detection device can set, and output the recommended value, the current setting value and the coverage risk warning.
[0075] Based on the safe and effective width obtained in step three and the target line overlap rate set in step one The upper limit of the mechanical stepping is calculated according to the following formula:
[0076] in: This is the upper limit of the mechanical stepping speed; For safe and effective width; The target line overlap rate.
[0077] The physical meaning of this formula is: to ensure sufficient overlap between the effective imaging areas of adjacent scan lines, the step distance must not exceed the effective width minus the overlap width. For example, when 20mm, target overlap rate When the step size is 40%, it is recommended that the mechanical step size not exceed [a certain value]. mm.
[0078] The calculated upper limit of the mechanical stepping needs to be converted into a distance value or encoder pulse count that the detection equipment can actually set. The conversion method is as follows: if the equipment supports setting the stepping directly in distance units (e.g., mm), the calculation result is rounded to the smallest distance unit that the equipment can recognize; if the equipment sets the stepping in encoder pulse count, the conversion is performed based on the encoder pulse equivalent (the number of pulses per millimeter).
[0079] in: This is the number of encoder pulses corresponding to the upper limit of the mechanical stepping, i.e., the pulse count value required when the device is actually set. Encoder pulse equivalent (pulses / mm); This is a rounding function.
[0080] The system outputs the recommended step value, current setting value, and coverage risk warning in a visual manner. If the current setting value is greater than the recommended value, the system prompts "Step too large, there may be a risk of effective area breakage or seam amplitude reduction"; if the current setting value is less than the recommended value, the system prompts "Step too small, can be appropriately increased to improve scanning efficiency". In manual scanning, the gaps between adjacent rows can be marked according to the actual encoder position, marking uncollected areas as invalid data instead of mistakenly identifying them as valid data, thus avoiding misjudgments in subsequent defect analysis.
[0081] Step 5: Complete encoder synchronization, three-state frame index determination and incremental refresh: When the encoder triggers acquisition, synchronously record the scan axis count, step axis count and frame sequence number, calculate the count difference between adjacent triggers for the scan axis and step axis respectively, perform three-state determination of no change, single step and jump for each motion axis respectively, and update the grid index according to the determination result.
[0082] (1) Encoder synchronization.
[0083] When the encoder triggers acquisition, the scan axis count, stepper axis count, and frame number are recorded synchronously, and the position record and corresponding S-scan data are placed in the same frame data item. One implementation involves hardware logic detecting when the encoder count reaches a set trigger interval, latching the count values of the scan axis and stepper axis, and issuing a full matrix capture (FMC) transmit / receive start signal. After completing the predetermined transmit / receive sequence, the original channel data or reconstructed S-scan data is written to the buffer, and a frame number, count value, and timestamp are appended to the data header. During data transmission, the position data and acoustic data are paired using the frame number or timestamp to ensure strict correspondence and avoid data mismatch.
[0084] (2) Three-state determination.
[0085] The three-state determination is performed independently for the scanning axis and the stepping axis. Let... For the first The encoder pulse count and physical distance conversion factor (pulses / mm) for each axis. The target grid step size (mm) set for step one. The theoretical number of pulses corresponding to one grid step:
[0086] Let the difference in encoder counts between two consecutive triggers be:
[0087] in For the current frame in the 1st... Encoder count values on each axis; This is the encoder count value from the previous frame.
[0088] set up This is the allowable relative counting error for this axis. For the corresponding absolute count tolerance, the following condition must be met:
[0089] As a preferred embodiment. The value can be between 0.1 and 0.3, meaning the allowable counting deviation should not exceed 10% to 30% of the theoretical pulse count.
[0090] The specific logic for the three-state determination is as follows.
[0091] First state (unchanged state): The determination condition is:
[0092] When the above conditions are met, it is considered that the encoder has not crossed a new grid between adjacent triggers, and the grid index of the previous frame is maintained. The current frame does not generate a new grid position on this axis.
[0093] Second state (single-step state): The decision condition is:
[0094] in: This represents the absolute value function.
[0095] When the above conditions are met, the encoder is considered to have completed one target grid step, and the grid index is updated according to the sign of the count difference:
[0096] in: For a sign function, when Time to take ,when Time to take .
[0097] Third state (transition state): The determination condition is:
[0098] That is, when the conditions for determining the unchanged state and the single-step state are not met, it is considered that the current trigger interval is inconsistent with the single grid step size, which may correspond to crossing multiple grids, encoder pulse loss, or positional abrupt change. In this case, the single-step recursive result is not used, but the grid index is re-determined based on the current absolute position:
[0099] in: For the first Frame in Grid index on each axis; For the current frame in the 1st... Absolute physical position on each axis; This is the origin of the grid for this axis. After repositioning, the system compares the interval between the preceding and following grid indices. If the interval is greater than one grid, the grid in the middle where no valid acoustic data was obtained is marked as uncovered, and a rescan is prompted. Adjacent pixel values are not used to replace the actual acquired data to avoid generating false information. For implementations that only require index repositioning, this interval can also be recorded and the risk of coverage can be indicated in subsequent C-scan displays.
[0100] The three-state determination described above applies to the scanning axis and the stepping axis, respectively. When both axes remain unchanged, the position of the previous 2D frame is maintained. When one axis is in a single-step state while the other remains unchanged, only the moving axis is updated. When both axes move simultaneously, the grid indices of both axes are updated according to their respective states. When any axis is in a jump state, the absolute position relocation of that axis is performed first, and the continuity of adjacent 2D grids is checked. This process reduces the risk of index jumps caused by encoder pulse deviation and position conversion errors at grid boundaries by replacing frame-by-frame floating-point rounding with incremental indexing in the single-step state. The absolute relocation in the jump state is used to suppress error accumulation.
[0101] Two-dimensional frame indices can be calculated in row-major order:
[0102] in: The two-dimensional frame index for the current frame is calculated in row-major order and is used to uniquely identify the position of the current frame in the global C-scan grid. For step axis grid index; For scanning axis grid index; To check the total number of grid lines on the axis.
[0103] The system constructs a local update domain based on the previously processed position and the current update position, and only refreshes the projection, fusion and display of this region; when the compensation parameters, gate parameters or coordinate model change, a full refresh is performed, which is an auxiliary implementation method for position binding and processing efficiency.
[0104] Step 6: Perform S-scan projection, global mapping, and cross-line maximum value fusion: Take the maximum value of each horizontal pixel within the depth gate to form the local projection band of the current frame, and convert the projected pixels to the global C-scan grid. Perform pixel-level maximum value fusion on the same global physical location in the overlapping area of adjacent scan lines to update the global C-scan cache.
[0105] (1) S-scan projection.
[0106] In this embodiment, the method for performing S-scan projection is as follows: Within the depth gate interval, the maximum amplitude value is taken for each horizontal pixel to form a local projection band for the current frame, and a validity flag is generated.
[0107] in: This is the magnitude vector of the local projection band, and its length is the number of horizontal pixels. ; For the compensated first Frame S-scan image in horizontal position Depth position The amplitude at that point; For depth location; Horizontal pixel index; For depth gates.
[0108] Pixels without valid sampling points within the gate are set to invalid. This avoids overwriting existing valid data with zero amplitude, thus preventing invalid data from polluting the global C-scan cache.
[0109] (2) Global mapping.
[0110] In this embodiment, the method for performing global mapping is as follows: the projected pixels are converted to a global C-scan grid, and the axial alignment coordinate relationship is as follows.
[0111] The projected pixels are converted to the global C-scan grid based on the probe reference point and local pixel coordinates. When axially aligned (i.e., the probe is not deflected and the S-scan direction is consistent with the scan axis direction), the following coordinate relationship is used:
[0112]
[0113] in: For the first The global position of the probe reference point on the scanning axis at frame time; For the first Local offset of each horizontal pixel relative to the probe reference point; For the first The global position of the probe on the stepping axis during frame time; and These are the coordinates of the pixel on the global scan axis and the step axis, respectively.
[0114] The index of a pixel in the global C-scan grid is calculated as follows:
[0115]
[0116] in: and These are the column index and row index of the global grid, respectively; and These are the grid origins for the scan axis and the step axis, respectively; and These are the grid intervals for the scanning axis and the stepping axis, respectively; This is a function for rounding down. Adding 0.5 and then rounding down is equivalent to rounding to the nearest integer.
[0117] When the probe has a rotation angle or the S-scan direction is inconsistent with the displayed coordinates, the local coordinates must first be rotated and translated before the index conversion is completed. The coordinate transformation formula is:
[0118] in: World coordinate system coordinates; This refers to the probe rotation angle; Local coordinates; These are the coordinates of the probe reference point.
[0119] (3) Merging of maximum values across rows.
[0120] In this embodiment, the method for performing cross-line maximum value fusion is as follows: pixel-level maximum value fusion is performed on the same global physical location in the overlapping area of adjacent scan lines to update the global C-scan cache.
[0121] Specifically, after completing the global coordinate mapping, pixel-level maximum value fusion is performed on the overlapping areas of adjacent scan lines. The global C-scan buffer includes at least an amplitude array. and validity array The amplitude array stores the current valid amplitude of each pixel, while the validity array indicates whether each pixel has been filled with valid data.
[0122] For the current frame at the global position Candidate values formed at the location Update the global C scan cache according to the following rules: Rule 1 (First Fill): When the global C scan cache position If there is no valid data at that position and the candidate value for that position in the current frame is valid, directly write the candidate value to the buffer:
[0123] in: Position of the current frame The validity flag at the location has a value of 1 indicating that the location has been filled with valid data, and a value of 0 indicating that the location has not been filled.
[0124] Rule 2 (Maximum Value Update): When the global C scan caches the position... If valid data already exists at that position and the candidate value for that position in the current frame is valid, then the maximum value between the two is used for updating:
[0125] Rule 3 (Invalid Data Preservation): When all candidate values are invalid, maintain the uncollected state and do not perform any write operations.
[0126] Maximum value comparison only applies to valid candidate values from different scan lines at the same global physical location. Therefore, when the amplitude of the edge region of the next scan line is lower than the amplitude of the center region of the previous line, the low-amplitude candidate will not cover the existing high-amplitude candidate; when there is only one line of valid data at a certain location, that data is directly retained; when all candidates are invalid, the data remains uncollected. This rule applies to overlapping areas of two or more adjacent lines and is the main processing method for reducing the "saddle-shaped" amplitude troughs between lines.
[0127] Figure 4 Two C-scan fill modes were compared, among which: Figure 4 (a) in the text represents the traditional overwrite mode, where the data written later directly overwrites the existing data, resulting in obvious amplitude troughs between rows; Figure 4 (b) in the figure represents the maximum value fusion mode of the present invention, in which the maximum value is retained at each position and the inter-line amplitude is evenly distributed.
[0128] Through the coordinated operation of steps one through six above, this invention achieves a complete workflow for all-focusing two-dimensional grid scanning imaging: lateral calibration ensures amplitude consistency, effective range-driven stepping ensures the physical rationality of the scanning plan, three-state determination and incremental refresh ensure robustness of position synchronization and computational efficiency, and cross-row maximum value fusion ensures amplitude preservation between row seams. These steps are interconnected and synergistic, jointly solving long-standing technical challenges in all-focusing two-dimensional grid scanning, such as amplitude unevenness, seam descent, and grid gaps.
[0129] This embodiment also proposes a full-focus two-dimensional grid scanning imaging system based on position synchronization and overlapping fusion, used to implement the full-focus two-dimensional grid scanning imaging method based on position synchronization and overlapping fusion described above in this embodiment. Specifically, the full-focus two-dimensional grid scanning imaging system based on position synchronization and overlapping fusion in this embodiment includes a parameter setting module, a lateral calibration module, an effective range determination module, a step recommendation module, a position synchronization module, and a fusion imaging module.
[0130] (1) Parameter setting module. This module is used to perform the parameter configuration function in step one, which is used to establish detection coordinates and imaging parameters, including setting the number of horizontal pixels, number of depth pixels, horizontal and depth sampling interval, depth gate, preset amplitude drop threshold, target inter-row overlap rate, and grid interval of the scanning axis and step axis for a single frame of full-focus S-scan image.
[0131] Specifically, the parameter setting module provides a user interface through which operators can input or select parameters such as detection area range, probe parameters, imaging resolution, depth gate, amplitude threshold, and target overlap rate. The parameter setting module converts these parameters into an internal data format and distributes them to other modules.
[0132] (2) Lateral Calibration Module. This module is used to perform the lateral sensitivity compensation function in step two. It collects calibration data and performs lateral sensitivity compensation by comparing the amplitude of the reflector at multiple lateral positions and target depths on the test block to form calibration data. A lateral compensation factor is generated based on the calibration data, and lateral sensitivity compensation is performed on each frame of the full-focus S-scan image before gate projection. The calibration data must at least cover the predetermined detection depth range and the S-scan directional field of view. When repeatedly collecting data at the same position, the average, median, or maximum stable value is used as the calibration amplitude for that position. Specifically, the lateral calibration module includes a calibration data acquisition and control unit, a compensation factor calculation unit, and a compensation execution unit. The calibration data acquisition and control unit controls the probe to scan the comparison block and records the calibration data; the compensation factor calculation unit calculates the compensation factor based on the calibration data. and The compensation execution unit performs lateral sensitivity compensation by looking up a table on each frame of the S-scan image.
[0133] (3) Effective Range Determination Module. This module is used to perform the effective lateral range determination function in step three, that is, to determine the effective lateral range based on the amplitude threshold, normalize the calibrated effective amplitude, determine the continuous interval that simultaneously meets the amplitude threshold and the minimum signal-to-noise ratio condition, and calculate the safe effective width. Before searching for the continuous interval, the effective range determination module first smooths the lateral amplitude curve and requires that the length of the continuous interval that meets the amplitude threshold is greater than the preset minimum length to avoid boundary misjudgment caused by noise spikes; The effective range determination module includes an amplitude normalization unit, a continuous interval search unit, and a safety width calculation unit. The amplitude normalization unit calculates... ; Continuous interval search unit searches for satisfaction and The continuous interval; the safety width calculation unit takes the minimum effective width of all depths as the value. In a preferred embodiment, the module smooths the horizontal amplitude curve before searching for continuous intervals and requires that the length of the continuous interval that meets the amplitude threshold is greater than a preset minimum length, in order to avoid boundary misjudgment caused by noise spikes.
[0134] (4) Step Recommendation Module. This module performs the mechanical step recommendation function in step four, specifically calculating the upper limit of the mechanical step based on the safe effective width and the target inter-row overlap rate, and outputting the recommended value, the current setting value, and a coverage risk warning. Specifically, the step recommendation module calculates the upper limit of the mechanical step based on the safe effective width and the target inter-row overlap rate. and calculate It also performs unit conversions and provides visual prompts.
[0135] (5) Position synchronization module. It is used to perform encoder synchronization and three-state determination functions in step five. That is, it is used to synchronously record the scan axis count, step axis count and frame number when the encoder triggers acquisition, and to perform three-state determination of no change, single step and jump for each motion axis, and update the grid index according to the determination results.
[0136] In this embodiment, the position synchronization module further includes an encoder interface unit, a data registration unit, and an incremental refresh unit. The encoder interface unit is used to latch the count values of the scanning axis and the stepping axis after the encoder count reaches the set trigger interval, and to send a full matrix capture transmit / receive start signal; the data registration unit is used to write the original channel data or the reconstructed S-scan data into the buffer, and to append the frame sequence number, count value, and timestamp to the data header to complete the pairing of position data and acoustic data with the frame sequence number or timestamp; the three-state determination unit is used to calculate the count difference between adjacent triggers for the scanning axis and the stepping axis respectively, and to perform three-state determination of no change, single step, and jump to update the grid index; the incremental refresh unit is used to construct a local update domain based on the previously processed position and the current updated position, and only refresh the projection, fusion, and display of this area, and to perform a full refresh when the compensation parameters, gate parameters, or coordinate model change.
[0137] (6) Fusion Imaging Module. This module is used to perform the S-scan projection, global mapping, and cross-line maximum value fusion functions in step six. Specifically, it is used to take the maximum value of each horizontal pixel within the depth gate to form the local projection band of the current frame, convert the projected pixels to the global C-scan grid, and perform pixel-level maximum value fusion on the same global physical location in the overlapping area of adjacent scan lines to generate a global C-scan image.
[0138] In this embodiment, the fusion imaging module further includes a gate projection unit, a coordinate mapping unit, and a maximum value fusion unit. The gate projection unit is used for depth gate fusion. Take the maximum value for each horizontal pixel. The local projection band of the current frame is formed, and a validity flag is generated. The coordinate mapping unit is used to transform the projected pixels to the global C-scan grid according to the probe reference point and local pixel coordinates, including coordinate rotation, translation, and index conversion. The maximum value fusion unit is used to perform pixel-level maximum value fusion on the same global physical position in the overlapping area of adjacent scan lines, and update the amplitude array of the global C-scan buffer according to rules one to three. and validity array .
[0139] The above modules can be implemented on hardware platforms such as FPGA (Field-Programmable Gate Array), DSP (Digital Signal Processor), or GPU (Graphics Processing Unit), or can run on a general-purpose computer as software modules. As a preferred embodiment, the encoder interface unit and the three-state determination unit are deployed on the FPGA to achieve high real-time performance; the fusion imaging module is deployed on the GPU to achieve efficient parallel processing; and the parameter setting module and the step recommendation module are deployed on the host computer software, interacting with the slave computer through a communication interface.
[0140] The above-described embodiments are merely preferred embodiments provided to fully illustrate the present invention, and the scope of protection of the present invention is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on the present invention are all within the scope of protection of the present invention. The scope of protection of the present invention is defined by the claims.
Claims
1. A full-focus two-dimensional grid scanning imaging method based on position synchronization and overlap fusion, characterized in that: Includes the following steps: Step 1: Establish detection coordinates and imaging parameters: Based on the detection area and the probe beam coverage direction, establish the coordinate relationship of the scanning axis, stepping axis and depth axis, and set the horizontal pixel count, depth pixel count, horizontal and depth sampling interval, depth gate, preset amplitude drop threshold, target inter-row overlap rate, and grid interval of the scanning axis and stepping axis for a single frame of full-focus S-scan image. Step 2: Collect calibration data and complete lateral sensitivity compensation: Select a comparison test block with known reflector position and reflection amplitude, move the probe or workpiece point by point along the horizontal direction of the S-scan, and collect the reflector amplitude at multiple lateral positions and target depths to form calibration data; The reference amplitude at each target depth is determined based on the calibration data, and a lateral compensation factor is generated based on the ratio of the reference amplitude to the lateral calibration amplitude. For a full-focus S-scan image, lateral sensitivity compensation is performed by directly looking up a table before the gate projection. Step 3: Determine the effective lateral range from the amplitude threshold: At each target depth, normalize the calibrated effective amplitude, calculate the amplitude difference between the lateral position and the reference amplitude, search left and right from the main response region of the amplitude curve to determine the continuous interval that simultaneously satisfies the amplitude threshold and the minimum signal-to-noise ratio condition, and determine the effective imaging width at that depth accordingly. Within the entire target detection depth range, take the minimum value or the preset quantile value as the safe effective width. Step 4: Calculate and suggest recommended mechanical stepping: Calculate the upper limit of mechanical stepping based on the safe effective width and the target inter-row overlap rate, and convert the upper limit of mechanical stepping into the distance or encoder pulse number that the detection device can set, and output the recommended value, the current setting value and the coverage risk warning; Step 5: Complete encoder synchronization, three-state frame index determination and incremental refresh: When the encoder triggers acquisition, synchronously record the scan axis count, step axis count and frame sequence number, calculate the count difference between adjacent triggers for the scan axis and step axis respectively, perform three-state determination of no change, single step and jump for each motion axis respectively, and update the grid index according to the determination result; Step 6: Perform S-scan projection, global mapping, and cross-line maximum value fusion: Take the maximum value of each horizontal pixel within the depth gate to form the local projection band of the current frame, and convert the projected pixels to the global C-scan grid. Perform pixel-level maximum value fusion on the same global physical location in the overlapping area of adjacent scan lines to update the global C-scan cache. In step four, the upper limit of the mechanical step is expressed as: in: This is the upper limit of the mechanical stepping speed; For safe and effective width; The target inter-line overlap rate; In step five, the method for performing three-state determinations—no change, single step, and jump—for each motion axis is as follows: The first state is an unchanged state, and the determination condition is: Maintain the grid index of the previous frame. ; The second state is a single-step state, and the determination condition is: Update the grid index according to the sign of the count difference. ; The third state is the transition state. When the conditions for the unchanged state and the single-step state are not met, the grid index is re-determined based on the current absolute position. ; in: For the first The difference in the counts triggered by adjacent axes; This represents the theoretical number of pulses corresponding to one grid step. For absolute count tolerance; For the current frame in the 1st... Absolute physical position on each axis; For the first The origin of the grid along each axis; The target grid step size; It is an absolute value function; This is a sign function; it takes +1 when the input value is greater than 0, -1 when it is less than 0, and 0 when it is equal to 0.
2. The full-focus two-dimensional grid scanning imaging method based on position synchronization and overlap fusion according to claim 1, characterized in that: In step two, the calibration data is generated by repeatedly collecting data at the same location, using the average value, median value, or maximum stable value as the calibration amplitude at that location, and the calibration data at least covers the predetermined detection depth range and the S-scan field of view.
3. The full-focus two-dimensional grid scanning imaging method based on position synchronization and overlap fusion according to claim 1, characterized in that: In step two, the lateral compensation factor is expressed as: in: To calibrate the stage depth The reference amplitude at that depth is taken as the maximum value of the calibrated amplitude at each lateral position. This is a horizontal compensation factor; For calibration data; To prevent positive numbers from being divided by zero; and To limit the lower and upper limits of the edge noise amplification factor; The horizontal position; For depth location; This is a clipping function used to restrict input values to a specified range. Inside.
4. The full-focus two-dimensional grid scanning imaging method based on position synchronization and overlap fusion according to claim 1, characterized in that: In step two, the method for lateral sensitivity compensation is as follows: in: For the compensated first frame Scan image; For the first Original full focus frame Scan image; This is the depth-direction compensation factor; This is a horizontal compensation factor; For effective imaging area or signal-to-noise ratio mask; The horizontal position; This represents the depth position.
5. The full-focus two-dimensional grid scanning imaging method based on position synchronization and overlap fusion according to claim 1, characterized in that: In step three, the amplitude difference between the lateral position and the reference amplitude is expressed as: in: For depth The reference amplitude at that depth is taken as the maximum value of the calibrated effective amplitude at each lateral position. The effective amplitude after calibration; The difference in amplitude; The horizontal position; For depth location; The conditions for determining the continuous interval are: in: The preset amplitude decrease threshold; Current horizontal position Location, depth Signal-to-noise ratio at the location; This is the preset minimum signal-to-noise ratio threshold.
6. The full-focus two-dimensional grid scanning imaging method based on position synchronization and overlap fusion according to claim 1, characterized in that: In step six, the method for performing S-scan projection is as follows: within the depth gate, take the maximum value of each horizontal pixel to form the local projection band of the current frame, and generate a validity flag. in: This is the magnitude vector of the local projection band, and its length is the number of horizontal pixels. ; For the compensated first Frame S-scan image in horizontal position Depth position The amplitude at that point; For depth location; Horizontal pixel index; For depth gates; The method for performing global mapping is as follows: convert the projected pixels to a global C-scan mesh, and the axial alignment coordinate relationship is as follows: in: and These are the column index and row index of the global grid, respectively; and These are the coordinates of the pixel on the global scan axis and the step axis, respectively; and These are the grid origins for the scan axis and the step axis, respectively; and These are the grid intervals for the scanning axis and the stepping axis, respectively; This is the floor function; The method for performing cross-line maximum value fusion is as follows: perform pixel-level maximum value fusion on the same global physical location in the overlapping area of adjacent scan lines to update the global C-scan cache, with the following rules: When the global C scan cache location If there is no valid data at a given position and the candidate value for that position in the current frame is valid, the candidate value is directly written to the buffer, as shown below: When the global C scan cache location If valid data already exists at a given position and the candidate value for that position in the current frame is valid, then the maximum value of the two is used for updating, as shown below: in: It is an amplitude array; Position of the current frame The validity indicator at the location; The current frame's global position Candidate values formed at the location; When all candidate values are invalid, the system remains in an uncollected state.
7. A full-focus two-dimensional grid scanning imaging system based on position synchronization and overlap fusion, characterized in that: A method for implementing the full-focus two-dimensional grid scanning imaging method based on position synchronization and overlap fusion as described in any one of claims 1-6 includes: The parameter setting module is used to establish detection coordinates and imaging parameters, including setting the number of horizontal pixels, number of depth pixels, horizontal and depth sampling interval, depth gate, preset amplitude drop threshold, target inter-row overlap rate, and grid interval of the scanning axis and step axis for a single frame of full-focus S-scan image. The lateral calibration module is used to collect calibration data and complete lateral sensitivity compensation. It collects reflector amplitudes at multiple lateral positions and target depths of the comparison test block to form calibration data. Based on the calibration data, it generates a lateral compensation factor and performs lateral sensitivity compensation on each frame of the full-focus S-scan image before the gate projection. The effective range determination module is used to determine the effective lateral range from the amplitude threshold, normalize the calibrated effective amplitude, determine the continuous interval that simultaneously meets the amplitude threshold and the minimum signal-to-noise ratio condition, and calculate the safe effective width. The step recommendation module is used to calculate the upper limit of mechanical step based on the safe effective width and the target inter-row overlap rate, and output the recommended value, the current setting value and the coverage risk warning; The position synchronization module is used to synchronously record the scan axis count, step axis count, and frame sequence number when the encoder triggers acquisition. It performs three-state judgments for each motion axis: no change, single step, and jump, and updates the grid index according to the judgment results. The fusion imaging module is used to take the maximum value of each horizontal pixel within the depth gate to form the local projection band of the current frame, convert the projected pixels to the global C-scan grid, and perform pixel-level maximum value fusion on the same global physical location in the overlapping area of adjacent scan lines to generate a global C-scan image.
8. The all-focusing two-dimensional grid scanning imaging system based on position synchronization and overlap fusion according to claim 7, characterized in that: In the lateral calibration module, the calibration data at least covers the predetermined detection depth range and the S-scan field of view. When the same location is repeatedly sampled, the average value, median value, or maximum stable value is used as the calibration amplitude at that location. Before searching for a continuous interval, the effective range determination module first smooths the horizontal amplitude curve and requires that the length of the continuous interval that meets the amplitude threshold is greater than the preset minimum length, so as to avoid boundary misjudgment caused by noise spikes. The position synchronization module includes: an encoder interface unit, used to latch the count values of the scanning axis and the stepping axis after the encoder count reaches the set trigger interval, and send a full matrix capture transmit / receive start signal; a data registration unit, used to write the original channel data or the reconstructed S-scan data into the buffer, and append the frame sequence number, count value and timestamp to the data header to complete the pairing of position data and acoustic data with the frame sequence number or timestamp; a three-state determination unit, used to calculate the count difference between adjacent triggers for the scanning axis and the stepping axis respectively, and perform three-state determination of no change, single step and jump to update the grid index; and an incremental refresh unit, used to construct a local update domain based on the previously processed position and the current updated position, refresh only the projection, fusion and display of this area, and perform a full refresh when the compensation parameters, gate parameters or coordinate model change. The fusion imaging module includes: a gate projection unit, used to take the maximum amplitude value of each horizontal pixel within the depth gate to form a local projection band of the current frame and generate a validity flag; a coordinate mapping unit, used to convert the projected pixels to the global C-scan grid according to the probe reference point and the local pixel coordinates; and a maximum value fusion unit, used to perform pixel-level maximum value fusion on the same global physical location in the overlapping area of adjacent scan lines to update the amplitude array and validity array of the global C-scan cache.
Citation Information
Patent Citations
Full focus imaging beam calibration method
CN109490419A
Ultrasonic scanning and three-dimensional imaging method, device and equipment for extra-high voltage transformer wire outlet device
CN119780233A