A warning line superposition method and device
By obtaining the real-time data of the drone and the pipeline pile coordinates, determining the cordon coordinates and superimposing them into the inspection video, the problems of high computing power and poor versatility in the existing technology are solved, and efficient and low-cost long-term pipeline inspections are achieved.
Patent Information
- Application Number
- CN202510668070.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-05-23
AI Technical Summary
The existing virtual logo and inspection video superposition methods have high computing power requirements and are poor in versatility, making it difficult to efficiently inspect key areas under complex terrain of long-distance pipelines.
By obtaining real-time data during the drone inspection and pipeline pile coordinate data sets, the cordon coordinate points on both sides of the warning area are determined, the vertex coordinates of the field of view are determined based on the pod attitude information, and the cordons are superimposed in the inspection video stream to reduce computing power requirements and improve universality.
It effectively reduces the computing power requirements of the processor, improves patrol efficiency and versatility, and makes it easier for staff to focus on risk areas, discover potential threats, and reduce labor costs.
Smart Images

Figure CN120201168B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of pipeline inspection, and in particular to a warning line superposition method and device. Background Art
[0002] Long-distance pipelines, as crucial infrastructure for the transmission of oil and gas resources, often require traversing complex terrain, particularly mountainous areas and those crossing major rivers. Traditional manual inspections face significant efficiency bottlenecks in these complex areas, with limited accessibility and numerous challenges. Therefore, the use of drones for inspections has become an ideal, more efficient, accurate, safe, and intelligent option. However, current long-distance pipelines are mostly laid underground. Compared to traditional overhead or surface installations, these pipelines present hidden engineering defects with greater spatial enclosure and uncertain dynamic evolution, making it difficult to identify key inspection areas using conventional inspection videos.
[0003] In view of the above characteristics, the existing technology uses spatiotemporal coupling visualization technology to superimpose the underground pipe body into the inspection video in the form of a virtual mark, so as to help the inspection personnel quickly determine the key inspection areas. The existing methods of superimposing virtual marks and inspection videos include the method of superimposing 3D earth models and videos recorded in the Chinese patent with publication number CN113570720A. This method requires the construction of a 3D earth model. In the complex and diverse geographical environment of long-distance pipelines, the cost of constructing a 3D earth model is huge and the versatility is poor. In addition, in actual applications, this method requires spatial matching between the 3D earth model and the video, 3D rendering and superposition, and other operations, which require high computing power of the processor. And the method of superimposing the point cloud module with the target line recorded in the Chinese patent with publication number CN118587394A. This method first needs to build a point cloud model of the inspection video, and then superimpose the target route into the point cloud model. The constructed point cloud model is expensive and can only be used in the scene corresponding to the inspection video. It has poor versatility. In addition, when superimposing the point cloud model with the target route, it is also necessary to load the point cloud model first and then perform the superposition processing, which requires high computing power of the processor. Summary of the Invention
[0004] The embodiments of the present application provide a warning line superposition method and device, which solves the problem that the existing method of superimposing virtual signs and inspection videos has high computing power requirements and poor versatility.
[0005] In a first aspect, an embodiment of the present application provides a warning line superposition method, comprising: obtaining real-time data and a pipeline pile number coordinate data set during a drone inspection process; wherein the real-time data includes the drone's position information, the pod attitude information, and the inspection video stream shot by the pod camera; determining the warning line coordinate points on both sides of the warning area according to the pipeline pile number coordinate data set, and connecting the warning line coordinate points on both sides of the warning area to obtain the pipeline warning line; determining the field of view vertex coordinates of the pod camera according to the pod attitude information; determining the field of view intersection point between the current field of view and the pipeline warning line according to the field of view vertex coordinates and the pipeline warning line; converting the field of view intersection point to a pixel coordinate system to obtain a pixel warning coordinate, and drawing a line between the pixel warning coordinates in the video frame corresponding to the inspection video stream to superimpose the pipeline warning line on the inspection video stream.
[0006] In combination with the first aspect, in a possible implementation method, after obtaining the real-time data and pipeline pile number coordinate data set during the drone inspection process, it also includes: establishing a local rectangular coordinate system with the east direction as the X-axis, the north direction as the Y-axis, and the direction perpendicular to the XY plane as the Z-axis; using the starting point of the drone as the origin of the local rectangular coordinate system and the longitude and latitude coordinate system; determining the unit change of the position information of the drone on different coordinate axes in the local rectangular coordinate system; determining the position of the position information on the local rectangular coordinate system based on the unit change, so as to convert the position information of the drone to the local rectangular coordinate system.
[0007] In combination with the first aspect, in a possible implementation method, the determining of the warning line coordinate points on both sides of the warning zone based on the pipeline pile number coordinate data set includes: grouping adjacent pipeline pile number coordinates in the pipeline pile number coordinate data set in pairs to obtain multiple coordinate groups; determining the inclination angle of the straight line where the two pipeline pile number coordinates in each coordinate group are located relative to the coordinate axis to obtain a first angle; determining the warning line coordinate group on one side of the warning zone corresponding to the coordinate group based on the first angle and the first distance; wherein the first distance is determined based on the range of the warning zone to be inspected; determining the intersection points of the straight lines where each adjacent warning line coordinate group is located based on the warning line coordinate group, and using them as the warning line coordinate points on one side of the warning zone; and determining the warning line coordinate points on the other side of the warning zone based on the warning line coordinate points on one side of the warning zone using the midpoint coordinate formula.
[0008] In combination with the first aspect, in a possible implementation method, the determination of the warning line coordinate group on the side of the warning zone corresponding to the coordinate group based on the first angle and the first distance includes: determining a point on the straight line where the coordinates of the two pipeline pile numbers in the coordinate group are located as the rotation center, rotating the initial line segment formed by the coordinate group around the rotation center by the first angle to obtain a parallel line segment parallel to the coordinate axis; translating the parallel line segment along the direction of its perpendicular line by the first distance to obtain a translated line segment; rotating the translated line segment around the rotation center by a negative first angle to obtain a rotated line segment; and determining the warning line coordinate group on the side of the warning zone corresponding to the coordinate group based on the coordinate points where the two endpoints of the rotated line segment are located.
[0009] In combination with the first aspect, in a possible implementation method, before determining the coordinates of the field of view vertex of the pod camera based on the pod attitude information, it includes: converting the pod attitude information in the relative coordinate system to the local rectangular coordinate system to obtain the pod attitude information in the local rectangular coordinate system.
[0010] In combination with the first aspect, in a possible implementation method, the warning line coordinate group on the side of the warning zone corresponding to the coordinate group is determined based on the first angle and the first distance, including: taking one pipeline pile number coordinate in the coordinate group as the first rotation center, and rotating the other pipeline pile number coordinate along the first rotation center by the first angle to obtain a first coordinate point; translating the first rotation center and the first coordinate point by a first distance in a direction perpendicular to the line between the first rotation center and the first coordinate point to obtain a second rotation center and a second coordinate point; rotating the second rotation center and the second coordinate point along the first rotation center by the negative first angle to obtain a third rotation center and a third coordinate point, which is the warning line coordinate group on the side of the warning zone corresponding to the coordinate group.
[0011] In combination with the first aspect, in a possible implementation method, determining the field of view intersection point of the current field of view and the pipeline warning line based on the field of view vertex coordinates and the pipeline warning line includes: determining the current field of view based on the field of view vertex coordinates; determining the pipeline stake number coordinates within the current field of view based on the current field of view and the position information of the drone; and determining the field of view intersection point of the current field of view and the pipeline warning line based on the pipeline stake number coordinates within the current field of view.
[0012] In combination with the first aspect, in a possible implementation method, determining the field of view vertex coordinates of the pod camera based on the pod attitude information further includes: converting the pod attitude information in the relative coordinate system to the local rectangular coordinate system to obtain the pod attitude information in the local rectangular coordinate system.
[0013] In combination with the first aspect, in a possible implementation method, determining the field of view vertex coordinates of the pod camera based on the pod attitude information includes: determining the initial field of view vertex of the pod camera in its coordinate system based on the pod attitude information; converting the initial field of view vertex to a local rectangular coordinate system to obtain the field of view vertex coordinates.
[0014] In combination with the first aspect, in a possible implementation method, before determining the field of view intersection point of the current field of view and the pipeline warning line based on the field of view vertex coordinates and the pipeline warning line, it also includes: determining the pipeline pile number interval where the drone is located based on the position information of the drone; determining the moving range of the longitudinal field of view based on the current pitch angle change of the pod; and determining the pile number interval where the field of view intersection point needs to be determined based on the pipeline pile number interval and the moving range of the longitudinal field of view.
[0015] In combination with the first aspect, in a possible implementation, determining the field of view intersection point of the current field of view and the pipeline warning line based on the field of view vertex coordinates and the pipeline warning line includes: determining the current field of view based on the field of view vertex coordinates; determining the pipeline stake number coordinates within the current field of view based on the current field of view and the position information of the drone; and determining the field of view intersection point of the current field of view and the pipeline warning line based on the pipeline stake number coordinates within the current field of view.
[0016] In the second aspect, an embodiment of the present application provides a warning line overlay device, comprising: a data acquisition module for acquiring real-time data and a pipeline pile number coordinate data set during a drone inspection process; wherein the real-time data includes the drone's position information, the pod attitude information, and the inspection video stream shot by the pod camera; a pipeline warning line module for determining the warning line coordinate points on both sides of the warning area based on the pipeline pile number coordinate data set, and connecting the warning line coordinate points on both sides of the warning area to obtain the pipeline warning line; a field of view vertex coordinate module for determining the field of view vertex coordinates of the pod camera based on the pod attitude information; a field of view intersection module for determining the field of view intersection of the current field of view and the pipeline warning line based on the field of view vertex coordinates and the pipeline warning line; an overlay module for converting the field of view intersection into a pixel coordinate system to obtain a pixel warning coordinate, and drawing a line between the pixel warning coordinates in the video frame corresponding to the inspection video stream to overlay the pipeline warning line on the inspection video stream.
[0017] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:
[0018] The present embodiment acquires real-time data and a pipeline stake coordinate dataset during a drone inspection. The real-time data includes the drone's location information, pod attitude information, and an inspection video stream captured by the pod camera. The pipeline stake coordinate dataset is used to determine the warning line coordinates on both sides of the warning zone, and the warning line coordinates on both sides of the warning zone are connected to obtain the pipeline warning line. The pod camera's field of view vertex coordinates are determined based on the pod attitude information. The field of view intersection point between the current field of view and the pipeline warning line is determined based on the field of view vertex coordinates and the pipeline warning line. The field of view intersection point is converted to a pixel coordinate system to obtain pixel warning coordinates. Lines connecting the pixel warning coordinates are drawn in the corresponding video frames of the inspection video stream to overlay the pipeline warning line onto the inspection video stream. This effectively addresses the high computing power requirements and poor versatility of existing methods for overlaying virtual markers with inspection videos. This allows workers to more easily focus on risk areas, improves inspection efficiency, and more easily detects potential threats to long-distance pipelines. This enhances the worker experience, reduces labor costs and processor computing power requirements, and offers high versatility. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments of the present application or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 A flowchart of a warning line superposition method provided in an embodiment of the present application;
[0021] Figure 2 A flowchart for determining the coordinate points of the warning lines on both sides of the warning area based on the pipeline pile number coordinate data set provided in an embodiment of the present application;
[0022] Figure 3 This is an example diagram of the chaotic and distorted lines that appear in the broken line parallel line algorithm provided in the embodiment of the present application;
[0023] Figure 4 An example diagram of the first coordinate group provided in an embodiment of the present application;
[0024] Figure 5 This is an example diagram of the first coordinate group after rotation and translation provided in an embodiment of the present application;
[0025] Figure 6 An example diagram of a warning coordinate group corresponding to the first coordinate group provided in an embodiment of the present application;
[0026] Figure 7An example diagram of determining the intersection of the straight lines where adjacent warning line coordinate groups are located, provided in an embodiment of the present application;
[0027] Figure 8 A schematic diagram of the geometric relationship between the camera field of view and the real-time position of the drone provided in an embodiment of the present application;
[0028] Figure 9 This is an example diagram of the long-distance pipeline and the intersection of the pipeline warning line and the current field of view provided in the embodiment of the present application;
[0029] Figure 10 Schematic diagram of the geometric relationship between the coordinate system PxOlPy and m1 provided in the embodiment of the present application;
[0030] Figure 11 This is an example diagram of a long-distance pipeline and its corresponding pipeline warning line within the current field of view of the pod camera provided in an embodiment of the present application;
[0031] Figure 12 A schematic structural diagram of a warning line superposition device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0033] The following description of some of the technologies involved in the embodiments of this application is provided to facilitate understanding and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of this application. Similarly, for the sake of clarity and conciseness, some descriptions of well-known functions and structures are omitted from the following description.
[0034] Figure 1 This is a flowchart of a warning line superposition method provided by an embodiment of the present application, including steps 101 to 105. Figure 1 This is only an execution order shown in the embodiment of the present application, and does not represent the only execution order of a warning line superposition method. If the final result can be achieved, Figure 1 The steps shown may be performed in parallel or reversed.
[0035] Step 101: Acquire real-time data and a dataset of pipeline stake coordinates during the drone inspection process. In this embodiment, a two-axis visible light pod camera (with image stabilization) mounted on a drone is used to collect real-time data. This real-time data includes the drone's location information, pod attitude information, and the inspection video stream captured by the pod camera.
[0036] Furthermore, the drone's location information includes its real-time position and attitude. The drone's real-time position is in a latitude and longitude coordinate system, while its real-time attitude is in a body coordinate system, including the body pitch angle, body roll angle, and body yaw angle. The body coordinate system is centered on the drone's center of gravity, with the X-axis pointing along the nose of the drone, the Y-axis pointing perpendicular to the X-axis and pointing to the right, and the Z-axis pointing perpendicular to the XY plane and pointing downward. The pod attitude information includes the pod attitude angle and the camera's field of view. The pod attitude angle describes the spatial orientation of the pod camera relative to the drone's main body and includes the pod pitch angle, pod roll angle, and pod yaw angle. The pod attitude angle is in a relative coordinate system, which is the coordinate system of the pod camera relative to the drone's body coordinate system. The relative coordinate system is referenced to the pod camera itself, with its origin at its geometric center, and its coordinate axes aligned with those of the body coordinate system. The camera field of view (FOV) describes the spatial range that the pod camera's lens can capture, including the horizontal FOV (the angular range covered by the pod camera horizontally) and the vertical FOV (the angular range covered by the pod camera vertically). The pod camera's coordinate system is the world coordinate system, and the coordinate system used during its imaging process is the pixel coordinate system. The pixel coordinate system can be associated with the pod camera's coordinate system to describe the position of image pixels within the field of view. The pipeline stake coordinate dataset represents a dataset consisting of the coordinates of each pipeline stake on a long-distance pipeline. Pipeline stakes are laid at even intervals along the long-distance pipeline, with additional pipeline stakes added at special locations such as crossings, elbows, and test piles. This application can use all pipeline stake coordinates as the pipeline stake coordinate dataset, or it can use only the coordinates of the pipeline stakes set at elbows, that is, the coordinates at each inflection point of the long-distance pipeline, as the pipeline stake coordinate dataset. Pipeline stake coordinates ignore their altitude information and are based on the east direction as the X-axis and the north direction as the Y-axis.
[0037] In an embodiment of the present application, after obtaining real-time data and a pipeline pile number coordinate data set during a drone inspection, the method further includes: establishing a local rectangular coordinate system with the east direction as the X-axis, the north direction as the Y-axis, and the direction perpendicular to the XY plane as the Z-axis. The starting point of the drone is used as the origin of the local rectangular coordinate system and the longitude and latitude coordinate system. The unit change of the drone's position information on different coordinate axes in the local rectangular coordinate system is determined. Based on the unit change, the position of the position information in the local rectangular coordinate system is determined to convert the drone's position information to the local rectangular coordinate system.
[0038] Specifically, a local rectangular coordinate system is established with the east direction as the X-axis, the north direction as the Y-axis, and the direction perpendicular to the XY plane as the Z-axis. That is, the Z-axis can be perpendicular to the XY plane and point toward the sky to form a northeast celestial coordinate system, or it can be perpendicular to the XY plane and point toward the ground to form a northeast terrestrial coordinate system. This application exemplarily uses the northeast celestial coordinate system as the local rectangular coordinate system.
[0039] Calculate the unit change in longitude per meter in the X-axis direction and the unit change in latitude per meter in the Y-axis direction in the local rectangular coordinate system. The Z-axis dimension is meters. The altitude data of the drone can be used directly. That is, the dimensions of longitude and latitude are converted to unit changes in meters. For example, 1° latitude is approximately 111319.49 meters (with slight changes from the equator to the poles). Longitude changes with latitude. 1° longitude is approximately: meters, of which Indicates the corresponding latitude.
[0040] This application selects the starting point of the drone as the origin of the local rectangular coordinate system and the latitude and longitude coordinate system respectively. The method for converting the position information of the drone in the local rectangular coordinate system is as follows:
[0041] ,
[0042] .
[0043] Where, ( ) represents the real-time position of the UAV in the local rectangular coordinate system, ( ) represents the longitude and latitude values of the real-time location of the drone. Indicates the unit change in longitude, Indicates the unit change of latitude, ( ) represents the origin of the local rectangular coordinate system, ( ) represents the origin of the latitude and longitude coordinate system.
[0044] Step 102: Determine the warning line coordinate points on both sides of the warning area according to the pipeline pile number coordinate data set, and connect the warning line coordinate points on both sides of the warning area to obtain the pipeline warning line.
[0045] In the embodiment of the present application, the warning zone is an area that needs to be monitored near the long-distance pipeline. It is surrounded by two pipeline warning lines parallel to the long-distance pipeline. The corresponding coordinate points on the pipeline warning lines need to be calculated based on the pipeline pile number coordinates of the buried pipeline. Common calculation methods include polygon expansion algorithm and broken line parallel line algorithm. Both algorithms are essentially based on the characteristics of vector operations. The polygon expansion algorithm is mainly used for closed intervals, and is mostly applicable to convex polygons. If applied to the calculation of long-distance pipeline warning lines, it is necessary to constrain the angles between adjacent pipelines, but the actual long-distance pipelines are buried according to the geographical environment and have a certain degree of randomness. Therefore, the polygon expansion algorithm cannot be well adapted to the pipeline layout with random characteristics. When the broken line parallel line algorithm faces two close points, it is easy to have confusing connections, resulting in shape distortion, such as Figure 3 If this method is used to solve the pipeline warning line, it is necessary to constrain the distance between pipeline piles on long-distance pipelines, or to constrain the upper limit of the safety distance. It is also difficult to apply to pipeline layouts buried according to geographical environments.
[0046] In the embodiment of the present application, the Figure 2 The method shown can solve the problem of randomness in the pile numbers of buried pipelines. Figure 2 The steps above can be used to calculate the warning line coordinate points on the pipeline warning line in a portion of the warning zone corresponding to the pipeline stake coordinates in the currently captured inspection video stream based on the real-time data from the drone. The warning line coordinate points on the pipeline warning line in the entire warning zone can also be calculated based on the coordinates of all pipeline stakes in the pipeline stake coordinate dataset.
[0047] Figure 2 The process includes steps 201 to 205, which are specifically as follows.
[0048] Step 201: Group adjacent pipe pile coordinates in the pipe pile coordinate data set into pairs to obtain multiple coordinate groups. In this embodiment of the present application, each pair of adjacent pipe pile coordinates in the pipe pile coordinate data set is grouped into a coordinate group, and the middle pipe pile coordinate can be shared by both adjacent coordinate groups.
[0049] For example, the pipeline pile number coordinate data set includes: P00, P01, P02, ..., P0n. The coordinate groups of these n pipeline pile number coordinates include: (P00, P01), (P01, P02), ..., (P0n-1, P0n), and n-1 coordinate groups are obtained.
[0050] Step 202: Determine the inclination angle of the line containing the two pipe stake coordinates in each coordinate group relative to the coordinate axis to obtain a first angle. In this embodiment of the present application, the inclination angle of the line containing two adjacent pipe stake coordinates in different coordinate groups relative to the coordinate axis is calculated to obtain the first angle.
[0051] Specifically, taking the first coordinate group (P00, P01) as an example, the calculation method of the first angle of the remaining coordinate groups is the same and will not be repeated here. The calculation method of the first angle of the coordinate group (P00, P01) is as follows:
[0052] ,
[0053] or, .
[0054] Where, represents the first angle, ( , ) represents the coordinate of the pipeline stake number P00, ( , ) represents the coordinate of the pipeline stake coordinate P01, when or When , it means that the straight line where the coordinate group (P00, P01) is located is parallel to the coordinate axis. , no need to rotate.
[0055] The application can also use the following method to calculate the first angle:
[0056] ,
[0057] or, .
[0058] Where, represents the first angle, ( , ) represents the coordinate of the pipeline stake coordinate P00, ( , ) represents the coordinate of the pipeline stake coordinate P01, when or When , it means that the straight line where the coordinate group (P00, P01) is located is parallel to the coordinate axis. , no need to rotate.
[0059] A positive first angle indicates clockwise rotation, and a negative first angle indicates counterclockwise rotation.
[0060] Step 203: Determine the coordinates of the warning lines on one side of the warning zone corresponding to the coordinate group based on the first angle and the first distance. In this embodiment, the width between the two pipeline warning lines is determined based on the scope of the warning zone to be inspected. For example, the scope of the warning zone in this application is set to 20 meters wide, so the first distance is 10 meters. The coordinates of the two pipeline stakes in the coordinate group are translated by the first distance perpendicular to the line containing the two pipeline stakes in the coordinate group to obtain the coordinates of the warning lines on the side of the warning zone corresponding to the coordinate group.
[0061] In one embodiment of the present application, a point is determined on the straight line containing the coordinates of two pipe pile numbers in a coordinate group as the rotation center. The initial line segment formed by the coordinate group is rotated about the rotation center by a first angle to obtain a parallel line segment parallel to the coordinate axis. The parallel line segment is translated along its perpendicular by a first distance to obtain a translated line segment. The translated line segment is rotated about the rotation center by a negative first angle to obtain a rotated line segment. The warning line coordinate group on the side of the warning zone corresponding to the coordinate group is determined based on the coordinate points of the two endpoints of the rotated line segment.
[0062] Specifically, take the first coordinate group (P00, P01) as an example. The operation method for the other coordinate groups is the same, so it will not be repeated here. Determine a point on the straight line where the two pipe pile coordinates in the coordinate group (P00, P01) are located as the rotation center. The rotation center can be a coordinate point between the line segments where the two pipe pile coordinates in the coordinate group are located, or a coordinate point outside the line segments where the two pipe pile coordinates in the coordinate group are located, or one of the two pipe pile coordinates in the coordinate group. Move the initial line segment (i.e. Figure 4 The line segment P00P01 in the figure is rotated by the first angle to obtain a parallel line segment parallel to the coordinate axis. Figure 5 As shown, P00 and P01 The corresponding line segment is the parallel line segment. Translate the parallel line segment along the direction of its perpendicular line by the first distance (i.e. Figure 5 d in), and get the translation line segment (i.e. Figure 5 Line segment P10 in P11 ). Rotate the translated segment around the rotation center by the negative first angle to obtain the rotated segment (i.e. Figure 6 Line segment P10 in P11 ), the coordinate points where the two endpoints of the rotating line segment are located are the warning line coordinate group on the side of the warning area corresponding to the coordinate group (P10 , P11 ).
[0063] In another embodiment of the present application, a pipeline stake coordinate in a coordinate group is used as a first rotation center, and another pipeline stake coordinate is rotated about the first rotation center by a first angle to obtain a first coordinate point. The first rotation center and the first coordinate point are translated by a first distance perpendicular to the line connecting the first rotation center and the first coordinate point to obtain a second rotation center and a second coordinate point. The second rotation center and the second coordinate point are rotated about the first rotation center by a negative first angle to obtain a third rotation center and a third coordinate point, which are the warning line coordinate group for the warning zone side corresponding to the coordinate group.
[0064] Specifically, the first coordinate group (P00, P01) is taken as an example here, and the calculation methods of the first angles of the remaining coordinate groups are the same and will not be described in detail here.
[0065] For example, Figure 4 As shown, with the pipe pile coordinate P00 as the first rotation center, another pipe pile coordinate P01 is rotated around it by a first angle to obtain the first coordinate point P01. At this time, the first rotation center P00 and the first coordinate point P01 The straight line is parallel to the X axis. Figure 5 As shown, along the line perpendicular to the first rotation center P00 and the first coordinate point P01 The direction of the line between the first rotation center P00 and the first coordinate point P01 Translate the first distance (i.e. Figure 5 d) Get the second rotation center P10 With the second coordinate point P11 . That is, the first rotation center P00 and the first coordinate point P01 Move 10 meters along the Y axis to get the second rotation center P10 With the second coordinate point P11 .like Figure 6 As shown, the second rotation center P10 With the second coordinate point P11 Rotate the first rotation center P00 by the negative first angle to obtain the third rotation center P10 and the third coordinate point P11 , which is the warning line coordinate group.
[0066] In addition, for the first and last pipeline pile coordinates in the pipeline pile coordinate data set, a warning line coordinate point that is flush with their coordinates (i.e., the same vertical coordinate or horizontal coordinate) can be determined, such as Figure 6 The coordinate point of the warning line that is aligned with the vertical coordinate of the pipeline pile number coordinate P00 is P10.
[0067] Specifically, at the third rotation center P10 and the third coordinate point P11 A warning line coordinate point is determined on the straight line that is flush with the pipeline stake coordinate P00 (ie, the same vertical coordinate), and the warning line coordinate point P10 is obtained.
[0068] Further, if Figure 6 As shown, the third rotation center P10 is obtained and the third coordinate point P11 After that, the following method can be used to determine the corresponding warning line coordinate point P10, as follows:
[0069] , .
[0070] Where, ( , ) represents the coordinates of the warning line point P10, d represents the first distance, represents the first angle, ( , ) represents the coordinate of the pipeline stake coordinate P00.
[0071] Similarly, the calculation method for the warning line coordinate point P100 of the pipeline warning line on the other side of the warning area corresponding to the pipeline stake coordinate P00 is as follows:
[0072] , .
[0073] Where, ( , ) represents the coordinates of the warning line point P100 on the other side of the warning area, d represents the first distance, represents the first angle, ( , ) represents the coordinate of the pipeline stake coordinate P00.
[0074] As can be seen from the above, the warning line coordinates P10 and P100 are the warning line coordinate points aligned with the Y axis. The warning line coordinate points aligned with the X axis can be derived according to the above formula and will not be repeated here.
[0075] Those skilled in the art will appreciate that the term "negative first angle" is used to describe the direction of rotation of the first angle. If the first angle is negative, the negative first angle represents a clockwise rotation, and if the first angle is positive, the negative first angle represents a counterclockwise rotation.
[0076] Step 204: Determine the intersection of the lines containing each adjacent warning line coordinate group based on the warning line coordinate group, and use it as the warning line coordinate point on one side of the warning area. In this embodiment of the present application, multiple warning line coordinate groups are obtained according to Steps 201 to 203 above, and the intersection of the lines containing two warning line coordinate points in each adjacent warning line coordinate group is calculated.
[0077] like Figure 7 As shown, taking the first coordinate group (P00, P01) and the second coordinate group (P01, P02) as an example, the corresponding warning line coordinate group on one side of the warning area is (P10 , P11 ) and (P11 , P12 ), according to (P10 , P11 ) and (P11 , P12 ) coordinates to establish the straight line equations respectively, and combine the two straight line equations to calculate (P10 , P11 ) and (P11 , P12 ) is the intersection point P11 of the straight line. It should be clear to those skilled in the art that if the warning line coordinate point P10 aligned with the pipeline stake coordinate P00 is calculated in step 203, the warning line coordinate point P10 can also be used here instead of the warning line coordinate point P10. .
[0078] Using the above method, the intersection points of the lines containing the two warning line coordinate points in each pair of adjacent warning line coordinate groups are calculated to obtain the warning line coordinate points on one side of the warning zone. That is, the first warning line coordinate point in the first warning line coordinate group, each intersection point, and the second warning line coordinate point in the last warning line coordinate group constitute the warning line coordinate points on one side of the warning zone.
[0079] Step 205: Based on the warning line coordinate points on one side of the warning zone, the midpoint coordinate formula is used to determine the warning line coordinate points on the other side of the warning zone. In this embodiment of the present application, the midpoint coordinates are calculated based on the warning line coordinate points on one side of the warning zone using the midpoint formula.
[0080] For example, taking the first pipe pile number coordinate P00 as an example, the corresponding warning line coordinate point on the warning area side is P10 , then the calculation method of the corresponding warning line coordinate point on the other side is as follows:
[0081] , .
[0082] Where, ( , ) represents the coordinates of the warning line point on the other side of the pipeline stake coordinate P00, ( , ) represents the coordinate of the pipeline stake number P00, ( , ) indicates the warning line coordinate point P10 's coordinates.
[0083] Using the above method, the corresponding warning line coordinate points on one side of the warning zone are calculated in sequence from the corresponding warning line coordinate points on the other side of the warning zone, thus obtaining the warning line coordinate points on both sides of the warning zone. Based on the distance between the warning line coordinate points on both sides, the warning line coordinate points on both sides of the warning zone are connected in sequence to obtain the pipeline warning line.
[0084] Step 103: Determine the coordinates of the pod camera's field of view vertex based on the pod attitude information. In an embodiment of the present application, before executing step 103, the pod attitude information in the relative coordinate system is first converted to the local rectangular coordinate system to obtain the pod attitude information in the local rectangular coordinate system. Specifically, the pod attitude information is relative to the real-time attitude of the drone, so it is necessary to convert the pod attitude angle in the pod attitude information to the local rectangular coordinate system corresponding to the drone. The relationship between the pod's relative coordinate system and the drone's local rectangular coordinate system is relatively simple, and the conversion can be completed based on the geometric relationship, which will not be elaborated here.
[0085] In the embodiment of the present application, the initial field of view vertex of the pod camera in its coordinate system is determined according to the pod attitude information, and the initial field of view vertex is converted to a local rectangular coordinate system to obtain the coordinates of the field of view vertex.
[0086] Specifically, if Figure 8 As shown, point P is the current position of the pod camera, PP "" represents the drone's flight direction, Q is the ground projection corresponding to P, O1 is the intersection of the pod camera's optical axis (imaging centerline) and the ground, A, B, C, and D are the intersections of the camera's field of view and the ground at the current altitude and position, i.e., the initial field of view vertices, E and F are the intersections of the drone's flight direction and field of view, and Yaw represents the yaw angle, i.e., the angle between the drone's flight direction and true north. The solid three-dimensional coordinate system is the local rectangular coordinate system of this application, and the dashed coordinate system is the ground two-dimensional coordinate system with Q as the origin.
[0087] First, calculate the coordinates of the initial field of view vertices A, B, C, and D in the world coordinate system of the pod camera as follows:
[0088] ,
[0089] ,
[0090] ,
[0091] ,
[0092] in, ,
[0093] ,
[0094] ,
[0095] ,
[0096] .
[0097] Where, ( , ) represents the coordinate of the initial field of view vertex B in the world coordinate system, and PF represents the distance between the current position of the pod camera and the front field of view area, that is, Figure 8 The length of PF in PE represents the distance between the current position of the pod camera and the rear field of view area, that is, Figure 8 The length of PE, Indicates the height of the pod camera from the ground, Figure 8 The length of PQ, It represents the complementary angle of the pod's pitch angle, that is, ( ),correspond Figure 8 ∠OPQ1 in represents the vertical field of view of the pod camera, i.e. Figure 8 ∠FPE in, represents the horizontal field of view of the pod camera, i.e. Figure 8 ∠BPC in ( , ) represents the coordinates of the initial field of view vertex A in the world coordinate system, ( , ) represents the coordinates of the initial field of view vertex D in the world coordinate system, ( , ) represents the coordinates of the initial field of view vertex C in the world coordinate system. Initial field of view vertices C and B are symmetrical about the line containing points E and F. Initial field of view vertices A and D are symmetrical about the line containing points E and F. In the ground two-dimensional coordinate system, the initial field of view vertices B and C have the same ordinate and opposite abscissas. Initial field of view vertices A and D have the same ordinate and opposite abscissas. In this way, the four initial field of view vertices are obtained.
[0098] The angle between the coordinate axes (Y-axis and Y-axis) of the local rectangular coordinate system and the ground two-dimensional coordinate system is the current yaw angle, so the initial field of view vertex can be converted to the local rectangular coordinate system according to the following formula. Taking the initial field of view vertex B as an example, the calculation method of its corresponding field of view vertex coordinates in the local rectangular coordinate system is as follows:
[0099] ,
[0100] .
[0101] Where, ( , ) represents the coordinates of the view vertex corresponding to the initial view vertex B in the local rectangular coordinate system, ( , ) represents the coordinate of the initial field of view vertex B in the world coordinate system, represents the yaw angle, i.e. Figure 8 The angle between QF and Y axis, ( , ) represents the coordinates of the current position of the pod camera projected on the ground, that is, Figure 8 The coordinates of point Q in the middle.
[0102] Similarly, the coordinates of the initial field of view vertices A, C, and D in the local rectangular coordinate system can be obtained, which will not be repeated here.
[0103] Step 104: Determine the intersection of the current field of view and the pipeline warning line based on the field of view vertex coordinates and the pipeline warning line. In this embodiment of the present application, the current field of view is determined based on the field of view vertex coordinates. The coordinates of the pipeline stake within the current field of view are determined based on the current field of view and the drone's position information. The intersection of the current field of view and the pipeline warning line is determined based on the pipeline stake coordinates within the current field of view.
[0104] Specifically, the range of the current field of view can be determined based on the obtained coordinates of the four field of view vertices. Figure 11 The figure shows an example of a long-distance pipeline and its corresponding pipeline warning line within the current field of view of the pod camera.
[0105] According to the straight line intersection formula, the intersection point of the current field of view and the pipeline warning line is calculated, and 4 field of view intersection points are obtained. Here, the intersection point of the current field of view, the pipeline warning line and the long-distance pipeline can also be calculated, and 6 field of view intersection points are obtained. If there is a pipeline stake number coordinate in the current field of view, 9 field of view intersection points are obtained. Figure 9 As shown in the figure, P1, P3, P4, and P6 are the four intersection points of the current field of view and the pipeline warning line, P2 and P5 are the two intersection points of the long-distance pipeline and the current field of view, and m1, m2, and m3 are the coordinates of the three pipeline pile numbers in the current field of view.
[0106] Furthermore, during drone flight, the changes in the pod camera's field of view are primarily determined by the drone's altitude and the pod's pitch angle, with changes in pitch angle significantly impacting the vertical field of view. When determining whether a pipeline stake coordinate is within the market area, a brute-force global loop determination method can significantly increase the time required as the number of pipeline stakes increases. Furthermore, loop determination for a fixed number of pipeline stakes cannot fully adapt to sudden changes in pitch angle.
[0107] In this embodiment of the present application, optimization can be performed based on the change in pitch angle. That is, before executing step 104, the pipeline station interval in which the drone is located can also be determined based on the drone's location information. The longitudinal field of view movement range is determined based on the current change in the pod's pitch angle. Based on the pipeline station interval and the longitudinal field of view movement range, the station interval in which the field of view intersection point needs to be determined is determined.
[0108] Specifically, based on the current real-time position of the drone, the Euclidean distance between the real-time position and the coordinates of each pipeline stake is calculated. The two pipeline stake coordinates with the smallest Euclidean distance are the pipeline stake intervals where the drone is currently located. The range of movement of the longitudinal field of view is determined based on the current pitch angle change of the pod, as follows:
[0109] .
[0110] Where, Indicates the moving range of the longitudinal field of view, Indicates the current real-time altitude of the drone. Indicates the current pitch angle, Indicates the pitch angle change.
[0111] when When , the stake number interval of the field of view intersection point needs to be determined as follows:
[0112] .
[0113] when When , the stake number interval of the field of view intersection point needs to be determined as follows:
[0114] .
[0115] Where, Indicates that the stake number interval of the field of view intersection needs to be determined. Indicates the pipe pile number interval where the drone is located, L indicates the distance between the current pipe pile number coordinate and the next pipe pile number coordinate. 、 Indicates the number of pipeline stakes, indicating the number of pipeline stake coordinates to be traversed. For example, .
[0116] Based on the drone's location information, this application can obtain only the coordinates of a few pipeline stakes near the drone's real-time location and calculate the intersection of these nearby pipeline stake coordinates and / or their corresponding pipeline warning lines with the current field of view or longitudinal field of view. In other words, only the coordinates of a few pipeline stakes near the drone's real-time location are obtained each time, and the pipeline stakes are traversed sequentially until the inspection is complete. This can reduce data transmission volume and improve the efficiency of calculating field of view intersections.
[0117] Step 105: Convert the field of view intersection point to the pixel coordinate system to obtain the pixel warning coordinates. Draw a line between the pixel warning coordinates in the video frame corresponding to the inspection video stream to superimpose the pipeline warning line on the inspection video stream. In this embodiment of the application, taking m1 as an example, the coordinates in the local rectangular coordinate system are converted to the world coordinate system of the pod camera. The calculation formula is as follows:
[0118] ,
[0119] .
[0120] Where, ( , ) represents the coordinates of m1 in the world coordinate system, ( , ) represents the coordinates of m1 in the local rectangular coordinate system, ( , ) represents the coordinates of the current position of the pod camera projected on the ground, Indicates the yaw angle.
[0121] Then, if Figure 10 As shown, establish the coordinate system PxOlPy with the center of the field of view O1, and calculate the coordinates of m1 in the coordinate system PxOlPy (X.Pm1, Y.Pm1). The calculation formula is as follows:
[0122] ,
[0123] .
[0124] Where, ( , ) represents the coordinates of m1 in the world coordinate system, (X.Pm1, Y.Pm1) represents the coordinates of m1 in the coordinate system PxOlPy, Indicates the height of the pod camera from the ground, Figure 8 The length of PQ, It represents the complementary angle of the pod's pitch angle, that is, ( ),correspond Figure 8 ∠OPQ1 in.
[0125] According to the dynamic resolution of (X.Pm1, Y.Pm1), the corresponding coordinates (X.m1, Y.m1) in the pixel coordinate system are determined as follows:
[0126] ,
[0127] .
[0128] Where (X.m1, Y.m1) represents the coordinates of m1 in the pixel coordinate system, (X.Pm1, Y.Pm1) represents the coordinates of m1 in the coordinate system PxOlPy, and W represents the horizontal pixel number of the pod camera imaging resolution. represents the horizontal field of view of the pod camera, i.e. Figure 8 ∠BPC in ( , ) represents the coordinates of m1 in the world coordinate system, Indicates the height of the pod camera from the ground, Figure 8 The length of PQ in the figure, H represents the vertical pixel number of the pod camera imaging resolution, It represents the complementary angle of the pod's pitch angle, that is, ( ),correspond Figure 8 ∠OPQ1 in represents the vertical field of view of the pod camera, i.e. Figure 8 ∠FPE in.
[0129] The present application discloses a method for overlaying warning lines, requiring minimal computing resources and placing low demands on processors. This method utilizes an onboard processor to generate pipeline warning lines in real time during drone inspections and overlay them onto the inspection video stream. Alternatively, after the inspection video stream is transmitted back to the ground, the pipeline warning lines can be calculated on the ground and overlaid onto the inspection video stream based on the pipeline stake coordinates. Furthermore, to adapt to different inspection areas, only the pipeline stake coordinate dataset needs to be replaced, resulting in low migration costs and high versatility. The two methods for overlaying virtual markers with inspection videos described in the background art, however, require high processor computing power, making them difficult to process in real time on an onboard processor.
[0130] Although this application provides method operation steps such as embodiments or flowcharts, more or fewer operation steps may be included based on routine or non-creative work. The order of steps listed in this embodiment is only one way of executing the steps among many, and does not represent the only execution order. When an actual device or client product executes, the method can be executed sequentially according to the embodiment or the accompanying drawings, or in parallel (for example, in a parallel processor or multi-threaded processing environment).
[0131] like Figure 12 As shown, the embodiment of the present application further provides a warning line superposition device 1000. The device includes: a data acquisition module 1001, a pipeline warning line module 1002, a field of view vertex coordinate module 1003, a field of view intersection module 1004 and a superposition module 1005, as follows.
[0132] The data acquisition module 1001 is used to obtain real-time data and pipeline stake coordinate data sets during the drone inspection process. The real-time data includes the drone's location information, pod posture information, and the inspection video stream captured by the pod camera.
[0133] The pipeline warning line module 1002 is used to determine the warning line coordinate points on both sides of the warning area according to the pipeline pile number coordinate data set, and connect the warning line coordinate points on both sides of the warning area to obtain the pipeline warning line.
[0134] The field of view vertex coordinate module 1003 is used to determine the field of view vertex coordinates of the pod camera according to the pod attitude information.
[0135] The field of view intersection module 1004 is used to determine the field of view intersection point between the current field of view and the pipeline warning line according to the coordinates of the field of view vertex and the pipeline warning line.
[0136] The superposition module 1005 is used to convert the field of view intersection into a pixel coordinate system to obtain pixel warning coordinates, and draw lines between the pixel warning coordinates in the video frame corresponding to the inspection video stream to superimpose the pipeline warning line on the inspection video stream.
[0137] Some modules in the apparatus described herein may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0138] The devices or modules described in the above application embodiments can be implemented by computer chips or physical devices, or by products with certain functions. For ease of description, the above devices are described separately by function in various modules. When implementing the embodiments of this application, the functions of each module can be implemented in the same or multiple software and / or hardware. Of course, a module that implements a certain function can also be implemented by combining multiple sub-modules or sub-units.
[0139] The methods, devices, or modules described herein can be implemented in the form of computer-readable program code. The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the memory control logic. Those skilled in the art will also appreciate that, in addition to implementing the controller in pure computer-readable program code, the controller can also be implemented in the form of logic gates, switches, an application-specific integrated circuit, a programmable logic controller, an embedded microcontroller, etc. by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the means for implementing various functions may be considered to be both a software module for implementing the method and a structure within a hardware component.
[0140] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist independently, or two or more modules may be integrated into one module.
[0141] The above-mentioned storage media include, but are not limited to, random access memory (RAM), read-only memory (ROM), cache, hard disk drive (HDD), or memory card. Such memory can be used to store computer program instructions.
[0142] Through the description of the above implementation methods, it can be seen that those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary hardware. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, or can be embodied through the implementation process of data migration. The computer software product can be stored in a storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application or certain parts of the embodiments.
[0143] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referenced to each other. Each embodiment focuses on the differences from other embodiments. All or part of this application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, mobile communication terminals, multi-processor systems, microprocessor-based systems, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc.
[0144] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit the present application. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some or all of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the present application.
Claims
1. A warning line superposition method, characterized in that: include: Acquire real-time data and pipeline stake coordinate data sets during the drone inspection process; wherein the real-time data includes the drone's location information, pod posture information, and the inspection video stream captured by the pod camera; Determine the warning line coordinate points on both sides of the warning area according to the pipeline pile number coordinate data set, and connect the warning line coordinate points on both sides of the warning area respectively to obtain the pipeline warning line; wherein, determining the warning line coordinate points on both sides of the warning area according to the pipeline pile number coordinate data set includes: grouping adjacent pipeline pile number coordinates in the pipeline pile number coordinate data set in pairs to obtain multiple coordinate groups; determining the inclination angle of the straight line where the two pipeline pile number coordinates in each coordinate group are located relative to the coordinate axis to obtain a first angle; determining the warning line coordinate group on the side of the warning area corresponding to the coordinate group according to the first angle and the first distance; wherein, the first distance is determined according to the range of the warning area to be inspected; according to the warning line coordinate group, determine the intersection of the straight lines where each adjacent warning line coordinate group is located, and use it as the warning line coordinate point on one side of the warning area; according to the warning line coordinate point on one side of the warning area, use the midpoint coordinate formula to determine the warning line coordinate point on the other side of the warning area; Determine the coordinates of the vertex of the field of view of the pod camera according to the pod attitude information; Determine the intersection of the current field of view and the field of view of the pipeline warning line according to the coordinates of the vertex of the field of view and the pipeline warning line; The field of view intersection is converted into a pixel coordinate system to obtain pixel warning coordinates, and a line between the pixel warning coordinates is drawn in the video frame corresponding to the inspection video stream to superimpose the pipeline warning line on the inspection video stream.
2. The method according to claim 1, characterized in that After obtaining the real-time data and pipeline stake coordinate data set during the drone inspection process, the following steps are also included: Establish a local rectangular coordinate system with the east direction as the X axis, the north direction as the Y axis, and the direction perpendicular to the XY plane as the Z axis; The starting point of the UAV is used as the origin of the local rectangular coordinate system and the longitude and latitude coordinate system; Determining a unit change in the position information of the UAV on different coordinate axes in the local rectangular coordinate system; The position of the position information in the local rectangular coordinate system is determined based on the unit change, so as to convert the position information of the drone into the local rectangular coordinate system.
3. The method according to claim 1, characterized in that The step of determining the warning line coordinate group on one side of the warning area corresponding to the coordinate group according to the first angle and the first distance includes: Determine a point on the straight line where the coordinates of the two pipe pile numbers in the coordinate group are located as a rotation center, rotate the initial line segment formed by the coordinate group around the rotation center by the first angle to obtain a parallel line segment parallel to the coordinate axis; translating the parallel line segment along the direction of its perpendicular line by the first distance to obtain a translated line segment; Rotating the translated line segment around the rotation center by a negative first angle to obtain a rotated line segment; The warning line coordinate group on one side of the warning area corresponding to the coordinate group is determined according to the coordinate points where the two end points of the rotating line segment are located.
4. The method according to claim 1, wherein The step of determining the warning line coordinate group on one side of the warning area corresponding to the coordinate group according to the first angle and the first distance includes: Taking one of the pipe pile number coordinates in the coordinate group as a first rotation center, the other pipe pile number coordinate is rotated along the first rotation center by the first angle to obtain a first coordinate point; translating the first rotation center and the first coordinate point by a first distance in a direction perpendicular to a line connecting the first rotation center and the first coordinate point to obtain a second rotation center and a second coordinate point; The second rotation center and the second coordinate point are rotated along the first rotation center by the negative first angle to obtain a third rotation center and a third coordinate point, which is the warning line coordinate group on one side of the warning area corresponding to the coordinate group.
5. The method according to claim 1, wherein The determining of the coordinates of the field of view vertex of the pod camera according to the pod attitude information further includes: The pod attitude information in the relative coordinate system is converted to the local rectangular coordinate system to obtain the pod attitude information in the local rectangular coordinate system.
6. The method according to claim 1, characterized in that The determining of the coordinates of the vertex of the field of view of the pod camera according to the pod attitude information includes: Determine the initial field of view vertex of the pod camera in its coordinate system according to the pod attitude information; The initial field of view vertex is converted into a local rectangular coordinate system to obtain the coordinates of the field of view vertex.
7. The method according to claim 1, characterized in that Before determining the intersection of the current field of view and the pipeline warning line according to the field of view vertex coordinates and the pipeline warning line, the method further includes: Determine the pipe pile number interval where the drone is located based on the location information of the drone; Determine the moving range of the longitudinal field of view according to the current pitch angle change of the pod; The stake number interval for which the intersection of the field of view needs to be determined is determined according to the pipeline stake number interval and the moving range of the longitudinal field of view.
8. The method according to claim 1, characterized in that The determining of the intersection of the current field of view and the pipeline warning line according to the field of view vertex coordinates and the pipeline warning line includes: Determine the current field of view according to the coordinates of the field of view vertex; Determine the pipe pile coordinates within the current field of view according to the current field of view and the position information of the drone; The intersection of the current field of view and the pipeline warning line is determined according to the pipeline stake coordinates in the current field of view.
9. A warning line superposition device, characterized in that: include: A data acquisition module is used to obtain real-time data and pipeline stake coordinate data sets during the drone inspection process; wherein the real-time data includes the drone's location information, pod posture information, and the inspection video stream captured by the pod camera; The pipeline warning line module is used to determine the warning line coordinate points on both sides of the warning area according to the pipeline pile number coordinate data set, and connect the warning line coordinate points on both sides of the warning area to obtain the pipeline warning line; wherein, the determination of the warning line coordinate points on both sides of the warning area according to the pipeline pile number coordinate data set includes: grouping adjacent pipeline pile number coordinates in the pipeline pile number coordinate data set in pairs to obtain multiple coordinate groups; determining the inclination angle of the straight line where the two pipeline pile number coordinates in each coordinate group are located relative to the coordinate axis to obtain a first angle; determining the warning line coordinate group on the side of the warning area corresponding to the coordinate group according to the first angle and the first distance; wherein, the first distance is determined according to the range of the warning area to be inspected; according to the warning line coordinate group, respectively determine the intersection of the straight lines where each adjacent warning line coordinate group is located, and use it as the warning line coordinate point on one side of the warning area; according to the warning line coordinate point on one side of the warning area, use the midpoint coordinate formula to determine the warning line coordinate point on the other side of the warning area; A field of view vertex coordinate module is used to determine the field of view vertex coordinates of the pod camera according to the pod posture information; A field of view intersection module, configured to determine a field of view intersection point between the current field of view and the pipeline warning line according to the coordinates of the field of view vertex and the pipeline warning line; The superposition module is used to convert the field of view intersection into a pixel coordinate system to obtain pixel warning coordinates, and draw a line between the pixel warning coordinates in the video frame corresponding to the inspection video stream to superimpose the pipeline warning line on the inspection video stream.
Citation Information
Patent Citations
Unmanned aerial vehicle AR line superposition method and system based on SLAM algorithm
CN118587394A
Unmanned aerial vehicle video petroleum pipeline real-time display method and system based on gis technology
CN113570720A
Map superposition method and device, equipment and medium
CN117853577A