An interface identification method and system based on minimum dynamic mean difference
By adopting an interface recognition method based on minimum dynamic mean difference, the problems of automation and anti-interference in interface recognition in geophysical images are solved, achieving efficient and accurate interface extraction, which is suitable for large-scale data processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA RAILWAY DESIGN GRP CO LTD
- Filing Date
- 2026-02-06
- Publication Date
- 2026-05-22
Smart Images

Figure CN121661514B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of image processing and geophysical exploration technology, specifically to an interface recognition method based on minimum dynamic mean difference. Background Technology
[0002] In engineering geological surveys and infrastructure inspections, geophysical exploration techniques such as ground-penetrating radar and shallow seismic surveys are widely used to detect underground layered structures. The images generated by these techniques contain continuous interfaces reflecting the boundaries of different strata or structures. Accurately identifying these interfaces, especially the bottommost target interface, is crucial for assessing structural integrity and determining the location of anomalies.
[0003] Currently, interface identification in geophysical images mainly relies on manual interpretation by professionals or simple global thresholding and edge detection algorithms. Manual interpretation is inefficient, highly subjective, inconsistent, and struggles to handle massive amounts of data. Traditional automatic identification algorithms (such as Canny edge detection and global thresholding) are highly sensitive to image noise, background inhomogeneity, and interference from multiple interfaces, easily leading to false positives, false negatives, or interface discontinuities, failing to meet the demands of high-precision, batch-based engineering applications. Therefore, there is an urgent need for a method that can automatically, robustly, and accurately identify target interfaces from complex geophysical images. Summary of the Invention
[0004] This invention aims to at least solve one of the technical problems existing in the prior art. To this end, one objective of this invention is to propose an interface recognition method and system based on minimum dynamic mean difference, which can realize the automatic and accurate recognition of the lowest continuous interface in geophysical images, overcome the influence of image noise, background interference and multi-interface aliasing, and effectively improve processing efficiency and consistency, especially supporting large-scale batch data processing.
[0005] To address the above problems, this invention provides an interface recognition method based on minimum dynamic mean difference, comprising the following steps:
[0006] S1. Divide the image region: Divide the geophysical detection image to be processed into several continuous strip regions along the horizontal direction. The width of each strip region is one pixel, and the height is the same as the height of the original image.
[0007] S2. Identify candidate points within the strip. For each strip region, identify all pixels within the strip whose color depth is higher than a preset threshold, and use them as candidate interface points.
[0008] S3. Determine the initial target point. Starting from the leftmost strip area, select the point with the smallest vertical coordinate value from the candidate interface point set identified in step S2 as the target point of the strip.
[0009] S4. Progressively identify the dynamic mean difference. For the nth band, n≥2, perform the following sub-steps:
[0010] S4.1. Based on step S2, identify the candidate points and initially select a candidate target point Pn;
[0011] S4.2. Calculate the arithmetic mean An of the vertical coordinates of the first n-1 confirmed target points in the strip, where An = (P1 + P2 + ... + P{n-1}) / (n-1);
[0012] S4.3. Calculate the absolute value Δ of the difference between the vertical coordinate of the candidate target point Pn and the average value An, where Δ = Pn - An;
[0013] If Δ is less than or equal to the preset tolerance threshold T, then Pn is confirmed as the final target point of the nth strip.
[0014] Otherwise, discard Pn, and select the next candidate point in the candidate point set of the strip in ascending order of vertical coordinates. Repeat the calculation of Δ and comparison until a point that satisfies Δ≤T is found, or after traversing all candidate points, select the point with the smallest Δ as the target point.
[0015] S5. Interface Generation: After identifying target points in all strip regions, connect all target points sequentially from left to right to form a continuous curve as the identified target interface.
[0016] Preferably, in step S2, a deep learning algorithm is used to identify candidate interface points, and the neural network model used is a U-Net segmentation network or a ResNet classification network trained on geophysical image samples.
[0017] Preferably, the tolerance threshold T in step S4.3 is set to 10 pixel units.
[0018] Preferably, in step S4.3, if no candidate interface points are identified in the current strip, the vertical coordinates of the target points already identified in the previous strip are used as the target point coordinates of the current strip.
[0019] Preferably, after step S5, a post-processing step is included: smoothing the generated target point sequence to eliminate fluctuations and make the interface smooth.
[0020] A system used in an interface recognition method based on minimum dynamic mean difference includes:
[0021] The image input module is used to acquire geophysical detection images;
[0022] The processing module is configured to perform the following operations:
[0023] A. Divide the image vertically along the horizontal direction into continuous strip regions with a width of one pixel;
[0024] B. For each strip region, identify pixels with a color depth higher than a preset threshold as candidate interface points;
[0025] C. Starting from the leftmost strip, select the candidate point with the smallest vertical coordinate as the initial target point;
[0026] D. For the nth strip (n≥2): Calculate the arithmetic mean An of the vertical coordinates of the first n-1 target points, where An=(P1+P2+...+P{n-1}) / (n-1);
[0027] E. Calculate the absolute value Δ = Pn - An of the difference between candidate points Pn and An, and confirm the target point based on the comparison between Δ and the tolerance threshold T;
[0028] F. Connect all confirmed target points in sequence to generate interface curves;
[0029] The output module is used to output the recognized interface data or images.
[0030] The advantages of this invention compared to the prior art are:
[0031] This invention addresses the challenge of automatically identifying continuous interfaces in geophysical images, and compared to existing technologies, it offers the following significant advantages:
[0032] (1) High degree of automation: It requires no manual intervention and realizes full-process automation from image input to interface line output, which greatly improves processing efficiency and is suitable for batch processing of massive data.
[0033] (2) Strong anti-interference ability: By using the "dynamic mean comparison" mechanism, the trend of the identified partial interface is used as a constraint, which can effectively filter out the interference of local noise points and avoid misidentifying the upper interface points as target points, ensuring that the bottom target interface can be stably extracted even in complex images.
[0034] (3) Good recognition accuracy and continuity: Pixel-by-pixel strip analysis combined with tolerance control ensures the detail accuracy of interface extraction. The introduction of dynamic reference mean gives the recognition process "inertia", which can smooth the jumps caused by noise and finally generate continuous and smooth interface lines.
[0035] (4) Wide adaptability of the algorithm: The algorithm has a clear framework and can adapt to various geophysical images with different resolutions and signal-to-noise ratios by adjusting the candidate point identification method (such as replacing with a more advanced deep learning model) and the tolerance threshold T. It has good versatility and scalability. Attached Figure Description
[0036] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0037] Figure 1 This is a flowchart illustrating the implementation of the present invention;
[0038] Figure 2 This is a schematic diagram of the method principle of the present invention;
[0039] Figure 3 This is a real-world illustration of the present invention;
[0040] In the figure: 1-Geophysical detection image; 2-Strip; 3-Candidate interface point; 4-Final target point; 5-Interface curve. Detailed Implementation
[0041] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0042] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "joining" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0043] The present invention discloses an interface recognition algorithm and system based on minimum dynamic mean difference, the implementation process of which is as follows: Figure 2 As shown:
[0044] Data Input and Preprocessing: Obtain the geophysical detection image 1 to be processed (such as a ground-penetrating radar image). Necessary preprocessing can be performed on the image, such as grayscale conversion, DC removal, and background removal, to enhance contrast and suppress some noise, but these are not essential steps in this algorithm.
[0045] Image region division (S1): Set the image width to W pixels. Divide the image horizontally (from left to right) into W vertical strips 2, each strip being 1 pixel wide and H pixels high, which is the original image height.
[0046] Candidate point identification within a strip (S2): For the i-th strip (1 ≤ i ≤ W), extract a vertical grayscale profile with a width of one pixel. Analyze this profile using a pre-trained deep learning model (e.g., a U-Net semantic segmentation model trained on a large number of geophysical image samples labeled with interface points), outputting the probability that each pixel location belongs to an "interface point". Record the pixel locations with probabilities exceeding a set threshold (e.g., 0.7) as the candidate interface point set {Ci} for that strip. Each point in the set is represented by its vertical pixel coordinate y within the strip (the origin is at the bottom of the image).
[0047] Initial target point determination (S3): For the first strip (n=1), find the point with the smallest vertical coordinate y-value (i.e., the bottommost point in the image) from its candidate point set {C1}, and label its coordinate as P1(y1). If {C1} is empty (i.e., no candidate point was identified for this strip), continue to push the strip to the right until a non-empty set is found. Use that strip as the strip n=1, and continue to extend it to the right.
[0048] Dynamic mean difference progressive identification (S4): Initialize a list to store the coordinates of confirmed target points, first add P1.
[0049] For i = 2 to W, execute the following loop:
[0050] a. Obtain the candidate point set {Ci} for the i-th stripe.
[0051] b. If {Ci} is empty, the y-coordinate of the target point P(i-1) in the previous band is directly used as the y-coordinate of Pi to maintain the continuity of the interface. Then Pi is added to the target point list, and the next loop begins.
[0052] c. If {Ci} is not empty, find the point with the minimum vertical coordinate (the lowest point).
[0053] d. Calculate the average y-coordinate Avg_prev of the first (i-1) points in the current target point list.
[0054] e. Examine candidate points using a tolerance threshold T (typically 10 pixels):
[0055] For a candidate point y_candidate, calculate diff = |y_candidate - Avg_prev|.
[0056] If diff ≤ T, then confirm that the candidate point is the final target point 4 of the current strip, Pi = y_candidate, and exit the candidate point checking loop.
[0057] If no point satisfying diff ≤ T is found after traversing all candidate points, then the candidate point with the smallest diff value is selected as Pi.
[0058] f. Add the confirmed Pi to the target point list and update the mean basis for the next calculation.
[0059] Interface Generation and Output (S5): After the loop ends, a vertical coordinate sequence {y1, y2, ..., yW} of W target points is obtained, and their corresponding horizontal coordinates are the strip numbers {1, 2, ..., W}. Connecting these points in sequence with straight lines or spline curves, the identified target interface curve 5 can be plotted on the image. This curve data can be further used for quantitative analysis, such as calculating interface depth and undulation.
[0060] Optional post-processing: Apply smoothing filters (such as moving average filtering or Savitzky-Golay filtering) to the generated target point sequence to eliminate any residual minor fluctuations and make the interface smoother.
[0061] Through the above steps, the present invention can stably and automatically extract the required target interface from geophysical images, effectively overcoming the shortcomings of traditional methods.
[0062] The present invention and its embodiments have been described above. This description is not restrictive, and the accompanying drawings are only one embodiment of the present invention; the actual structure is not limited thereto. In conclusion, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the invention, such designs should fall within the protection scope of the present invention.
Claims
1. An interface recognition method based on minimum dynamic mean difference, characterized in that, Includes the following steps: S1. Divide the image region: Divide the geophysical detection image to be processed into several continuous strip regions along the horizontal direction. The width of each strip region is one pixel, and the height is the same as the height of the original image. S2. Identify candidate points within the strip. For each strip region, identify all pixels within the strip whose color depth is higher than a preset threshold, and use them as candidate interface points. S3. Determine the initial target point. Starting from the leftmost strip area, select the point with the smallest vertical coordinate value from the candidate interface point set identified in step S2 as the target point of the strip. S4. Progressively identify the dynamic mean difference. For the nth band, n≥2, perform the following sub-steps: S4.
1. Based on step S2, identify the candidate points and initially select a candidate target point Pn; S4.
2. Calculate the arithmetic mean An of the vertical coordinates of the first n-1 confirmed target points in the strip, where An = (P1 + P2 + ... + P{n-1}) / (n-1); S4.
3. Calculate the absolute value Δ of the difference between the vertical coordinate of the candidate target point Pn and the average value An, where Δ = Pn - An; If Δ is less than or equal to the preset tolerance threshold T, then Pn is confirmed as the final target point of the nth strip. Otherwise, discard Pn, and select the next candidate point in the candidate point set of the strip in ascending order of vertical coordinates. Repeat the calculation of Δ and comparison until a point that satisfies Δ≤T is found, or after traversing all candidate points, select the point with the smallest Δ as the target point. S5. Interface Generation: After identifying target points in all strip regions, connect all target points sequentially from left to right to form a continuous curve as the identified target interface.
2. The interface recognition method based on minimum dynamic mean difference according to claim 1, characterized in that: In step S2, a deep learning algorithm is used to identify candidate interface points. The neural network model used is a U-Net segmentation network or a ResNet classification network trained on geophysical image samples.
3. The interface recognition method based on minimum dynamic mean difference according to claim 1, characterized in that: In step S4.3, the tolerance threshold T is set to 10 pixel units.
4. The interface recognition method based on minimum dynamic mean difference according to claim 1, characterized in that: In step S4.3, if no candidate interface points are identified in the current strip, the vertical coordinates of the target points already identified in the previous strip are used as the target point coordinates of the current strip.
5. The interface recognition method based on minimum dynamic mean difference according to claim 1, characterized in that: The step S5 is followed by a post-processing step: smoothing the generated target point sequence to eliminate fluctuations and make the interface smooth.
6. A system used in the interface recognition method based on minimum dynamic mean difference as described in claim 1, characterized in that, include: The image input module is used to acquire geophysical detection images; The processing module is configured to perform the following operations: A. Divide the image vertically along the horizontal direction into continuous strip regions with a width of one pixel; B. For each strip region, identify pixels with a color depth higher than a preset threshold as candidate interface points; C. Starting from the leftmost strip, select the candidate point with the smallest vertical coordinate as the initial target point; D. For the nth strip (n≥2): Calculate the arithmetic mean An of the vertical coordinates of the first n-1 target points, where An=(P1+P2+...+P{n-1}) / (n-1); E. Calculate the absolute value Δ = Pn - An of the difference between candidate points Pn and An, and confirm the target point based on the comparison between Δ and the tolerance threshold T; F. Connect all target points in sequence to generate the interface curve; The output module is used to output the recognized interface data or images.