Mass ground penetrating radar disease data calculation space intersection method
By expanding the ground-penetrating radar disease data into a cube and calculating its spatial intersection situation, the problems of slow calculation speed and unstable results in the prior art are solved, and more efficient disease detection is achieved.
Patent Information
- Application Number
- CN202411800316.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-04-01
AI Technical Summary
When the prior art calculates the spatial intersection of three-dimensional ground penetrating radar disease data, the speed is slow and the calculation results are unstable, which cannot meet the needs of rapid detection.
By expanding the disease into a cube, calculating the eight vertex coordinates of each disease, and rotating it on the horizontal plane, calculating the intersection of the disease projection on the z-axis and the xoy-axis, and finally extracting the disease with the same index and calculating its projection on the map.
It improves the computing efficiency and synthesis efficiency, and is faster and more stable than the DBSCAN clustering method, and can meet the needs of rapid detection.
Smart Images

Figure CN119741193A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of road damage detection, in particular to a method for calculating spatial intersection of massive ground penetrating radar damage data. Background Art
[0002] Road safety has always been a top priority for social and economic development and has promoted economic development. However, due to the fact that roads are easily worn out and maintenance and management technology is limited, safety accidents caused by road diseases are emerging in an endless stream, seriously affecting the safety of people's lives and property.
[0003] 3D ground penetrating radar technology uses array antenna multi-channel high-frequency antenna scanning. It is convenient for data collection and can realize efficient collection of the three-dimensional space of the road. It can also obtain massive three-dimensional data, realize high-precision positioning of abnormal disease bodies, accurately restore the location of underground diseases, and has extremely high detection accuracy and spatial resolution. However, the amount of data collected by 3D ground penetrating radar is large. In essence, it is manual detection and annotation of diseases, or through the analysis of the slice data of the 3D radar, and then locate the profile of a certain channel for verification, which takes a lot of time; intelligent detection can also be introduced into disease detection to greatly improve the efficiency of data analysis, but intelligent detection only detects radar profiles and cannot well show the precise location of the disease and the size in three-dimensional space.
[0004] There are several existing methods for calculating the spatial intersection of three-dimensional ground penetrating radar defects. The first is to use the DBSCAN clustering method. Due to the huge amount of data, the speed of DBSCAN is very slow, and DBSCAN clustering is particularly affected by parameters, and the result of calculating the intersection is unstable; the second is to directly project the three-dimensional ground penetrating radar defect data on the map and use the spatial information of the radar data for calculation. This method loses the depth information of the radar data and cannot locate the radar defects in depth; the third is to calculate the intersection and union ratio of each defect in space. When the amount of data is large, the excessively large matrix operation occupies a lot of memory and the speed is very slow, which cannot meet the needs of rapid detection. Summary of the invention
[0005] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a method for calculating spatial intersection of massive ground penetrating radar disease data.
[0006] The object of the present invention is achieved by the following technical solution: A method for calculating spatial intersection of massive ground penetrating radar disease data, comprising the following steps:
[0007] S1: Obtain all diseases to be synthesized and their corresponding location information, and traverse all diseases to generate their corresponding cubes;
[0008] S2: Calculate the coordinates of the eight vertices of each disease according to the center point, length, width and height of the disease;
[0009] S3: Rotate all the diseases on the horizontal plane to obtain the rotated coordinates;
[0010] S4: Calculate the intersection of the projection of the disease on the z-axis and the xoy-axis, and take the intersection of the two intersections to obtain the intersection of the spatial disease;
[0011] S5: Initialize the array keep, extract the diseases with the same index in keep and calculate their projections on the map to obtain the synthesized data.
[0012] Preferably, step S1 further includes the following steps:
[0013] S11: The obtained single disease is a rectangular frame, and the height of the disease frame is set to h, the coordinates of the upper right corner are (x1, y1), and the coordinates of the upper left corner are (x2, y2);
[0014] S12: Calculate the disease direction of the disease frame,
[0015] angle=arctan((y2-y1) / (x2-x1));
[0016] S13: traverse all diseases and generate corresponding cubes. Each disease cube is represented by an array of 1 row and 6 columns, recorded as [x, y, z, l, w, h], where x, y, z respectively represent the position information of the center of the cube in space, and l, w, h respectively represent the length, width and height of the cube;
[0017] S14: Obtain a two-dimensional matrix with n rows and 6 columns, where n is the number of diseases. The two-dimensional matrix represents information of all diseases to be synthesized, which is recorded as cubes.
[0018] Preferably, step S2 further includes the following steps:
[0019] S21: Get the center coordinates of all diseases from cubes: center=cubes[:,:,3];
[0020] S22: Let the center point of each cube be (x c ,y c ,z c ), the length, width and height are l, w and h respectively, then the eight vertices of each cube are equivalent to the offset of the center point:
[0021]
[0022] The coordinates of each vertex of the cube are:
[0023]
[0024] Among them, V i is the coordinate of the i-th vertex (x i ,y i ,z i ), C is the center point of the cube (x c ,y c ,z c ), D is the length, width and height of the cube (l, w, h), O i is the offset of the ith vertex, then each vertex V i The coordinate calculation formula is:
[0025]
[0026] The above formula is used to calculate the coordinates of the eight vertices of each cube, which are recorded as ver, where ver is a three-dimensional matrix of N*8*3.
[0027] Preferably, step S3 further includes the following steps:
[0028] S31: Let the center point of the cube be C i =(x c,i ,y c,i ,z c,i ), the vertex V of the cube i,j =(x i,j ,y i,j ,z i,j ), the offset of the vertex relative to the center point is calculated as:
[0029]
[0030] S32: Rotation matrix around the z-axis, the rotation angle is θ i , the rotated matrix R(θ i )for:
[0031]
[0032] S33: Rotate the vertex offset through the rotation matrix to obtain the rotated offset, and then add the rotated offset back to the center point to obtain the rotated center coordinates:
[0033] V′ i,j =C i +R(θ i )·(V i,j -C i );
[0034] Label the rotated vertex coordinates as rot_ver.
[0035] Preferably, in step S4, the intersection relationship between the cubes in rot_ver is calculated, and it is determined that there are two sets of identical cubes. Suppose the height range of the first set of cubes is Where i represents the i-th cube and the height range of the second cube set is Where j represents the jth cube, and the condition for high intersection is:
[0036] and
[0037] If this condition is met, there is overlap and intersection in the vertical direction, and the corresponding matrix element is 1, otherwise it is 0;
[0038] On the xoy plane, the four vertices of the rectangle are (x, y), and the two matrices are P i and P j , and its intersection condition is:
[0039] P i ∩P j ≠φ;
[0040] If the intersection is not empty, it means that the two rectangles intersect, and the corresponding matrix element is 1, otherwise it is 0;
[0041] The set of two cubes is and Their heights are and The rectangle on the xoy plane is and The intersection condition of the cube is:
[0042]
[0043] A matrix element of 1 indicates that the cubes intersect, and a matrix element of 0 indicates that they do not intersect. The intersection relations of all defects are calculated.
[0044] Preferably, step S5 further includes the following steps:
[0045] S51: Initialize keep,
[0046] keep = {0, 1, 2, ..., n-1};
[0047] Get the disease index set I that intersects with di i ,
[0048] I i ={j|iou ij =1};
[0049] When I iWhen it is not empty, add di to the set.
[0050] I i =I i Y{i};
[0051] Set the group numbers of these line segments to the smallest index value, and update the group numbers of all segments intersecting with di to k.
[0052] k=min(keep[I i ]);
[0053]
[0054] S52: Initialize the diseased area set,
[0055] DiseaseAreas = φ;
[0056] For each unique group number k,
[0057] I k ={i|kepp[i]==k};
[0058] Among them, I k It is the set of disease segment indexes of the same group k.
[0059] The present invention has the following advantages: the present invention expands the detected diseases into a cube, calculates the coordinate positions of the eight vertices of each disease according to the center point and the length, width and height of the disease, and rotates it in the horizontal plane to obtain the rotated coordinates, and obtains the intersection of the disease projection on the z-axis and the xoy-axis, and finally extracts the diseases with the same index in the array and calculates their projections on the map to obtain synthesized data, which improves the calculation efficiency and synthesis efficiency compared with DBSCAN clustering. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 Schematic diagram of the process of calculating the spatial intersection method for massive ground penetrating radar disease data. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0062] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0063] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0064] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0065] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inside", "outside", etc. indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, or the positions or positional relationships in which the product of the invention is usually placed when in use, or the positions or positional relationships commonly understood by those skilled in the art, which are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0066] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0067] In this embodiment, if Figure 1 As shown, a method for calculating spatial intersection of massive ground penetrating radar disease data includes the following steps:
[0068] S1: Obtain all diseases to be synthesized and their corresponding location information, and traverse all diseases to generate their corresponding cubes;
[0069] S2: Calculate the coordinates of the eight vertices of each disease according to the center point, length, width and height of the disease;
[0070] S3: Rotate all the diseases on the horizontal plane to obtain the rotated coordinates;
[0071] S4: Calculate the intersection of the projection of the disease on the z-axis and the xoy-axis, and take the intersection of the two intersections to obtain the intersection of the spatial disease;
[0072] S5: Initialize the array keep, extract the diseases with the same index in keep and calculate their projections on the map to obtain the synthesized data. By expanding the disease results detected on the section into a cube, and then calculating the coordinates of the eight vertices of each disease according to the center point and length, width and height of the disease, and rotating all the diseases on the horizontal plane to obtain the rotated coordinates, the intersection of the disease projection on the z-axis and the xoy-axis is obtained, and finally the diseases with the same index in the array are extracted and their projections on the map are calculated to obtain the synthesized data. Compared with DBSCAN clustering, the calculation efficiency and synthesis efficiency are improved.
[0073] Furthermore, step S1 further includes the following steps:
[0074] S11: The obtained single disease is a rectangular frame, and the height of the disease frame is set to h, the coordinates of the upper right corner are (x1, y1), and the coordinates of the upper left corner are (x2, y2);
[0075] S12: Calculate the disease direction of the disease frame,
[0076] angle=arctan((y2-y1) / (x2-x1));
[0077] S13: traverse all diseases and generate corresponding cubes. Each disease cube is represented by an array of 1 row and 6 columns, recorded as [x, y, z, l, w, h], where x, y, z respectively represent the position information of the center of the cube in space, and l, w, h respectively represent the length, width and height of the cube;
[0078] S14: Obtain a two-dimensional matrix of n rows and 6 columns, where n is the number of defects. The two-dimensional matrix represents information of all defects to be synthesized, which is recorded as cubes. Specifically, since there is a fixed spacing between the three-dimensional ground penetrating radar channels, when the defects are synthesized in three dimensions, it is necessary to increase a certain thickness of the rectangular frame in the direction of the ground penetrating radar channel so that the rectangular frame becomes a cube, that is, each cube represents a defect.
[0079] Furthermore, step S2 further includes the following steps:
[0080] S21: Get the center coordinates of all diseases from cubes: center=cubes[:,:,3];
[0081] S22: Let the center point of each cube be (x c ,y c ,z c ), the length, width and height are l, w and h respectively, then the eight vertices of each cube are equivalent to the offset of the center point:
[0082]
[0083] The coordinates of each vertex of the cube are:
[0084]
[0085] Among them, V i is the coordinate of the i-th vertex (x i ,y i ,z i ), C is the center point of the cube (x c ,y c ,z c ), D is the length, width and height of the cube (l, w, h), O i is the offset of the ith vertex, then each vertex V i The coordinate calculation formula is:
[0086]
[0087] The above formula is used to calculate the coordinates of the eight vertices of each cube, which are recorded as ver, where ver is a three-dimensional matrix of N*8*3.
[0088] In this embodiment, step S3 further includes the following steps:
[0089] S31: Let the center point of the cube be C i =(x c,i ,y c,i ,z c,i ), the vertex V of the cube i,j =(x i,j ,y i,j ,z i,j ), the offset of the vertex relative to the center point is calculated as:
[0090]
[0091] S32: Rotation matrix around the z-axis, the rotation angle is θ i , the rotated matrix R(θ i )for:
[0092]
[0093] S33: Rotate the vertex offset through the rotation matrix to obtain the rotated offset, and then add the rotated offset back to the center point to obtain the rotated center coordinates:
[0094] V′ i,j =C i +R(θ i )·(V i,j -C i );
[0095] The rotated vertex coordinates are marked as rot_ver, which is a three-dimensional matrix of N*8*3, recording the vertex coordinates of all defects after rotation. Specifically, because the position and direction of the defects in space are inconsistent, all defects need to be rotated on the horizontal plane to obtain the rotated coordinates, that is, the vertex minus the center point to obtain the offset vector, then the rotation matrix is applied, and finally the center point is added back. Because all defects are rotated on the horizontal plane, the method of calculating spatial intersection can be simplified.
[0096] Furthermore, in step S4, the intersection relationship between the cubes in rot_ver is calculated, and it is determined that there are two sets of identical cubes. Suppose the height range of the first cube set is Where i represents the i-th cube and the height range of the second cube set is Where j represents the jth cube, and the condition for high intersection is:
[0097] and
[0098] If this condition is met, there is overlap and intersection in the vertical direction, and the corresponding matrix element is 1, otherwise it is 0;
[0099] On the xoy plane, the four vertices of the rectangle are (x, y), and the two matrices are P i and P j , and its intersection condition is:
[0100] P i ∩P j ≠φ;
[0101] If the intersection is not empty, it means that the two rectangles intersect, and the corresponding matrix element is 1, otherwise it is 0;
[0102] The set of two cubes is and Their heights are and The rectangle on the xoy plane is and The intersection condition of the cube is:
[0103]
[0104] A matrix element of 1 indicates that the cubes intersect, and a matrix element of 0 indicates that they do not intersect. The intersection relations of all defects are calculated.
[0105] Furthermore, step S5 further includes the following steps:
[0106] S51: Initialize keep,
[0107] keep = {0, 1, 2, ..., n-1};
[0108] Get the disease index set I that intersects with di i ,
[0109] I i ={j|iou ij =1};
[0110] When I i When it is not empty, add di to the set.
[0111] I i =I i Y{i};
[0112] Set the group numbers of these line segments to the smallest index value, and update the group numbers of all segments intersecting with di to k.
[0113] k=min(keep[I i ]);
[0114]
[0115] S52: Initialize the diseased area set,
[0116] DiseaseAreas = φ;
[0117] For each unique group number k,
[0118] I k ={i|keep[i]==k};
[0119] Among them, I k It is the set of disease segment indexes of the same group k.
[0120] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for calculating spatial intersection of massive ground penetrating radar disease data, characterized by: The following steps are involved: S1: Obtain all diseases to be synthesized and their corresponding location information, and traverse all diseases to generate their corresponding cubes; S2: Calculate the coordinates of the eight vertices of each disease according to the center point, length, width and height of the disease; S3: Rotate all the diseases on the horizontal plane to obtain the rotated coordinates; S4: Calculate the intersection of the projection of the disease on the z-axis and the xoy-axis, and take the intersection of the two intersections to obtain the intersection of the spatial disease; S5: Initialize the array keep, extract the diseases with the same index in keep and calculate their projections on the map to obtain the synthesized data.
2. The method for calculating spatial intersection of massive ground penetrating radar disease data according to claim 1, characterized in that: The step S1 further includes the following steps: S11: The obtained single disease is a rectangular frame, and the height of the disease frame is set to h, the coordinates of the upper right corner are (x1, y1), and the coordinates of the upper left corner are (x2, y2); S12: Calculate the disease direction of the disease frame, angle=arctan((y2-y1) / (x2-x1)); S13: traverse all diseases and generate corresponding cubes. Each disease cube is represented by an array of 1 row and 6 columns, recorded as [x, y, z, l, w, h], where x, y, z respectively represent the position information of the center of the cube in space, and l, w, h respectively represent the length, width and height of the cube; S14: Obtain a two-dimensional matrix with n rows and 6 columns, where n is the number of diseases. The two-dimensional matrix represents information of all diseases to be synthesized, which is recorded as cubes.
3. The method for calculating spatial intersection of massive ground penetrating radar disease data according to claim 2 is characterized by: The step S2 further includes the following steps: S21: Get the center coordinates of all diseases from cubes: center = cubes[:,:,3]; S22: Let the center point of each cube be (x c ,y c ,z c ), the length, width and height are l, w and h respectively, then the offset of the eight vertices of each cube to the center point is: The coordinates of each vertex of the cube are: Among them, V i is the coordinate of the i-th vertex (x i ,y i , z i ), C is the center point of the cube (x c ,y c ,z c ), D is the length, width and height of the cube (l, w, h), O i is the offset of the ith vertex, then each vertex V i The coordinate calculation formula is: The above formula is used to calculate the coordinates of the eight vertices of each cube, which are recorded as ver, where ver is a three-dimensional matrix of N*8*3.
4. The method for calculating spatial intersection of massive ground penetrating radar disease data according to claim 3 is characterized by: The step S3 further includes the following steps: S31: Let the center point of the cube be C i =(x c,i ,y c,i , z c,i ), the vertex V of the cube i,j =(x i,j ,y i,j , z i,j ), the offset of the vertex relative to the center point is calculated as: S32: Rotation matrix around the z-axis, the rotation angle is θ i , the rotated matrix R(θ i )for: S33: Rotate the vertex offset through the rotation matrix to obtain the rotated offset, and then add the rotated offset back to the center point to obtain the rotated center coordinates: V′ i,j =C i +R(θ i )·(V i,j -C i ); Label the rotated vertex coordinates as rot_ver.
5. The method for calculating spatial intersection of massive ground penetrating radar disease data according to claim 4, characterized in that: In step S4, the intersection relationship between the cubes in rot_ver is calculated, and it is determined that there are two sets of identical cubes. Suppose the height range of the first cube set is Where i represents the i-th cube and the height range of the second cube set is Where j represents the jth cube, and the condition for high intersection is: and If this condition is met, there is overlap and intersection in the vertical direction, and the corresponding matrix element is 1, otherwise it is 0; On the xoy plane, the four vertices of the rectangle are (x, y), and the two matrices are P i and P j , and its intersection condition is: P i ∩P j ≠φ; If the intersection is not empty, it means that the two rectangles intersect, and the corresponding matrix element is 1, otherwise it is 0; The set of two cubes is and Their heights are and The rectangle on the xoy plane is and The intersection condition of the cube is: A matrix element of 1 indicates that the cubes intersect, and a matrix element of 0 indicates that they do not intersect. The intersection relations of all defects are calculated.
6. The method for calculating spatial intersection of massive ground penetrating radar disease data according to claim 5, characterized in that: The step S5 further includes the following steps: S51: Initialize keep, keep={0,1,2,…,n-1}; Get the disease index set I that intersects with di i , I i ={j|iou ij =1}; When I i When it is not empty, add di to the set. I i =I i Y{i}; Set the group numbers of these line segments to the smallest index value, and update the group numbers of all segments intersecting with di to k. k=min(keep[I i ]); S52: Initialize the diseased area set, DiseaseAreas = φ; For each unique group number k, I k ={i|keep[i]==k}; Among them, I k It is the set of disease segment indexes of the same group k.