Phi-OTDR (Optical Time Domain Reflectometer) tube cleaner collision signal identifying and positioning device and method
By using image processing methods based on 'kurtosis' and 'pixel density distribution', combined with 'inverted V matching' technology, the problem of identification and positioning difficulties in pig tracking tasks of φ-OTDR system was solved, and high-precision automated positioning and identification were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TIANJIN UNIV
- Filing Date
- 2026-02-06
- Publication Date
- 2026-05-12
AI Technical Summary
The φ-OTDR system has problems with identification and inaccurate positioning in pig tracking tasks, especially in complex environments where it is difficult to accurately identify and locate the collision signals of the pig.
A preliminary image judgment method based on 'kurtosis' features is adopted, combined with the 'pixel density distribution' of local regions in the image, and the 'inverted V matching' method is used to identify and locate the collision signal of the pig. The method includes data preprocessing, preliminary kurtosis judgment, edge detection, line segmentation and inverted V matching modules.
It achieves automatic real-time monitoring of the pig's location with high positioning accuracy within 100 meters. The method is easy to apply, requires no human intervention or sample training, and has good anti-interference performance.
Smart Images

Figure CN122020002A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of distributed fiber optic sensing, object detection, and event recognition. Addressing the difficulties in identification and inaccurate positioning encountered when using a phase-sensitive optical time-domain reflectometer (φ-OTDR) for pig tracking tasks, a new φ-OTDR method is proposed. Methods for identifying, locating, and assembling collision signals from OTDR pigs. Background Technology
[0002] In pipeline monitoring applications, sensing optical fibers are laid parallel to the pipeline. The φ-OTDR system repeatedly sends probe pulses along the sensing fiber, sampling the vibration signal by detecting Rayleigh backscattered (RBS) light. When a disturbance event occurs, the local fiber refractive index at the disturbance location is modulated, changing the phase of the RBS light field downstream of the disturbance location. Event-related information can then be extracted using direct intensity detection or phase demodulation methods. A spatiotemporal plot is a typical φ-OTDR data structure, composed of multiple RBS traces. The spatiotemporal plot can be viewed as a two-dimensional matrix, with the horizontal and vertical axes representing space and time, respectively. Each row (fast axis) is an RBS trace, and each column (slow axis) is a one-dimensional time-domain signal. The element values of the matrix represent energy intensity.
[0003] Unlike natural images of objects with clear boundaries, the "straight lines" and "edges" in a φ-OTDR spatiotemporal map are generated by the propagation of vibration waves along the pipe. Essentially, they are a series of vibration peaks arranged in a linear pattern, and the inherent vibrational nature of the signal causes the pattern to be discontinuous along the time axis. Furthermore, coherent fading is difficult to avoid in a φ-OTDR system, causing the pattern in the spatiotemporal map to be discontinuous along the spatial axis. Finally, various vibration waves from the surrounding environment, unrelated to the pipe, are captured by the φ-OTDR system and reflected in the spatiotemporal map as noise, further increasing the difficulty of event identification. Summary of the Invention
[0004] This invention provides a φ This invention discloses an OTDR pig collision signal identification and localization device and method. Based on the "kurtosis" feature, the image is initially judged, then "diagonal lines" are extracted from the image using the "pixel density distribution" of local regions. Finally, an "inverted V matching" method is used to pair all the extracted diagonal lines to obtain the final inverted V identification result. The x-coordinate of the vertex of the inverted V represents the pig's position information, while the spatial-temporal slope of the inverted V represents the propagation speed of the collision sound signal along the pipe wall, reflecting the type of event. This method can accurately identify inverted V feature patterns in complex images and locate their vertices under various interferences. It has good interpretability and strong anti-interference performance, and can achieve good application results in pig localization tasks. See the description below for details:
[0005] A type of φ An OTDR pig collision signal identification and positioning device, the device comprising: a data preprocessing module, a kurtosis preliminary judgment module, an edge detection module, a line segmentation module, and an inverted V matching module;
[0006] The data preprocessing module preprocesses the input raw spatiotemporal map data and outputs a 0-1 binary image;
[0007] The kurtosis preliminary judgment module judges the image before binarization after bandpass filtering. If the judgment is successful, the edge detection module is then used.
[0008] The edge detection module detects edges in a 0-1 binary image and outputs the detection results for left and right diagonal lines.
[0009] The line segmentation module performs line segmentation operations on the detection results of the left and right diagonal lines respectively, and outputs the segmentation results of the left and right diagonal lines, and obtains the number of the left and right diagonal lines respectively;
[0010] The inverted V matching module adopts an iterative approach, taking the pair of left and right diagonal line segments with the closest upper endpoints each time, matching them into an inverted V pattern according to the distance threshold, and outputting the final inverted V pattern detection result.
[0011] The kurtosis preliminary judgment module judges the image before binarization after bandpass filtering as follows:
[0012] For all points in the 0-1 binary sequence where kbin = 0, if there is a point with kbin = 1 among the five adjacent points to the left and right, then set the kbin of the point being judged to 1.
[0013] If there are consecutive "1 regions" exceeding the threshold in the binary kurtosis sequence, the edge detection module is executed if the condition is met; otherwise, the algorithm terminates if the target event is determined not to exist in the spatiotemporal graph.
[0014] The edge detection module detects the 0-1 binary image and outputs the detection results for left and right diagonal lines as follows:
[0015] When both criteria exceed their corresponding thresholds, they are respectively denoted as and When a bright pixel is identified as belonging to a certain diagonal line, it is retained; otherwise, the pixel is converted to a dark pixel.
[0016] ; ;
[0017] in, Absolute criterion; Relative criteria; Bright pixel density in the online neighborhood Bright pixel density in the background neighborhood.
[0018] The line segmentation module performs line segmentation operations on the left and right diagonal line detection results as follows:
[0019] Bright pixels New coordinates in the θ-rotated coordinate system :
[0020]
[0021] In the θ-rotated coordinate system, a line segmentation operation is performed based on the xθ coordinate difference between each bright pixel to extract the xθ coordinates of all bright pixels and sort them from smallest to largest;
[0022] Calculate the xθ coordinate difference between any two pairs of coordinates, denoted as a vector: ,in , Represents the total number of pixels in a binary image;
[0023] Let the threshold for the difference in the xθ coordinates of bright pixels be... For the i-th bright pixel and the (i+1)-th bright pixel, if If they are different lines, then they are judged to be different lines.
[0024] The line segment segmentation module further includes:
[0025] Calculate the aspect ratio in the θ-rotated coordinate system. For the first A line segment that has been temporarily identified;
[0026]
[0027] The inverted V matching module is:
[0028] For each left-sloping line segment obtained from the line segmentation module, obtain the maximum ordinate in the θ-rotation coordinate system. The pixels are used as endpoints to record their Cartesian coordinates. For right-sloping line segments, flip the image horizontally and then perform the same operation to find the corresponding vertex pixels, then flip it back to record its rectangular coordinates.
[0029] Calculate the Euclidean distance between each pair of left and right diagonal endpoints, and denote the distance between the i-th left diagonal endpoint and the j-th right diagonal endpoint as . The iteration matches only one inverted V at a time, and the endpoint distance threshold is set to... ,Pick minimum value and Compare;
[0030] if Then, the i-th "left diagonal" and the j-th "right diagonal" are matched to form an inverted V. The matched diagonals are then removed from the matching process. This matching and removal operation is repeated until a certain judgment is made. This indicates that all inverted Vs in the spacetime diagram were successfully identified, and the remaining diagonal lines are all isolated diagonal lines.
[0031] A type of φ A method for identifying and locating collision signals of an OTDR pig, the method comprising:
[0032] Based on each column of original time-domain signals Bandpass filtering was performed on the frequencies of 20-200Hz to obtain the results. And the signal after Fourier transform Take its high-frequency components Amplitude correction is performed, and the final filtering result is calculated. ;
[0033] For each final filtering result Calculate the fractional kurtosis to obtain a kurtosis sequence k(i); binarize the kurtosis sequence k(i) to obtain a binary sequence kbin(i);
[0034] For all points with kbin = 0, perform a check. If there is a point with kbin = 1 among the five adjacent points to the left and right, then set the kbin of the checked point to 1.
[0035] Determine whether there is a continuous "1 region" in the binary kurtosis sequence whose length exceeds the threshold. If so, perform Gaussian blur processing on the filtered spatiotemporal graph.
[0036] The bright pixels located in the "kurtosis 1 region" are scanned point by point. For each bright pixel, the neighborhood is taken, two criteria are calculated, and a threshold is used to decide whether to retain the bright pixel. After the scan is completed, the preliminary screening results of the left diagonal pixels are obtained.
[0037] Flip the spatiotemporal map horizontally, and after scanning, flip it back horizontally to obtain the preliminary filtering results of the right diagonal pixels.
[0038] The initial screening results of the pixels on the left diagonal are rotated by θ = -30° to make the horizontal axis xθ of the new coordinate system perpendicular to the left diagonal direction. Each bright pixel is then calculated. New coordinates in the new coordinate system ;
[0039] Arrange all bright pixels in ascending order of their xθ coordinates, and calculate the difference between each pair of xθ coordinates to obtain the difference vector. ;
[0040] Compare each one in turn With threshold The size, if This represents a new line segment starting from the (i+1)th pixel. After the comparison is complete, the left diagonal line segmentation operation is performed;
[0041] The initial filtering results of the right diagonal pixels are flipped left and right, and finally the results are flipped back left and right to complete the right diagonal segmentation operation.
[0042] Calculate the aspect ratio for all left and right diagonal line segments, and remove "pixel clusters" with an aspect ratio less than 5;
[0043] For each diagonal line segment, take the pixel with the largest ordinate in the θ-rotation coordinate system, record the rectangular coordinates, and obtain a series of "left diagonal line vertices" and "right diagonal line vertices";
[0044] Calculate the Euclidean distance between each pair of "left diagonal vertex" and "right diagonal vertex" in turn, and denote the distance between the i-th left diagonal endpoint and the j-th right diagonal endpoint as . ;
[0045] Pick minimum value and Compare, if Then the i-th "left diagonal" and the j-th "right diagonal" will be matched to form an inverted V;
[0046] Remove the two left and right diagonal lines that have already been matched, until a certain judgment is made. The algorithm terminates and outputs the inverted V recognition result;
[0047] Based on the pixel coordinates of the left and right diagonal sides of each inverted V, calculate its linear equation, and then calculate the coordinates of the intersection point based on the equation to obtain the location information of the pig collision signal.
[0048] The beneficial effects of the technical solution provided by this invention are:
[0049] 1. This invention can automatically monitor the position of the pipeline pig in real time without human intervention, and has high positioning accuracy with the error controllable within 100 meters;
[0050] 2. The localization and recognition process of this method involves manually writing rules, without the need for any samples for pre-training. Compared with deep learning-based methods, it is easier to apply and saves a lot of manpower. Attached Figure Description
[0051] Figure 1 This is a schematic diagram of three types of "diagonal" neighborhoods;
[0052] In this system, the dot represents the bright pixel to be judged, the area around the dot represents the line neighborhood, and the area above the dot represents the background neighborhood.
[0053] Figure 2 This is a schematic diagram of coordinate system rotation;
[0054] Figure 3 This is a schematic diagram for matching an inverted V based on the Euclidean distance between vertices. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below.
[0056] To accurately identify and locate the collision signal between the pig and the weld using the φ-OTDR system, this invention proposes a method to simulate the human eye's recognition of linear patterns in a spatiotemporal map. Specifically, a "straight line" that can be recognized by the human eye should meet the following conditions:
[0057] The pixel density is high enough within the "linear region";
[0058] The pixel density is sufficiently low around the "linear region";
[0059] The length of the "linear region" is sufficient for the human eye to perceive it as "linear".
[0060] Based on the above characteristics, this invention presents an image recognition method based on fractional kurtosis preliminary judgment and pixel density distribution, which performs edge recognition and vertex localization on the characteristic inverted V pattern generated by the collision of the pig in the spatiotemporal image.
[0061] When performing real-time monitoring tasks, the φ-OTDR system generates a unique two-dimensional data at the terminal called a "spatiotemporal map". Its horizontal axis represents space and its vertical axis represents time. When the pig moves along the pipe wall in the pipeline and collides with the pipe weld, it will generate a characteristic pattern in the spatiotemporal map that resembles an "inverted V".
[0062] Example 1
[0063] This invention utilizes this feature to propose a device and method for identifying and locating collisions in pigging signals. This invention is a data analysis device, which can be divided into five modules: a data preprocessing module, a preliminary kurtosis judgment module, an edge detection module, a line segmentation module, and an inverted V matching module. The "preliminary kurtosis judgment module" is an independent judgment module that performs a judgment on the output of the "data preprocessing module." If the judgment passes, subsequent steps are performed. The input to the data preprocessing module is the original spatiotemporal map data, and the output is a 0-1 binary image (each column after one-dimensional bandpass filtering). The input to the edge detection module is a 0-1 binary image (i.e., the output of the data preprocessing module), and the output is two binary images, representing the left and right diagonal line extraction results. Bright pixels in the images belong to a detected diagonal edge. The line segmentation module performs line segmentation operations on the two detection results obtained from the previous module, and the output is the line segmentation result. The left and right diagonal line sets respectively obtain the number of diagonal line segments, and each bright pixel obtains a label indicating "which diagonal line it belongs to." The inverted V matching module adopts an iterative method. Each time, it takes the pair of left and right diagonal lines with the closest upper endpoint distance and matches them into an inverted V pattern according to the distance threshold. When there are no diagonal lines that can be matched, the iteration terminates and the final inverted V pattern detection result is output.
[0064] I. Data Preprocessing Module
[0065] First, each column of the original spatiotemporal map is extracted as a time-domain signal and bandpass filtered from 20 to 200 Hz to remove the baseline and extract the characteristic frequency band of the pig collision signal. To mitigate the random amplitude reduction of signals at different spatial locations caused by coherent fading, each time-domain signal is divided by its total high-frequency energy to achieve amplitude correction.
[0066] The φ-OTDR system used in this embodiment of the invention has a time domain sampling rate of 1000 Hz and a frequency band of 481-500 Hz for amplitude correction, as shown in equation (1).
[0067] (1)
[0068] in, , and These are the original time-domain signal, its Fourier transform, and the filtered time-domain signal, respectively. It is the number of sampling points on the spatial axis. This indicates a bandpass filter. , These are time and space variables, respectively. Represents the set of positive integers. The first one representing the spacetime graph List.
[0069] The filtered series The spatiotemporal map is reassembled into a grayscale image and then subjected to Gaussian blurring to suppress random noise. A two-dimensional Gaussian kernel with variance σ is used. The expression is shown below. In this embodiment of the invention, σ = 3.
[0070] (2)
[0071] Finally, the Otsu thresholding method was used to convert the grayscale image into a binary image.
[0072] II. Preliminary Strategies for Cliff Assessment
[0073] In this embodiment of the invention, the preprocessed spatiotemporal map is analyzed using a one-dimensional feature called kurtosis to determine whether it may contain characteristic vibration patterns caused by pig collisions. Kurtosis is a feature quantity used to measure the degree of concentration of one-dimensional data distribution. There are two calculation methods: dimensionless and dimensional. Essentially, both measure the interpolation between the expected value of a one-dimensional signal raised to the fourth power and the square of the expected value of the squared signal.
[0074] In this embodiment of the invention, a "fractional kurtosis" is adopted, which partially incorporates the amplitude information of the original one-dimensional signal into the final kurtosis calculation result, as shown in Equation (3). Here, x is the input one-dimensional time-domain signal, E(·) is the expected value of the calculation, k is the kurtosis calculation result, and M is an influence factor ranging from 0 to 2, controlling the degree of influence of the original one-dimensional signal amplitude information on the final calculation result. In this embodiment of the invention, M = 1.5.
[0075] (3)
[0076] For each column of the spatiotemporal graph "after bandpass filtering and before Gaussian blurring", a fractional-order kurtosis is calculated to obtain a kurtosis sequence k(i), where i represents the i-th column of the spatiotemporal graph. If a time-domain sequence contains vibration signals with concentrated energy distribution, the kurtosis value will be high; conversely, if the components of the time-domain sequence are mainly white noise, its kurtosis will be close to 0. A threshold Thre is set to adjust the kurtosis sequence.
[0077] The column is transformed into a 0-1 binary sequence kbin(i), as shown in equation (4). In this embodiment of the invention, Thre = 225.
[0078] (4)
[0079] Due to coherent fading, the acoustic signal propagating continuously in space may exhibit slight "discontinuities" in the spatiotemporal diagram. The signal-to-noise ratio (SNR) at these discontinuities is low, approaching noise. To compensate for the effects of coherent fading, referencing the "erosion-dilation" method in image processing, a judgment is made on all points with kbin = 0. If any of its five adjacent points have kbin = 1, then the kbin of that judged point is also set to 1. After "dilation," a binary kurtosis sequence with "good continuity" is obtained, where regions with values of 1 represent areas where vibration signals may be propagating along the pipe. An empirical length threshold is set (96 in this embodiment). If a continuous "1 region" exceeding the threshold exists in the binary kurtosis sequence, it is determined that a target event may exist in the spatiotemporal diagram, and the process proceeds to the next stage. Otherwise, it is determined that no target event exists in the spatiotemporal diagram, and the algorithm terminates. Furthermore, the next stage will perform a row-by-row, column-by-column scanning operation. To save computational resources, only the "continuous 1 region" obtained in this stage will be scanned.
[0080] III. Edge Detection Module
[0081] Referring to how the human eye recognizes an inverted V pattern, this invention proposes an edge extraction method based on the "pixel density distribution" of a local region. This method requires prior knowledge of the angle of the target diagonal line relative to the positive horizontal axis in the spatiotemporal graph. In this embodiment, this angle is 60° (left diagonal of the inverted V) and 120° (right diagonal). This method extracts both the left and right diagonal edges of the inverted V; the following description only covers the left diagonal edge extraction method. When extracting the right diagonal edge, the original spatiotemporal graph is flipped horizontally, and then the left diagonal edge extraction operation is performed; this will not be elaborated further.
[0082] The original spatiotemporal map data is transformed into a binary image through a data preprocessing module. The pixels are divided into "bright pixels" (corresponding to matrix element values of 1) and "dark pixels" (corresponding to matrix element values of 0). For each bright pixel, a neighborhood with a shape approximately equal to a 60° diagonal line and a certain width is selected; see [link to details]. Figure 1 As shown in Figure (a), the dots represent the bright pixels to be judged, the lighter-colored areas around the dots represent the linear neighborhood, and the darker-colored areas above the dots represent the background neighborhood. If the bright pixel belongs to a diagonal line that can be distinguished by the human eye, the bright pixel density of the linear neighborhood (number of bright pixels / total number of pixels, denoted as...) is... The density of bright pixels in the background neighborhood should be high enough, while the density of bright pixels in the background neighborhood (denoted as ) should be high enough. The threshold should be sufficiently low. This invention proposes two criteria to measure the above index: an absolute criterion (denoted as CA) to measure the former, and a relative criterion (denoted as CR) to measure the latter. The calculation method is shown in equation (5). Only when both criteria exceed their corresponding thresholds (denoted as CR respectively) will the index be calculated. and Only when the light pixel is in a certain diagonal line will it be judged as belonging to a certain diagonal line and retained; otherwise, the pixel will be converted into a dark pixel.
[0083] ; (5)
[0084] To avoid low BPDOL values (only half the expected level) at the hypotenuse endpoints, which could affect detection accuracy, this invention proposes two additional neighborhood types, detailed in [link to relevant documentation]. Figure 1 Figures (b) and (c) in the diagram show that the three neighborhood shapes are identical, differing only in their relative positions to the neighborhood of the "bright pixel to be judged." First, the following is applied... Figure 1 The judgment is made based on Figure (a). If the judgment fails, the following steps are applied sequentially. Figure 1 Figure (b) in the middle and Figure 1 Figure (c) shows a pixel that passes the arbitrary neighborhood determination described above and is therefore considered to belong to a certain diagonal line. Zero-padding is performed at the image boundaries to ensure successful calculation of CA and CR at these boundaries. In this embodiment, the length and width of the line neighborhood and the background neighborhood are approximately set to 200 and 35 pixels respectively, forming a rectangular neighborhood matrix with a size of 243×101.
[0085] IV. Line Segment Division Module
[0086] After edge detection, two binary images are obtained, representing the results of left and right edge detection, respectively. Each bright pixel belongs to one and only one diagonal line. The resulting binary image may contain multiple diagonal lines, some of which belong to a certain inverted V, while others are isolated diagonal lines (not the detection target), which can interfere with the results. To obtain accurate detection results, this embodiment of the invention first performs line segmentation on the binary image to determine the number of "left diagonal lines" and "right diagonal lines". After line segmentation, an inverted V matching operation is performed between the "left diagonal line set" and the "right diagonal line set", matching a pair of matching left and right line segments into a complete inverted V.
[0087] The coordinate system rotation method proposed in this embodiment of the invention achieves line segment segmentation, such as... Figure 2 As shown. A rectangular coordinate system is established with the bottom left corner of the binary image as the origin, denoted as the "original coordinate system". The coordinates of the i-th bright pixel are denoted as... Regarding the problem of pig collision signal identification addressed in this embodiment of the invention, the target diagonal lines in the spatiotemporal diagram have the same slope. Therefore, based on the slope of the target diagonal lines, the original coordinate system can be rotated by an angle θ to form a new coordinate system, denoted as "θ-rotated coordinate system," with the horizontal axis (denoted as xθ) of the new coordinate system perpendicular to the target diagonal lines. In the new coordinate system, the coordinates of each bright pixel are... In this embodiment of the invention, counterclockwise rotation is defined as positive, and the horizontal axis in the original coordinate system is 0°. Therefore, the angle of the left hypotenuse of the inverted V pattern is 60°, and the angle of rotation of the corresponding coordinate system is θ = -30°. Mathematically, coordinate system rotation can be expressed as a basis vector transformation:
[0088] (6)
[0089] in, and These are the basis vectors of the original coordinate system. and These are the new basis vectors of the θ-rotated coordinate system. Equation (6) can be rewritten in matrix form as shown in equation (7):
[0090] (7)
[0091] From equations (6) and (7), bright pixels New coordinates in the θ-rotated coordinate system It can be calculated using equation (8):
[0092] (8)
[0093] In the θ-rotated coordinate system, line segmentation is performed based on the xθ coordinate differences between bright pixels. The xθ coordinates of all bright pixels are extracted and sorted in ascending order. The pairwise xθ coordinate differences are calculated and denoted as a vector. ,in , This represents the total number of bright pixels in the binary image. Since the xθ axis is perpendicular to the target diagonal line, for two bright pixels located on the same diagonal line, The value is extremely small, and for two bright pixels located on different diagonal lines, The value is relatively large. Let the threshold for the difference in the xθ coordinates of bright pixels be denoted as... For the i-th bright pixel and the (i+1)-th bright pixel, if If so, the two are determined to belong to different diagonal lines. In this embodiment of the invention, Set to 50 pixels.
[0094] After the above line segmentation operation, several "left diagonal lines" (60°) and "right diagonal lines" (120°) are obtained. The above operation does not take into account the length of the extracted line segments, and only patterns whose "length" is significantly longer than their "width" will be recognized by the human eye as a line segment.
[0095] To further optimize the recognition results, line segments that are insufficient in length are discarded. This invention proposes an aspect ratio (denoted as LWR) to characterize whether a line segment is long enough. The aspect ratio is calculated in the θ-rotated coordinate system, as shown in equation (9). For the first A line segment is temporarily identified. In this embodiment of the invention, "pixel clusters" with an aspect ratio lower than 5 will be discarded.
[0096] (9)
[0097] V. Inverted V Matching Module
[0098] For an inverted V pattern recognizable by the human eye, the upper right endpoint of its left diagonal should be very close to the upper left endpoint of its right diagonal. Based on this property, this invention proposes an inverted V matching method using Euclidean distance between vertices. For each left diagonal line obtained in the line segmentation module, the maximum ordinate in the θ-rotated coordinate system is taken. The pixels are used as endpoints to record their Cartesian coordinates. For the right diagonal line, flip the image horizontally and repeat the same operation to find the corresponding vertex pixel, then flip it back and record its Cartesian coordinates. Calculate the Euclidean distance between each pair of left and right diagonal line endpoints, and denote the distance between the i-th left diagonal line endpoint and the j-th right diagonal line endpoint as... In this embodiment of the invention, an iterative method is adopted, matching only one inverted V at a time. The endpoint distance threshold is set to... ,Pick minimum value and Compare. If If the i-th left diagonal line is matched with the j-th right diagonal line to form an inverted V, then the matched diagonal lines are removed from the matching process to avoid the same diagonal line being identified as belonging to multiple inverted Vs. This matching and removal operation is repeated until a match is found in a certain judgment. This indicates that all inverted Vs in the spacetime diagram were successfully identified, and the remaining diagonal lines are all isolated diagonal lines. Figure 3 This is a diagram illustrating the matching of an inverted V.
[0099] After the inverted V matching is completed, each inverted V recognition result consists of two binary images, each containing only bright pixels belonging to the left and right hypotenuses of the inverted V. These two binary images share a Cartesian coordinate system. From the Cartesian coordinates of the bright pixels, the equations of the lines for the left and right hypotenuses can be obtained using the least squares linear fitting method. The coordinates of their intersection point can then be calculated, which are the vertex coordinates of the inverted V, thus providing the location information of the pig collision.
[0100] Example 2
[0101] The following section, using specific examples and calculation formulas, further illustrates the scheme in Example 1. See the description below for details:
[0102] Step 201: For each column of the original time-domain signal in the original spatiotemporal diagram output by the φ-OTDR system Perform an FFT to obtain the Fourier transform signal. ;
[0103] Step 202: In parallel with step 201, process each column of the original time-domain signal. A series of one-dimensional time-domain signals were obtained by performing a bandpass filter from 20 to 200 Hz. ;
[0104] Step 203: For each column of original time-domain signal Based on the Fourier transform signal obtained in step 201 The high-frequency component (481 - 500 Hz) is used for amplitude correction, and the final filtering result is calculated according to equation (1). The calculation method is shown in equation (1) in Example 1.
[0105] Among them, the BPF(si(t)) obtained in step 202 and the BPF(si(t)) obtained in step 203 above All of these are variables required for calculation by formula (1), and the two steps are parallel. That is, the above steps 201-203 constitute the internal processing flow of the data preprocessing module.
[0106] Step 204: For each final filtering result The fractional kurtosis is calculated according to equation (3) in Example 1, where M = 1.5, to obtain a kurtosis sequence k(i);
[0107] Step 205: Take the threshold Thre = 225, and binarize the kurtosis sequence k(i) according to equation (4) in Example 1 to obtain the binary sequence kbin(i);
[0108] Step 206: Perform a check on all points with kbin = 0. If there are points with kbin = 1 among the five adjacent points to its left and right, then set the kbin of the checked point to 1 as well.
[0109] Step 207: Determine whether there is a continuous "1 region" in the binary kurtosis sequence whose length exceeds the threshold (96 in this embodiment). If it exists, proceed to step 208; otherwise, determine that there is no target event in the spatiotemporal graph and the algorithm terminates.
[0110] That is, steps 204-207 above constitute the internal processing flow of the preliminary kurtosis judgment module.
[0111] Step 208: Perform Gaussian blur processing on the spatiotemporal graph after filtering in step 203 according to equation (2) in Example 1, where σ = 3;
[0112] Step 209: Scan the bright pixels located in the "kurtosis 1 region" point by point, and take the following for each bright pixel: Figure 1 The neighborhood shown is calculated according to the formula (5) in Example 1, and the bright pixel is retained based on the threshold. After scanning, the preliminary screening result of the left diagonal pixel is obtained.
[0113] Step 210: Flip the spatiotemporal map left and right, repeat step 209, and after scanning is complete, flip it back left and right to obtain the preliminary screening results of the right diagonal pixels.
[0114] That is, steps 208-210 above constitute the internal processing flow of the edge detection module. Step 211: Perform a coordinate system rotation operation of θ = -30° (counterclockwise is positive) on the preliminary screening results (binary image form) of the left diagonal pixels, so that the horizontal axis xθ of the new coordinate system is perpendicular to the left diagonal direction, and calculate each bright pixel according to formula (8) in Example 1. New coordinates in the new coordinate system ;
[0115] Step 212: Arrange all bright pixels in ascending order of their xθ coordinates, and calculate the difference between each pair of xθ coordinates to obtain the difference vector. ;
[0116] Step 213: Compare each one in turn. With threshold The size, if This represents a new line segment starting from the (i+1)th pixel. After the comparison is complete, the left diagonal line segmentation operation is performed;
[0117] Step 214: Flip the initial screening result of the right diagonal pixels left and right, repeat steps 211 to 213, and finally flip the result back left and right to complete the right diagonal segmentation operation.
[0118] Step 215: Calculate the aspect ratio of all left and right diagonal line segments according to formula (9) in Example 1, and remove “pixel clusters” with an aspect ratio less than 5;
[0119] That is, steps 211-215 above constitute the internal processing flow of the line segmentation module.
[0120] Step 216: For each diagonal line segment, take the pixel with the largest ordinate in the θ-rotation coordinate system, record its rectangular coordinates, and obtain a series of "left diagonal line vertices" and "right diagonal line vertices";
[0121] Step 217: Calculate the Euclidean distance between each pair of "left diagonal vertex" and "right diagonal vertex", and denote the distance between the i-th left diagonal endpoint and the j-th right diagonal endpoint as . ;
[0122] Step 218: Take minimum value and Compare, if Then the i-th "left diagonal" and the j-th "right diagonal" will be matched to form an inverted V;
[0123] Step 219: Remove the two matching diagonal lines, return to step 217, and repeat the above steps until a match is found. The algorithm terminates and outputs the inverted V recognition result;
[0124] Step 220: Calculate the equation of the line of each inverted V based on the pixel coordinates of the left and right diagonal sides, and calculate the coordinates of the intersection point based on the equation to obtain the position information of the pig collision signal.
[0125] That is, steps 216-220 above constitute the internal processing flow of the inverted V matching module.
[0126] Unless otherwise specified, the model numbers of the various devices in this embodiment of the invention are not limited, and any device that can perform the above functions is acceptable.
[0127] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0128] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A φ The OTDR pig collision signal identification and positioning device is characterized in that, The device includes: a data preprocessing module, a kurtosis preliminary judgment module, an edge detection module, a line segmentation module, and an inverted V matching module; The data preprocessing module preprocesses the input raw spatiotemporal map data and outputs a 0-1 binary image; The kurtosis preliminary judgment module judges the image before binarization after bandpass filtering. If the judgment is successful, the edge detection module is then used. The edge detection module detects edges in a 0-1 binary image and outputs the detection results for left and right diagonal lines. The line segmentation module performs line segmentation operations on the detection results of the left and right diagonal lines respectively, and outputs the segmentation results of the left and right diagonal lines, and obtains the number of the left and right diagonal lines respectively; The inverted V matching module adopts an iterative approach, taking the pair of left and right diagonal line segments with the closest "upper endpoint distance" each time, matching them into an inverted V pattern according to the distance threshold, and outputting the final inverted V pattern detection result.
2. A φ according to claim 1 The OTDR pig collision signal identification and positioning device is characterized in that, The preliminary kurtosis determination module determines the kurtosis of the image after bandpass filtering and before binarization as follows: For all points in the 0-1 binary sequence where kbin = 0, if there is a point with kbin = 1 among the five adjacent points to the left and right, then set the kbin of the point being judged to 1. If there are consecutive "1" regions exceeding the threshold in the binary kurtosis sequence, the edge detection module is executed if the condition is met; otherwise, the algorithm terminates if no target event exists in the spatiotemporal graph.
3. A φ according to claim 1 The OTDR pig collision signal identification and positioning device is characterized in that, The edge detection module detects the 0-1 binary image and outputs the detection results for left and right diagonal lines as follows: When both criteria exceed their corresponding thresholds, they are respectively denoted as and When a bright pixel is identified as belonging to a certain diagonal line, it is retained; otherwise, the pixel is converted to a dark pixel. in, Absolute criterion; Relative criteria; Bright pixel density in the online neighborhood Bright pixel density in the background neighborhood.
4. A φ according to claim 1 The OTDR pig collision signal identification and positioning device is characterized in that, The line segmentation module performs line segmentation operations on the left and right diagonal line detection results as follows: Bright pixels New coordinates in the θ-rotated coordinate system : In the θ-rotation coordinate system, a line segmentation operation is performed based on the xθ coordinate difference between each bright pixel to extract the xθ coordinates of all bright pixels and sort them from smallest to largest; Calculate the difference between the xθ coordinates of any two pairs of elements, denoted as a vector: ,in , Represents the total number of pixels in a binary image; Let the threshold for the difference in the xθ coordinates of bright pixels be... For the i-th bright pixel and the (i+1)-th bright pixel, if If they are different lines, then they are judged to be different lines.
5. A φ according to claim 4 The OTDR pig collision signal identification and positioning device is characterized in that, The line segment segmentation module further includes: Calculate the aspect ratio in the θ-rotated coordinate system. For the first A line segment that has been temporarily identified; 。 6. A φ according to claim 1 The OTDR pig collision signal identification and positioning device is characterized in that, The inverted V matching module is: For each left-sloping line segment obtained in the line segmentation module, obtain the maximum ordinate in the θ-rotation coordinate system. The pixels are used as endpoints to record their Cartesian coordinates. For right-sloping line segments, flip the image horizontally and then perform the same operation to find the corresponding vertex pixels, then flip it back to record its rectangular coordinates. Calculate the Euclidean distance between each pair of left and right diagonal endpoints, and denote the distance between the i-th left diagonal endpoint and the j-th right diagonal endpoint as . The iteration matches only one inverted V at a time, and the endpoint distance threshold is set to... ,Pick minimum value and Compare; if Then, the i-th "left diagonal" and the j-th "right diagonal" are matched to form an inverted V. The matched diagonals are then removed from the matching process. This matching and removal operation is repeated until a certain judgment is made. This indicates that all inverted Vs in the spacetime diagram were successfully identified, and the remaining diagonal lines are all isolated diagonal lines.
7. A type of φ The method for identifying and locating collision signals of OTDR pigs is characterized by, The method includes: Based on each column of original time-domain signals Bandpass filtering was performed on the frequencies of 20-200Hz to obtain the results. And the signal after Fourier transform Take its high-frequency components Amplitude correction is performed, and the final filtering result is calculated. ; For each final filtering result Calculate the fractional kurtosis to obtain a kurtosis sequence k(i); binarize the kurtosis sequence k(i) to obtain a binary sequence kbin(i); For all points with kbin = 0, perform a check. If there is a point with kbin = 1 among the five adjacent points to the left and right, then set the kbin of the checked point to 1. Determine whether there is a continuous "1 region" in the binary kurtosis sequence whose length exceeds the threshold. If so, perform Gaussian blur processing on the filtered spatiotemporal graph. The bright pixels located in the "kurtosis 1 region" are scanned point by point. For each bright pixel, the neighborhood is taken, two criteria are calculated, and a threshold is used to decide whether to retain the bright pixel. After the scan is completed, the preliminary screening results of the left diagonal pixels are obtained. Flip the spatiotemporal map horizontally, and after scanning, flip it back horizontally to obtain the preliminary filtering results of the right diagonal pixels. The initial screening results of the pixels on the left diagonal are rotated by θ = -30° to make the horizontal axis xθ of the new coordinate system perpendicular to the left diagonal direction. Each bright pixel is then calculated. New coordinates in the new coordinate system ; Arrange all bright pixels in ascending order of their xθ coordinates, and calculate the difference between each pair of xθ coordinates to obtain the difference vector. ; Compare each one in turn With threshold The size, if This represents a new line segment starting from the (i+1)th pixel. After comparison, the left diagonal line segmentation operation is completed; The initial filtering results of the right diagonal pixels are flipped left and right, and finally the results are flipped back left and right to complete the right diagonal segmentation operation. Calculate the aspect ratio for all left and right diagonal line segments, and remove "pixel clusters" with an aspect ratio less than 5; For each diagonal line segment, take the pixel with the maximum ordinate in the θ-rotation coordinate system, record the rectangular coordinates, and obtain a series of "left diagonal line vertices" and "right diagonal line vertices"; Calculate the Euclidean distance between each pair of "left diagonal vertex" and "right diagonal vertex" in turn, and denote the distance between the i-th left diagonal endpoint and the j-th right diagonal endpoint as . ; Pick minimum value and Compare, if Then the i-th "left diagonal" and the j-th "right diagonal" will be matched to form an inverted V; Remove the two left and right diagonal lines that have already been matched, until a certain judgment is made. The algorithm terminates and outputs the inverted V recognition result; Based on the pixel coordinates of the left and right diagonal sides of each inverted V, calculate its linear equation, and then calculate the coordinates of the intersection point based on the equation to obtain the location information of the pig collision signal.