A method for unmanned aerial vehicle route planning for hydropower engineering
By constructing a three-dimensional terrain grid model and performing voxel processing, combined with mean normal vector segmentation and refinement and collision detection, UAV routes are generated, which solves the route planning problem in the complex environment of UAV inspection and monitoring tasks in hydropower projects, and ensures information acquisition integrity and flight safety.
Patent Information
- Application Number
- CN202510926785.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-07
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-07-07
AI Technical Summary
Existing technologies make it difficult to achieve efficient and accurate route planning in complex environments for drone inspection and monitoring tasks in hydropower projects, resulting in problems such as incomplete information acquisition, high computational complexity, high hardware requirements, and high security risks.
By constructing a three-dimensional terrain grid model and performing voxel processing, an initial voxel map is generated, which is then segmented and refined based on the average normal vector distribution. The candidate waypoints are determined in combination with the refined voxel map, collision detection is performed, and a target waypoint set is generated to form a UAV operation route.
It achieves the information acquisition integrity and flight safety of drone inspection and monitoring in complex terrain, reduces the computational complexity and hardware requirements, and improves the airworthiness and operational stability of route generation.
Smart Images

Figure CN120445226B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of safety monitoring of water and hydropower engineering, in particular, to a method for planning a flight route of a UAV for water and hydropower engineering. BACKGROUND
[0002] As important infrastructure for people's livelihood, water conservancy and hydropower engineering plays a key role in the process of social development. With the increasing demand of society, people have put forward higher requirements for the construction and operation management of water conservancy and hydropower engineering, especially in the aspects of engineering patrol and maintenance. For a long time, the monitoring and inspection of hydraulic structures and reservoir bank slopes during the construction and operation of hydropower stations have been faced with problems such as heavy tasks, great difficulty in manual inspection, many loopholes, etc. Under complex terrain conditions, the traditional inspection and monitoring methods have been difficult to meet the operation requirements of modern hydropower engineering due to their characteristics of great difficulty in operation, low precision, single measurement results, high cost, and high risk, etc. The introduction of UAV technology provides a new solution for the patrol and monitoring of hydropower engineering. It has the advantages of wide patrol range, high automation level, and strong flexibility, which can effectively reduce the safety risk, labor cost, and time cost of manual patrol. Therefore, the fine route design for the UAV patrol and monitoring task in hydropower engineering has become a key problem to be solved, in order to further improve the efficiency and quality of the operation management of hydropower engineering.
[0003] In the UAV patrol and monitoring task of hydropower engineering, the conventional route planning method is difficult to adapt to the complex and variable terrain and environmental characteristics. Due to the interference of factors such as occlusion, the traditional method often cannot completely obtain all the information of the target area. In recent years, the route planning method based on geometric learning algorithm shows its applicability in complex environments by fusing geometric distance and environmental threat model. However, this method is highly dependent on the accuracy and integrity of the flight area model, and the calculation process is relatively complex, which limits its wide application in practical engineering. At the same time, the route planning method of optimal view photogrammetry can significantly improve the reconstruction quality of the three-dimensional model in severely occluded areas, and improve the data acquisition efficiency by optimizing the viewpoint selection, but this method has high computational complexity, and due to the increase of the number of waypoints, the data acquisition time is prolonged, and high performance of the hardware device is required. On this basis, by simplifying the slope digital elevation model (DEM) and extracting the slope datum plane, the optimal view photogrammetry efficiency of the slope terrain can be improved to a certain extent, but the computational complexity is still high, and the quality requirement of the digital elevation model is extremely strict.
[0004] In summary, the related art has many deficiencies in efficient and accurate route planning under the complex environment of hydropower engineering, and it is difficult to fully meet the actual demand. Therefore, it is urgent to propose a route planning method for unmanned aerial vehicle patrol and monitoring tasks of hydropower engineering, aiming to generate fine patrol and monitoring routes that can obtain complete information with low computational cost.
[0005] It should be noted that the information disclosed in the above background section is only used to strengthen the understanding of the background of the present disclosure, and therefore can include information that does not constitute prior art known to those of ordinary skill in the art. SUMMARY
[0006] The purpose of the embodiments of the present disclosure is to provide a kind of unmanned aerial vehicle route planning method for hydropower engineering, unmanned aerial vehicle route planning device for hydropower engineering, electronic equipment and computer readable storage medium, in turn, it can be with low computational cost Realize that the unmanned aerial vehicle patrol and monitoring route planning that adapts to complex terrain and covers complete, strong feasibility.
[0007] Other characteristics and advantages of the present disclosure will become apparent from the following detailed description, or will be learned by practice of the present disclosure.
[0008] According to a first aspect of the embodiments of the present disclosure, a kind of unmanned aerial vehicle route planning method for hydropower engineering is provided, comprising:
[0009] determine a plurality of target operation areas to be patrolled and monitored, and generate the three-dimensional terrain grid model corresponding to each of the target operation areas;
[0010] voxel processing is carried out on the three-dimensional terrain grid model, an initial voxel map is constructed, and a first candidate navigation point is determined in combination with the initial voxel map;
[0011] Based on the average normal vector distribution of the initial voxel map, each voxel unit in the initial voxel map is segmented and refined to generate a fine voxel map, and a second candidate navigation point is determined in combination with the fine voxel map;
[0012] The first candidate navigation point and the second candidate navigation point are subjected to collision detection in combination with the fine voxel map to obtain a target navigation point set;
[0013] According to the target navigation point set, an unmanned aerial vehicle operation route is generated to control the unmanned aerial vehicle to patrol and detect each of the target operation areas corresponding to the unmanned aerial vehicle operation route.
[0014] In some example embodiments of the present disclosure, based on the foregoing scheme, the voxel processing of the three-dimensional terrain grid model to construct the initial voxel map includes:
[0015] determine an initial voxel size of a basic voxel unit;
[0016] determine a minimum bounding box corresponding to the three-dimensional terrain mesh model, and uniformly divide the minimum bounding box according to the initial voxel size to obtain a basic voxel map;
[0017] construct a mapping relationship between the three-dimensional terrain mesh model and each basic voxel unit in the basic voxel map, and map the three-dimensional terrain mesh model into the basic voxel map in combination with the mapping relationship to obtain an initial voxel map.
[0018] In some example embodiments of the present disclosure, based on the foregoing scheme, the determination of the initial voxel size of the basic voxel unit comprises:
[0019] obtain flight parameters corresponding to the unmanned aerial vehicle, the flight parameters including a scale parameter, a pixel size, a horizontal pixel number of a sensor, a vertical pixel number of the sensor, a heading overlap degree, and a side overlap degree;
[0020] determine the initial voxel size of the basic voxel unit according to the flight parameters.
[0021] In some example embodiments of the present disclosure, based on the foregoing scheme, the construction of the mapping relationship between the three-dimensional terrain mesh model and each basic voxel unit in the basic voxel map comprises:
[0022] obtain a center coordinate of each model patch in the three-dimensional terrain mesh model, and obtain a minimum value of vertex coordinates corresponding to the three-dimensional terrain mesh model;
[0023] determine index information of each model patch in the basic voxel map according to the center coordinate of the model patch and the minimum value of the vertex coordinates;
[0024] use the index information as the mapping relationship between the three-dimensional terrain mesh model and each basic voxel unit in the basic voxel map.
[0025] In some example embodiments of the present disclosure, based on the foregoing scheme, the determination of the first candidate flight point in combination with the initial voxel map comprises:
[0026] obtain a scale parameter corresponding to the three-dimensional terrain mesh model and a lens focal length corresponding to the unmanned aerial vehicle, and determine a moving distance according to the scale parameter and the lens focal length;
[0027] mark a target voxel unit in a top position in the initial voxel map, and move a voxel center coordinate of the target voxel unit to a target direction according to the moving distance to obtain a first candidate flight point, wherein the target direction is a reverse direction of an observation direction at the first candidate flight point.
[0028] In some example embodiments of the present disclosure, based on the foregoing scheme, the segmentation refinement of each voxel unit in the initial voxel map based on the average normal vector distribution of the initial voxel map generates a fine voxel map, including:
[0029] Based on the normal vector of the model facet contained in each basic voxel unit in the initial voxel map, the average normal vector corresponding to each basic voxel unit is calculated.
[0030] According to the average normal vector, the voxel unit to be refined is screened in the initial voxel map.
[0031] The segmentation voxel size of the voxel unit to be refined is determined by the initial voxel size of the basic voxel unit, which is half of the initial voxel size, and the voxel unit to be refined is segmented by the segmentation voxel size to obtain new basic voxel units.
[0032] The above steps are repeated until all basic voxel units in the initial voxel map reach the segmentation limit condition to obtain a fine voxel map.
[0033] In some example embodiments of the present disclosure, based on the foregoing scheme, the screening of the voxel unit to be refined according to the average normal vector in the initial voxel map includes:
[0034] The first included angle between the normal vector of each model facet in the basic voxel unit and the average normal vector is calculated.
[0035] The number of facets in the basic voxel unit whose first included angle is greater than or equal to a preset included angle threshold is determined.
[0036] If the proportion of the number of facets to the total number of facets in the basic voxel unit exceeds a preset proportion threshold, the basic voxel unit is determined as the voxel unit to be refined.
[0037] In some example embodiments of the present disclosure, based on the foregoing scheme, the segmentation limit condition is that the segmentation voxel size is less than one-eighth of the initial voxel size.
[0038] In some example embodiments of the present disclosure, based on the foregoing scheme, the determination of the second candidate flight point in combination with the fine voxel map includes:
[0039] The average normal vector of each fine voxel unit of the fine voxel map is calculated, and the second included angle between the average normal vector and the opposite direction of the observation direction of the first candidate flight point is determined in combination with the observation direction.
[0040] determine the observability of each of the fine voxel units at each of the first candidate waypoints according to the second included angle;
[0041] record all the observable fine voxel units into a visible voxel set and all the unobservable fine voxel units into an invisible voxel set according to the observability;
[0042] if the invisible voxel set corresponding to any first candidate waypoint is not an empty set, then offset the voxel center of the fine voxel unit by a moving distance in the direction of the average normal vector of the unobservable fine voxel unit to generate a new waypoint as a second candidate waypoint for supplementing the first candidate waypoint.
[0043] In some example embodiments of the present disclosure, based on the foregoing scheme, the collision detection of the first candidate waypoint and the second candidate waypoint in combination with the fine voxel map to obtain a target waypoint set comprises:
[0044] construct a directional bounding box with the first candidate waypoint and the second candidate waypoint as the center;
[0045] if the directional bounding box corresponding to any candidate waypoint has an intersection or inclusion relationship with the fine voxel unit in the fine voxel map, it is determined that the candidate waypoint has a collision risk, and the first candidate waypoint and the second candidate waypoint are eliminated to obtain a target waypoint set.
[0046] According to a second aspect of the embodiments of the present disclosure, an electronic device is provided, comprising a processor and a memory having computer readable instructions stored thereon, the computer readable instructions being executed by the processor to implement the water and electricity engineering oriented UAV flight path planning method in the first aspect.
[0047] According to a third aspect of the embodiments of the present disclosure, a computer readable storage medium is provided, having a computer program stored thereon, the computer program being executed by a processor to implement the water and electricity engineering oriented UAV flight path planning method in the first aspect.
[0048] The technical scheme provided by the embodiments of the present disclosure can include the following beneficial effects:
[0049] The unmanned aerial vehicle route planning method for water and electricity engineering in the example embodiments of the present disclosure, on the one hand, through the spatial modeling based on the three-dimensional terrain grid model, and combining the voxel processing to establish the structured voxel unit system, while ensuring the expression accuracy of the spatial terrain characteristics, the spatial discretization and index organization of the target operation area are realized, which is convenient for the subsequent flight point extraction, visibility judgment and rapid execution of spatial analysis; further, through the voxel segmentation mechanism driven by the average normal vector, the voxel granularity can be adaptively adjusted to adapt to the topography or structure boundary of different complexity, so as to balance the structure fidelity and the control of computing resources when constructing the flight point set, and reduce the model dependency and computing burden brought by the traditional dependence on precise global modeling method; on the other hand, through the introduction of the visibility analysis and spatial collision detection mechanism, the dynamic compensation and effectiveness verification of the flight point selection strategy are realized, the logical relationship between the first candidate flight point and the second candidate flight point based on the observable voxel and the unobservable voxel forms a complement, on the basis of realizing the integrity of the terrain information acquisition, through the spatial interaction with the fine voxel map, the redundant flight points with flight safety risks are removed, so as to improve the effective density and executability of the overall flight point set, improve the actual airworthiness and operation stability of the final route generation, and avoid the common problems caused by shielding misjudgment, flight path crossing obstacles or insufficient coverage of the monitoring area in the related technology.
[0050] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0051] The drawings incorporated into the specification and constituting a part of the specification, show embodiments consistent with the present disclosure, and together with the specification, serve to explain the principles of the present disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative labor.
[0052] Figure 1 The flowchart of the unmanned aerial vehicle route planning method for water and electricity engineering according to some embodiments of the present disclosure is schematically shown.
[0053] Figure 2 The flowchart of constructing the initial voxel map according to some embodiments of the present disclosure is schematically shown.
[0054] Figure 3 The schematic diagram of determining the first candidate flight point in combination with the initial voxel map according to some embodiments of the present disclosure is schematically shown.
[0055] Figure 4 The flowchart of constructing the fine voxel map based on the initial voxel map according to some embodiments of the present disclosure is schematically shown.
[0056] Figure 5 A schematic diagram of segment-wise refinement of a to-be-refined voxel cell is shown illustratively in accordance with some embodiments of the present disclosure.
[0057] Figure 6 A schematic diagram of segment-wise refinement of an initial voxel map to obtain a refined voxel map is shown illustratively in accordance with some embodiments of the present disclosure.
[0058] Figure 7 A flowchart of a process of determining a second candidate waypoint is shown illustratively in accordance with some embodiments of the present disclosure.
[0059] Figure 8 A flowchart of a process of determining a set of target waypoints is shown illustratively in accordance with some embodiments of the present disclosure.
[0060] In the drawings, like or corresponding reference numerals indicate identical or corresponding parts. DETAILED DESCRIPTION
[0061] The exemplary embodiments will be described in detail herein with reference to the attached drawings. The description of the exemplary embodiments is intended to apply to all alternative embodiments, as would be understood by persons skilled in the art. The following exemplary embodiments are described herein with reference to the figures. Wherever possible, the same reference numbers are used in the drawings and the following description to describe the same or similar elements, features, and aspects. The exemplary embodiments described herein are not meant to be limiting. It is contemplated that the exemplary embodiments can be carried out in various ways, embodying in or otherwise using the several details, the many implementations other than those noted in the description below.
[0062] It should be understood that, although the terms first, second, third, etc. can be used herein to describe various information, these terms are not intended to denote a particular order or hierarchy among the information. The terms are used only to distinguish one piece of information from another. For example, a first piece of information can be termed a second piece of information, and, similarly, a second piece of information can be termed a first piece of information without departing from the scope of this description. As used herein, the term "if' can be interpreted to mean "when" or "upon" or "in response to determining" taking into account the context in which the term is used.
[0063] Furthermore, the accompanying drawings are only schematic and are non-limiting exact representations of embodiments. The drawings in the present description are only schematic and are non-limiting exact representations of the described concepts. In the drawings, the size of some of the elements can be exaggerated relative to others for illustrating the concept more clearly. The drawings illustrate the exemplary embodiments by way of example.
[0064] In the example embodiment, first, a method for unmanned aerial vehicle route planning for hydropower engineering is provided, which can be applied to a terminal device or a server. The example embodiment does not specially limit this, and the method is described below by taking the server as an example. Figure 1 A flowchart of the method for unmanned aerial vehicle route planning for hydropower engineering according to some embodiments of the present disclosure is schematically shown. Referring to Figure 1 As shown, the method for unmanned aerial vehicle route planning for hydropower engineering can include the following steps:
[0065] Step S110, a plurality of target operation areas to be patrolled and monitored are determined, and a three-dimensional terrain grid model corresponding to each target operation area is generated;
[0066] Step S120, voxelization processing is performed on the three-dimensional terrain grid model to construct an initial voxel map, and a first candidate waypoint is determined in combination with the initial voxel map;
[0067] Step S130, each voxel unit in the initial voxel map is segmented and refined based on the average normal vector distribution of the initial voxel map to generate a fine voxel map, and a second candidate waypoint is determined in combination with the fine voxel map;
[0068] Step S140, collision detection is performed on the first candidate waypoint and the second candidate waypoint in combination with the fine voxel map to obtain a target waypoint set;
[0069] Step S150, an unmanned aerial vehicle operation route is generated according to the target waypoint set, so as to control the unmanned aerial vehicle to patrol and detect each target operation area through the unmanned aerial vehicle operation route.
[0070] According to the unmanned aerial vehicle route planning method for water and electricity engineering in the present example embodiment, on the one hand, spatial modeling is performed based on a three-dimensional terrain grid model, and a structured voxel unit system is established by combining voxel processing, which realizes spatial discretization and index organization of the target operation area while ensuring the expression accuracy of spatial terrain features, facilitating subsequent fast execution of flight point extraction, visibility judgment, and spatial analysis. Further, through the voxel segmentation mechanism driven by the average normal vector, the voxel granularity can be adaptively adjusted to adapt to different complexity of the topography or structural boundary, so as to balance the structure fidelity and the control of computing resources when building the flight point set, thereby reducing the model dependency and computing burden brought by traditional methods relying on precise global modeling. On the other hand, the visibility analysis and spatial collision detection mechanism is introduced to realize dynamic compensation and effectiveness verification of the flight point selection strategy. The logical relationship between the first candidate flight point and the second candidate flight point based on observable voxels and unobservable voxels forms a complement, which realizes the integrity of terrain information acquisition, and through spatial interaction with the fine voxel map, redundant flight points with flight safety risks are removed, thereby improving the effective density and executability of the overall flight point set, improving the actual airworthiness and operation stability of the final route generation, and avoiding common problems caused by shielding misjudgment, flight path crossing obstacles, or insufficient coverage of the monitoring area in related technologies.
[0071] In the following, the unmanned aerial vehicle route planning method for water and electricity engineering in the present example embodiment will be further described.
[0072] In step S110, a plurality of target operation areas to be patrolled and monitored are determined, and a three-dimensional terrain grid model corresponding to each target operation area is generated.
[0073] In an example embodiment of the present disclosure, the target operation area refers to the operation facilities, slope areas, flood discharge channels, and water conservancy building surfaces that need to be focused on in water conservancy and hydropower engineering, such as the patrol and monitoring objects. For example, the target operation area can be obtained by dividing the target to be monitored or the region of the hydropower engineering according to the performance of the unmanned aerial vehicle equipment. The target operation area can also be determined by engineering drawings, remote sensing images, a geographic information system (GIS) platform, or manual selection, and the present example embodiment does not specially limit the determination method of the target operation area. In addition, related parameters for patrol and monitoring can be determined, such as ground resolution, flight height, image overlap, and other data.
[0074] The three-dimensional terrain mesh model refers to a model data set in the form of a polygonal sheet (usually a triangular sheet) representing the geometric structure of the ground surface obtained by spatial data collection and three-dimensional reconstruction of a target operation area. The three-dimensional terrain mesh model can be used to express the topographic relief, water conservancy building contour, and slope section in the typical operation environment of a water conservancy project, and has high structure restoration and surface continuity.
[0075] The generation of the three-dimensional terrain mesh model can be completed by using aerial photogrammetry technology. For example, the generation of the three-dimensional terrain mesh model can include multi-view image collection by a UAV carrying an image sensor, camera pose recovery by using an algorithm based on feature point matching and sparse reconstruction (such as Structure from Motion), and formation of a dense point set in combination with multi-view stereo reconstruction (Multi-View Stereo) or laser radar point cloud data. Then, surface reconstruction processing is performed on the dense point set, for example, by using the Poisson reconstruction, Delaunay triangulation, or Alpha Shape method, to generate a three-dimensional terrain mesh model that is structurally coherent and has a complete topological structure. The obtained three-dimensional terrain mesh model has sufficient sheet density and terrain restoration degree to support subsequent voxel division and visibility analysis, and the mesh structure needs to maintain topological integrity to avoid problems such as non-manifold boundary or suspended sheet affecting the quality of spatial indexing.
[0076] In step S120, voxelization processing is performed on the three-dimensional terrain mesh model to construct an initial voxel map, and a first candidate flight point is determined in combination with the initial voxel map.
[0077] In an example embodiment of the present disclosure, voxelization processing refers to a process of discretely dividing a continuous curved surface space described by a three-dimensional terrain mesh model, and the formed division unit is a voxel unit. Voxel is an abbreviation of three-dimensional pixel, which represents a spatial cubic unit with a fixed size and regular shape (usually a cube) in a three-dimensional space. The essence of voxelization processing is to project the target space into a voxel grid to form a regular voxel structure, thereby realizing structure mapping between the terrain model and the spatial coordinate system, and facilitating subsequent spatial calculation, direction judgment, and visibility analysis.
[0078] The initial voxel map refers to three-dimensional structured space expression data formed by establishing a spatial indexing structure and mapping relationship after voxelization processing is completed. The initial voxel map is based on a set of position indexes in a three-dimensional coordinate system, each index corresponds to a voxel unit, and each voxel unit records a set of triangular sheets contained therein, as well as attribute information such as normal information, center position, and area statistics of the sheets.
[0079] The initial voxel map can support fast voxel-oriented statistical calculation, for example, can be used to calculate the average normal vector or patch density, can also be used as the basis for waypoint extraction and occlusion analysis at a coarse-grained level, and can also provide an initial data structure for subsequent fine-grained voxel map construction. In terms of spatial representation, the initial voxel map can be organized in the form of a sparse voxel octree (SVO) or a sparse index hash table, etc., to save storage resources and improve access efficiency. The organization of the initial voxel map is not particularly limited in the present embodiment.
[0080] The first candidate waypoint refers to an initial-level waypoint set generated based on the initial voxel map and having a three-dimensional spatial position and orientation attribute, and is mainly used to cover the surface of the easily observable area or the top view area. For example, after the initial voxel map is established, the candidate waypoint layout logic can be used to preferentially extract the patch-covered voxel at the top of the voxel column as the area with a good top view angle, and offset by a set movement distance along the negative observation direction at the center position of each such voxel to generate a first candidate waypoint with an observation pose attribute. Of course, the first candidate waypoint can also be determined by other means, which are not particularly limited in the present embodiment.
[0081] In step S130, each voxel unit in the initial voxel map is segmented and refined based on the average normal vector distribution of the initial voxel map to generate a fine-grained voxel map, and a second candidate waypoint is determined in combination with the fine-grained voxel map.
[0082] In an example embodiment of the present disclosure, the average normal vector refers to a directional vector obtained by weighted averaging the unit normal vectors of a plurality of triangular patches contained in each voxel unit. The average normal vector can reflect the overall geometric orientation of the terrain or building surface covered in the voxel unit.
[0083] Segmentation refinement refers to a processing procedure based on the initial voxel map, aiming at the voxel unit with complex geometric structure and drastic surface orientation change, through local scale re-division operation to improve the voxel resolution and geometric adaptation ability. For example, the trigger of the segmentation refinement process can be based on the average normal vector deviation criterion, that is, if there are more triangular facets in a voxel whose angle with the average normal vector exceeds the preset threshold (such as 30°-45°), and the number of facets exceeds the proportion threshold (such as 10%-20%), the voxel is determined to be inconsistent in normal distribution, and needs to be segmented and refined. The refinement operation can be performed by dividing the voxel unit in X, Y and Z directions respectively, generating 8 new voxel units with equal volume, each new voxel inheriting part of the facets in the original voxel and redistributing according to the facet barycenter position. The refinement process can be recursively executed until the normal distribution of each voxel unit meets the consistency condition, or the voxel size is smaller than the set minimum voxel size (such as 1 / 8 of the initial voxel size), as the termination condition. The purpose of segmentation refinement is to improve the voxel resolution in high geometric complexity areas and provide a more detailed data basis for subsequent visibility analysis.
[0084] The fine voxel map refers to an enhanced version of the voxel map structure constructed on the basis of segmentation and refinement of the initial voxel map, which is used to express the spatial facet distribution, normal variation and occlusion relationship of complex regions at a higher resolution. The fine voxel map can retain the basic index structure of the initial voxel map, but the voxel size is reduced due to segmentation operation, and the number of facets is also relatively reduced, so that the normal distribution of each voxel unit is more consistent, and the geometric expression is closer to the actual surface morphology. The fine voxel map can be used as an input for second candidate flight point generation, collision detection and path feasibility analysis, etc. The use of the fine voxel map is not specially limited in this embodiment.
[0085] The second candidate flight point refers to a supplementary set of flight points added to make up for the observation blind area caused by occlusion, irregular structure or normal directionality after the first candidate flight point is obtained, and its generation logic relies on the fine voxel map and the visibility analysis mechanism. For example, based on the observation direction of each first candidate flight point, visibility judgment is performed on all voxels in the fine voxel map, and it is determined whether the voxel is in an observable state according to whether the angle between the average normal vector and the observation direction is less than the set threshold; if there are voxels that cannot be observed, for each invisible voxel, a flight point offset is generated according to the average normal vector direction, which is commonly based on the voxel center, offset by a set distance along the average normal vector direction as the flight point position, and the offset direction as the flight point observation direction, to form the second candidate flight point. The second candidate flight point and the first candidate flight point form a complementary observation relationship, ensuring full coverage and information integrity in complex terrain areas, and in actual deployment, the effective point set is screened through collision detection and included in the final flight path generation process.
[0086] It should be noted that the "first" and "second" in the "first candidate waypoint" and "second candidate waypoint" are only used to distinguish the candidate waypoints determined in different stages, and do not have any special meaning and should not cause any special limitation to the example embodiment.
[0087] In step S140, the first candidate waypoint and the second candidate waypoint are subjected to collision detection in combination with the fine voxel map, to obtain a target waypoint set.
[0088] In an example embodiment of the present disclosure, collision detection refers to a process of analyzing the spatial relationship between a candidate waypoint and a voxel unit representing an obstacle or a surface feature in the fine voxel map, to determine whether the waypoint has a risk of contact with an obstacle or crossing in actual flight, mainly used to exclude waypoints with potential flight conflict risks, and to improve the safety and executability of the generated path. For example, collision detection can be achieved by expressing the waypoint in the form of an oriented bounding box (OBB), or by constructing a constraint condition and solving an equation. The present embodiment does not make any special limitation to the specific implementation of collision detection.
[0089] The target waypoint set refers to a set of candidate waypoints that have actual flight feasibility after collision detection, and is a direct input point set for subsequent generation of a UAV operation route. The target waypoint set is obtained by merging the first candidate waypoint and the second candidate waypoint after screening, has two basic elements of complete spatial position (XYZ coordinates) and observation direction (unit vector), and each waypoint has passed spatial safety verification. The spatial distribution of the target waypoint set fully covers the target operation area, avoids data collection blind area, and has clear attitude information, which is conducive to maintaining the consistency of image overlap and shooting angle during task execution; the waypoints in the target waypoint set have flight safety guarantee, and can be directly used as path planning nodes for continuous connection, reducing flight control failure or task interruption caused by path crossing or height jump.
[0090] In step S150, a UAV operation route is generated according to the target waypoint set, to control the UAV to perform patrol detection on each corresponding target operation area through the UAV operation route.
[0091] In an example embodiment of the present disclosure, the UAV operation route refers to a three-dimensional path sequence generated based on the target waypoint set, with spatial continuity, direction constraint and flight feasibility, as the flight trajectory to be followed by the UAV in the actual task execution process. The UAV operation route not only contains the connection sequence between the waypoints, but also includes additional attributes such as flight direction, turning node, flight speed setting and task trigger point, and can be output in a standard format recognizable by the UAV task planning system, such as a KML (Keyhole Markup Language) format file, a KMZ format file, or a path encoding format adapted to a specific flight control system.
[0092] In the route generation process, the target waypoint set can be sorted and connected, for example, by shortest path traversal, approximate traveling salesman problem (TSP) optimization, and minimum curvature path fitting. To improve the stability and efficiency of path execution, an "S-type" path structure can also be generated, that is, a minimum enclosing rectangle fitted according to the spatial distribution of the target waypoints is taken as a reference, and approximately parallel segments are generated along the long side direction of the rectangle, and a continuous flight path is formed by turning connection. The present embodiment does not make special limitations on the way of generating the UAV operation route based on the target waypoint set.
[0093] Next, steps S110 to S150 will be described.
[0094] In an example embodiment of the present disclosure, the voxelization processing of the three-dimensional terrain grid model can be implemented by the steps in Figure 2 As shown in Figure 2 , the steps can specifically include:
[0095] Step S210, determining the initial voxel size of the basic voxel unit;
[0096] Step S220, determining the minimum bounding box corresponding to the three-dimensional terrain grid model, and uniformly dividing the minimum bounding box according to the initial voxel size to obtain a basic voxel map;
[0097] Step S230, constructing the mapping relationship of each basic voxel unit in the three-dimensional terrain grid model and the basic voxel map, and mapping the three-dimensional terrain grid model into the basic voxel map in combination with the mapping relationship to obtain an initial voxel map.
[0098] wherein the initial voxel size refers to the length of the cube constituting the discrete grid unit in the three-dimensional space, and the size of the initial voxel size determines the resolution and spatial coverage capability of the voxel grid. In the application of UAV patrol and monitoring, the voxel size can be set in combination with the parameters of the image sensor used and the task mapping requirements, for example, the initial voxel size can be calculated according to the UAV flight altitude, the mapping scale, the pixel resolution (ground sampling distance), and the number of horizontal and vertical pixels of the sensor.
[0099] After the initial voxel size is determined, a minimum bounding box corresponding to the three-dimensional terrain grid model can be constructed, and the bounding box is uniformly divided based on the initial voxel size to obtain a basic voxel map. The minimum bounding box of the three-dimensional terrain grid model refers to the minimum rectangular volume region that completely encloses all vertex coordinates of the model in the world coordinate system, and its three-dimensional range can be determined by scanning all vertex coordinates of the model to obtain the minimum and maximum values in the X, Y and Z directions, respectively. The division process can be performed based on the orthogonal coordinate axis direction, and the minimum bounding box is equally divided along the X, Y and Z dimensions according to the initial voxel size, and finally a three-dimensional voxel grid structure composed of a plurality of basic voxel units of the initial voxel size is formed. Each voxel unit has a unique three-dimensional index number in space, which can be represented by its sequence number triple in each direction, and is used for subsequent voxel attribution allocation and index management of the patch.
[0100] The mapping relationship refers to the spatial correspondence between the patch set of the three-dimensional terrain grid model and each basic voxel unit in the basic voxel map, which can be used to determine to which voxel unit each triangular patch belongs, and support attribute statistics and geometric analysis of the internal spatial structure of the voxel unit. The mapping relationship between the three-dimensional terrain grid model and each basic voxel unit in the basic voxel map can be constructed, for example, each triangular patch in the three-dimensional terrain grid model can be traversed in turn, its three vertex coordinates are extracted, and the barycenter coordinates are calculated; at the same time, the minimum values (three directions) of the coordinates of all vertices of the three-dimensional terrain grid model in space are obtained as the reference point of the voxel index origin. Then, according to the coordinate offset of the barycenter of the patch in space relative to the origin, the initial voxel size is calculated to obtain the corresponding index position in the X, Y and Z directions, i.e. by dividing the coordinate offset in each direction by the voxel length and taking the integer part, the voxel unit number to which the patch belongs is obtained, the index information is mapped with the patch index to complete the mapping of the patch to the voxel unit.
[0101] In an optional implementation, the face patch attribution information can be implemented by using a hash table or a sparse three-dimensional array, where the key is a voxel index triple, and the value is a pointer to a face patch index set. The mapping relationship formed by the face patch attribution information constitutes the data main body of the initial voxel map, supporting subsequent operations such as normal vector statistics, area accumulation, boundary state judgment, and visibility analysis of the face patches contained in each voxel. Since the model face patches can span multiple voxel boundaries, in an optional implementation, a strategy of sharing attribution of a face patch by multiple voxels can be used, and under the condition that the face patch barycenter offset is not large, the main voxel is preferentially selected to reduce the redundant storage burden.
[0102] By taking the initial voxel map as a conversion carrier from a continuous geometric model to a discrete spatial structure, not only the unit division and index establishment of the spatial structure are completed, but also the organization compression, structure reconstruction, and data reuse of the model information are realized, providing a unified spatial analysis basis for subsequent multiple stages. The establishment of the initial voxel map not only guarantees the local consistency of the voxel units in geometric expression, but also can improve the structure response capability for waypoint generation.
[0103] Optionally, the initial voxel size of the basic voxel unit can be determined by the following steps, which can specifically include:
[0104] The flight parameters corresponding to the unmanned aerial vehicle can be acquired, and the flight parameters can include a scale parameter, a pixel size, a horizontal pixel number of a sensor, a vertical pixel number of the sensor, a heading overlap, and a side overlap. The initial voxel size of the basic voxel unit is determined according to the flight parameters.
[0105] The flight parameters refer to flight task configuration parameters that are pre-set to achieve a specified mapping accuracy in an aerial photogrammetry or remote sensing data collection task. For example, the flight parameters can include but are not limited to a scale parameter, a pixel size, a horizontal pixel number of a sensor, a vertical pixel number of the sensor, a heading overlap, and a side overlap.
[0106] The scale parameter can be used to reflect the proportional relationship between the actual ground distance and the image projection distance, and is the core index for controlling the spatial restoration accuracy in the flight task. For example, if the mapping scale is 1:1000, it means that 1 mm on the image corresponds to 1000 mm on the ground. The pixel size refers to the physical size of a single pixel of the sensor on the image plane, usually in microns, for example, 3.6 μm. The horizontal and vertical pixel numbers of the sensor together determine the coverage range of a single image in the camera coordinate system, i.e., the information width and height that the image can record in the X and Y directions. The flight overlap and the lateral overlap refer to the overlapping proportion of two adjacent images in the flight direction and the lateral direction, respectively, and are generally expressed in percentage, which is used to ensure the continuity of image stitching and the redundancy of stereoscopic measurement, for example, the common configuration is that the flight overlap is 75% and the lateral overlap is 65%, which can ensure that each region will be repeatedly observed in multiple images, improving the stability of three-dimensional reconstruction.
[0107] For example, the initial voxel size can be determined by the following relationship:
[0108] ;
[0109] wherein, the initial voxel size can be represented by, the scale parameter can be represented by, the pixel size can be represented by, the horizontal pixel number of the sensor can be represented by, the vertical pixel number of the sensor can be represented by, the flight overlap can be represented by, the lateral overlap can be represented by.
[0110] In an optional embodiment, to ensure that the spatial structure after voxel division can accommodate the details of the terrain surface and not be excessively subdivided to cause storage expansion or a dramatic increase in computing pressure, a minimum limit size or a maximum voxel capacity control strategy can be introduced in actual setting, for example, based on the terrain slope, model density or image feature point distribution density, an adaptive voxel size setting mechanism is used for different regions, smaller voxel size is used in complex regions and larger voxel size is used in flat regions, forming a layered controllable voxel size strategy.
[0111] By quantitatively converting the flight parameters into three-dimensional space division scales, the transition from mapping indicators to model structure construction indicators is realized, which provides theoretical basis and operation support for subsequent voxel modeling processes with reasonable execution accuracy and controllable calculation, effectively improving the consistency and traceability between voxel units and image observation parameters.
[0112] Optionally, the mapping relationship between the three-dimensional terrain grid model and each basic voxel unit in the basic voxel map can be constructed by the following steps, which may specifically include:
[0113] The center coordinates of the facets corresponding to each model facet in the three-dimensional terrain grid model can be obtained, as well as the minimum vertex coordinates corresponding to the three-dimensional terrain grid model; the index information of each model facet in the basic voxel map is determined according to the facet center coordinates and the minimum vertex coordinates; the index information is used as the mapping relationship between the three-dimensional terrain grid model and each basic voxel unit in the basic voxel map.
[0114] Among them, the three-dimensional terrain grid model is usually composed of several model patches, which are generally triangular patches. Each triangular patch consists of three vertex coordinates. In geometric processing, the patch center coordinates of the triangular patch can be represented by its center of gravity position. The calculation method is to find the average value of the X, Y, and Z coordinates of the three vertices of the triangular patch. The calculation method is not described here. The patch center coordinates can be used to represent the overall position of the patch in three-dimensional space, and can also be used as the main reference point for the patch to participate in voxel division and spatial positioning. In practical applications, the patch center coordinates can be uniformly represented in the world coordinate system to ensure its consistency with the basic voxel map in spatial scale and reference origin.
[0115] The minimum vertex coordinates corresponding to the 3D terrain grid model can be obtained and used as the origin reference value in the voxel index calculation process. When establishing a basic voxel map, the minimum bounding box of the entire terrain model is used as the voxel grid boundary, where the starting coordinates of the bounding box (i.e., the minimum values in the X, Y, and Z directions) are used as the origin of the voxel coordinate system. The minimum vertex coordinates can be obtained by traversing and calculating all vertex coordinates. The minimum vertex coordinates determine the reference origin of the voxel grid in 3D space, which is used to establish the offset relationship from model space to voxel space and is the basis for achieving mapping alignment.
[0116] For example, the following relationship can be used to determine the index information of each model face in the basic voxel map based on the minimum value of the face center coordinates and vertex coordinates:
[0117] ;
[0118] in,( , , ) can represent the center coordinates of each facet in the three-dimensional terrain grid model. , , ) can represent the index information of each model patch in the basic voxel map, ( , , ) can represent the minimum value of the vertex coordinates corresponding to the three-dimensional terrain mesh model, may represent the initial voxel size.
[0119] The index information can be registered as the mapping relationship between the three-dimensional terrain mesh model and each basic voxel unit in the basic voxel map, that is, a patch set is established for each voxel unit to represent the model surface structure covered by the voxel. To improve storage and access efficiency, a sparse hash structure or a nested dictionary structure can be used to organize data, where the key value is an index triple and the value is a patch index list or a patch attribute structure pointer. When the patch crosses the voxel boundary, to avoid omission, a patch and multiple voxel co-ownership mechanism can be set, or a main voxel strategy is used, that is, only attributed to the voxel containing the center of gravity.
[0120] Through the mapping relationship, not only the spatial link between the model patch and the voxel unit is established, but also the geometric information contained by each voxel unit is aggregated, including the normal vector, the area statistics, the boundary state, etc., which provides necessary data support for subsequent steps such as normal vector mean calculation, voxel refinement judgment, visibility analysis and flight point offset direction determination. Through the above method, an accurate, unified and computable geometric mapping system between the three-dimensional terrain mesh model and the voxel structure is constructed, which improves the flight point calculation efficiency and calculation accuracy.
[0121] Optionally, the first candidate flight point can be determined in combination with the initial voxel map by the following steps, which can specifically include:
[0122] The scale parameter corresponding to the three-dimensional terrain mesh model and the lens focal length corresponding to the unmanned aerial vehicle can be obtained, and the movement distance can be determined according to the scale parameter and the lens focal length; the target voxel unit at the top position in the initial voxel map is marked, and the voxel center coordinates of the target voxel unit are moved to the target direction by the movement distance to obtain the first candidate flight point, wherein the target direction is the opposite direction of the observation direction at the first candidate flight point.
[0123] The lens focal length of the unmanned aerial vehicle refers to the distance from the camera optical axis to the imaging plane, and the unit is generally millimeter, which is a decisive factor affecting the field of view angle and ground coverage scale. Under the condition of orthophoto, the flight height or the image ground projection length can be derived according to the basic photogrammetry relationship, according to the scale parameter and the lens focal length, and the appropriate spatial scale for flight point offset, that is, the movement distance, can be further calculated. For example, the movement distance can be determined according to the scale parameter and the lens focal length by the following relationship:
[0124] ;
[0125] wherein, may represent the lens focal length of the camera on the unmanned aerial vehicle, A scale parameter can be represented, A moving distance can be represented. It can be understood that the relationship is applicable to most structure direct observation tasks assuming that the main visual axis is perpendicular to the ground in the imaging process, and can also be approximately applicable in areas with not severe terrain elevation differences.
[0126] The top voxel unit refers to the highest layer of voxels in the same vertical projection column close to the positive Z-axis direction, and there is no voxel containing an effective model patch above it. The top voxel can be obtained by sorting the Z coordinates of all voxel units with model patch mapping at a fixed cross-sectional position, and taking the maximum index value as the top voxel. The top voxel unit can correspond to a spatial position such as a terrain surface protruding area, a dam top, or a building roof, which has natural observation advantages such as no occlusion, large occlusion-free angle, and high collection efficiency, and is suitable for being preferentially deployed as a first round of flight point.
[0127] After determining the top voxel unit, the center coordinates of the top voxel unit can be extracted as the position reference point of the candidate flight point, and a position offset is performed in the target direction according to the moving distance calculated previously. The calculation of the voxel center coordinates can be the index position of the voxel in the three-dimensional grid multiplied by the voxel size, plus the offset of the half-voxel length, to ensure that the flight point is positioned on the axis in the voxel space. The offset direction is the opposite direction of the observation direction at the flight point, for example, the offset direction can be the negative direction of the Z-axis in the vertical observation task, or can be set as the opposite direction of the average normal vector of the voxel according to the specific task, which can be customized according to the actual application, and the present embodiment does not make special limitations.
[0128] Reference Figure 3 As shown, the target voxel unit 310 in the top position in the initial voxel map can be marked, and the voxel center coordinates of the target voxel unit 310 are moved in the target direction according to the moving distance to obtain the first candidate flight point 320.
[0129] By extracting the top voxel unit based on the initial voxel map, and generating the first candidate flight point with a direction attribute in combination with the scale parameter and the lens focal length, the rationality and visibility of the flight point selection can be significantly improved while ensuring the task area coverage efficiency. By selecting the top spatial area as the preferential deployment position, the terrain occlusion and building interference can be effectively avoided, and the unoccluded degree and field of view integrity of image collection can be improved; in combination with the moving distance obtained by inversely calculating the lens focal length and the scale, the flight point offset is helpful to ensure that the distance between the flight point and the observation surface is controlled within the best range of mapping, thereby improving the clarity and geometric restoration accuracy of the captured image; in addition, the flight point direction is set to the observation direction opposite to the ground normal direction, which can enhance the consistency and direction integrity of data collection, and provide structural support for the continuity and attitude planning of subsequent flight lines.
[0130] In an example embodiment of the present disclosure, the average normal vector distribution based on the initial voxel map can be implemented by the steps in Figure 4 , the segmentation refinement of each voxel unit in the initial voxel map is generated, and the fine voxel map is generated. Referring to Figure 4 , specifically, it can include:
[0131] Step S410, based on the normal vector of the model patch contained in each basic voxel unit in the initial voxel map, the average normal vector corresponding to each basic voxel unit is calculated; Step S420, according to the average normal vector, the voxel unit to be refined in the initial voxel map is screened;
[0133] Step S430, the segmentation voxel size of the voxel unit to be refined is determined by the initial voxel size of the basic voxel unit, the segmentation voxel size is half of the initial voxel size, and the voxel unit to be refined is segmented by the segmentation voxel size to obtain new basic voxel unit;
[0134] Step S440, repeat steps S410 to S430 until all basic voxel units in the initial voxel map reach the segmentation limit condition, and obtain the fine voxel map.
[0135] Wherein, the basic voxel unit is a spatial discrete cubic unit, which may contain multiple triangular patches inside, each patch has a spatial normal vector, which represents the surface orientation. In order to express the main orientation characteristics of the whole voxel unit inside, the average normal vector can be solved by vector weighted average method. For example, the average normal vector corresponding to each basic voxel unit can be determined by the following relationship:
[0136] ;
[0137] Wherein, may represent the average normal vector corresponding to the basic voxel unit, may represent the surface of the kth model patch in the basic voxel unit, may represent the normal vector corresponding to the surface of the kth model patch in the basic voxel unit, may represent the total number of model patches in the basic voxel unit.
[0138] After obtaining the average normal vector, the to-be-refined voxel unit can be screened in the initial voxel map according to the average normal vector. The screening criterion can be based on the normal consistency principle, that is, if there is a significant deviation between the normal vector of the surface patch in the voxel and the average normal vector, it is considered that the internal surface of the voxel changes dramatically and is not suitable for expression at the current voxel granularity. In the specific implementation process, for example, the angle between the normal vector of each surface patch in the voxel and the average normal vector can be calculated. If the angle is greater than a set threshold (such as 30°), the deviated surface patch is counted. If the proportion of the number of deviated surface patches to the number of all surface patches in the voxel exceeds a certain proportion threshold (such as 10% to 20%), it is considered that the voxel unit needs to perform segmentation refinement, and is determined as a to-be-refined voxel unit. Of course, when screening the to-be-refined voxel unit, the normal standard deviation, point density change rate, or curvature distribution of the surface patch can also be evaluated as auxiliary geometric indicators to form a multi-factor refinement criterion, to further improve the accuracy of screening the to-be-refined voxel unit.
[0139] After the to-be-refined voxel unit is screened out, the segmentation voxel size of the to-be-refined voxel unit can be determined according to the initial voxel size of the basic voxel unit. The segmentation voxel size can be half of the initial voxel size, that is, the original voxel edge length is reduced by half along the X, Y, and Z directions respectively, thereby forming 8 new sub-voxel units, each of which has a volume of 1 / 8 of the original voxel, as a new basic voxel unit. Referring to Figure 5 As shown in the figure, the basic voxel unit 510 under the initial voxel size can be segmented and refined by the segmentation voxel size to obtain 8 new basic voxel units 520. The voxel segmentation process can update the spatial index structure synchronously, and recalculate the surface patch set covered by each new voxel unit, for example, by traversing all surface patches in the original voxel, recalculating the attribution position of the center of gravity of each surface patch in the new index framework, and constructing a new surface patch mapping relationship.
[0140] After the segmentation operation on the to-be-refined voxel unit screened out for the first time is completed, the above steps are repeatedly executed, that is, the newly generated new basic voxel unit is executed again for average normal vector calculation, deviated surface patch screening, and segmentation judgment, forming a recursive hierarchical refinement mechanism. This process can continue until all basic voxel units in the initial voxel map reach the segmentation limit condition, and a fine voxel map is obtained, for example, the segmentation limit condition can be that the segmentation voxel size is less than one eighth of the initial voxel size. Of course, it can be understood that in some scenarios, the segmentation limit condition can also be that the segmentation voxel size is less than one sixteenth of the initial voxel size. The specific content of the segmentation limit condition is not specially limited in this embodiment. Referring to Figure 6 As shown in the figure, the to-be-refined voxel unit can be screened based on the average normal vector distribution of the initial voxel map 610, and each to-be-refined voxel unit in the initial voxel map 610 can be segmented and refined to generate a fine voxel map 620.
[0141] The finally formed fine voxel map is composed of multi-level voxel units, which has higher geometric adaptability and orientation expression capability at the structure level, can accurately capture the spatial features of the terrain mutation area, building corner structure or steep slope surface, and effectively support the local offset calculation, occlusion area identification and flight visibility judgment of the subsequent candidate waypoint layout.
[0142] Optionally, the step of screening the voxel unit to be refined in the initial voxel map according to the average normal vector can be implemented by the following steps, which can specifically include:
[0143] The first included angle between the normal vector of each model facet in the basic voxel unit and the average normal vector can be calculated; the number of facets in the basic voxel unit whose first included angle is greater than or equal to a preset included angle threshold is determined; and if the proportion of the number of facets to the total number of facets in the basic voxel unit exceeds a preset proportion threshold, the basic voxel unit is determined as the voxel unit to be refined.
[0144] The basic voxel unit is taken as the smallest analysis unit in the initial voxel map and contains a plurality of model facets, each of which corresponds to a unit normal vector representing the orientation direction of the triangular facet in the three-dimensional space. The average normal vector is a comprehensive orientation result obtained by normalizing the weighted sum of the unit normal vectors of all facets in the voxel according to the facet area or other geometric weights. To evaluate the spatial difference between the normal vector of a single facet and the average normal vector of the voxel, the first included angle between the normal vector of each model facet in the basic voxel unit and the average normal vector can be calculated by the following relationship:
[0145] ;
[0146] Wherein, The average normal vector of the basic voxel unit can be represented as The first included angle between the normal vector of the kth facet in the basic voxel unit and the average normal vector.
[0147] After the first included angle is calculated, the number of facets in the basic voxel unit whose first included angle is greater than or equal to a preset included angle threshold can be determined. For example, the normal angle deviation results of all facets in the current voxel can be traversed, the number of facets whose included angle is greater than or equal to the preset included angle threshold is counted, and the proportional relationship between the number of facets and the total number of facets in the voxel is recorded. This statistical operation can be completed online in an accumulator manner, or all included angles can be calculated and then uniformly counted, and the present embodiment does not make special limitation thereon. To enhance the stability of evaluation, when the total number of facets is small (such as less than 3), it can be set not to be refined to avoid misjudgment caused by small sample fluctuation.
[0148] When the patch proportion statistics deviating from the threshold value is completed, it is judged whether the refinement condition is met, for example, if the number of patches in the basic voxel unit accounts for more than a preset proportion threshold value, such as 10%, 15% or 20%, etc., in the total number of patches in the basic voxel unit, the basic voxel unit can be marked as a voxel unit to be refined. The selection of the preset proportion threshold value can comprehensively consider the algorithm sensitivity and the patch noise tolerance, and can be valued in the range of 10%~30%, of course, parameter regression optimization based on empirical data set can also be used to obtain a more adaptive threshold configuration, and the present example embodiment does not specially limit the setting of the preset proportion threshold value.
[0149] Through the screening of the voxel unit to be refined, not only the positions of the corners, mutations or sharp changes in curvature in the model are accurately identified in space, but also the resolution of the voxel map is adaptively regulated in structure, providing a local geometric expression ability enhanced basis support for the subsequent hierarchical construction of the fine voxel map, the optimization of the waypoint position and the direction control strategy, so as to improve the calculation efficiency and accuracy of the waypoint position.
[0150] In an example embodiment of the present disclosure, the second candidate waypoint can be determined in combination with the fine voxel map by the steps in Figure 7 as shown in Figure 7 Specifically, it can include:
[0151] Step S710, calculating the average normal vector of each fine voxel unit of the fine voxel map, and determining the second included angle between the average normal vector and the opposite direction of the observation direction of the first candidate waypoint in combination with the observation direction of the first candidate waypoint;
[0152] Step S720, determining the observability of each fine voxel unit at each first candidate waypoint according to the second included angle;
[0153] Step S730, recording all observable fine voxel units in a visible voxel set and all unobservable fine voxel units in an invisible voxel set through the observability;
[0154] Step S740, if the invisible voxel set corresponding to any first candidate waypoint is not an empty set, then offsetting the voxel center of the unobservable fine voxel unit by a movement distance along the average normal vector direction of the fine voxel unit to generate a new waypoint as a second candidate waypoint for supplementing the first candidate waypoint.
[0155] The fine voxel unit refers to a voxel unit with higher spatial resolution obtained on the basis of refinement of the initial voxel unit, and each voxel unit contains a plurality of triangular facets. The average normal vector is a weighted vector sum of unit normal vectors of all facets in the voxel and is normalized, reflecting the main orientation of the terrain surface represented by the voxel. After obtaining the observation direction of the first candidate flight point, the opposite direction vector thereof can be taken to represent the projection direction of the flight point toward the ground, thereby determining a second included angle between the average normal vector and the opposite direction of the observation direction. For example, the second included angle can be calculated by the following relationship:
[0156] ;
[0157] wherein, The second included angle between the average normal vector of the fine voxel unit and the opposite direction of the observation direction of the first candidate flight point, The observation direction of the first candidate flight point, The average normal vector of the fine voxel unit.
[0158] The observability refers to whether the surface of the voxel can be directly observed by the current flight point at a given attitude. If the second included angle between the average normal vector of the fine voxel unit and the observation direction of the first candidate flight point is less than or equal to a preset included angle threshold (for example, the preset included angle threshold is 45°), and there is no other voxel occlusion in the direction, it can be considered that the fine voxel unit can be observed at the current first candidate flight point; otherwise, it cannot be observed. In an alternative manner, a view volume analysis method based on ray casting can also be introduced. The light ray is traced from the flight point to the voxel direction. If the light ray path does not pass through other voxels, it is further confirmed that the voxel is in the unoccluded and observable state, and the present embodiment is not limited thereto.
[0159] After completing the observability judgment, all observable fine voxel units can be recorded in the visible voxel set according to the observability result, and all unobservable fine voxel units can be recorded in the invisible voxel set. If the invisible voxel set corresponding to any first candidate flight point is not an empty set, the voxel center of the unobservable fine voxel unit is offset by a movement distance in the direction of the average normal vector of the fine voxel unit, to generate a new flight point as a second candidate flight point for supplementing the first candidate flight point. The movement distance can refer to the calculation method of the movement distance of the first candidate flight point, which will not be described here.
[0160] The second candidate flight point is determined through the fine voxel map, so that the voxel region that cannot be covered due to problems such as mismatched direction, occlusion or dead angle of the first candidate flight point can be specially supplemented, and complete, continuous and unoccluded image data acquisition of the three-dimensional terrain model in the actual task execution process is ensured, the monitoring blind area problem caused by sparse flight points in the traditional method is effectively avoided, the integrity of the candidate flight points and the comprehensive coverage of the target operation region are improved, and thus the accuracy and effectiveness of the generated unmanned aerial vehicle operation route are ensured.
[0161] In an example embodiment of the present disclosure, the collision detection of the first candidate flight point and the second candidate flight point in combination with the fine voxel map to obtain the target flight point set can be achieved through the following steps, and can specifically include:
[0162] The oriented bounding box is constructed with the first candidate flight point and the second candidate flight point as the center. If the oriented bounding box corresponding to any candidate flight point has an intersection or inclusion relationship with the fine voxel unit in the fine voxel map, it is determined that the candidate flight point has a collision risk, and the first candidate flight point and the second candidate flight point are removed to obtain the target flight point set.
[0163] The oriented bounding box (OBB) refers to a compact bounding geometry whose boundary can be rotated according to the reference direction compared with the traditional axis-aligned bounding box (AABB). The oriented bounding box has the advantages of small volume and high boundary fitting degree, and can more truly express the surrounding range of the flight point in space under the non-aligned direction. For example, the three-dimensional coordinates of the flight point can be determined as the geometric center of the bounding box, and the OBB main axis direction can be constructed according to the observation direction vector of the flight point, so that the Z axis of the bounding box is consistent with the direction of the flight point. Then the length, width and height of the OBB can be set, which can be set according to the parameters such as the size of the unmanned aerial vehicle body, the minimum safe distance of image acquisition, the attitude error range, etc. Usually, the side length can be set to be between 0.5 meters and 2 meters.
[0164] After the OBBs of all candidate waypoints are constructed, the spatial interaction between the OBBs and the fine voxel map can be determined to determine whether each waypoint has a collision risk. Specifically, the position and size of each voxel unit in the fine voxel map are known, forming a regular three-dimensional grid structure, and the collision detection process can be realized by spatial overlap test, that is, to determine whether the OBBs intersect or contain any voxel unit. For example, the Separating Axis Theorem (SAT) can be used to quickly determine the intersection of the OBBs and the cubic voxel, or the voxel octree structure can be used to search for the nearest neighbor voxel and test the intersection. In addition, the OBBs can be projected onto each coordinate axis direction, and the projection intervals can be compared to quickly complete the preliminary screening, and the accurate intersection test can be performed after confirming the voxel region that may collide. The present example embodiment does not make special limitations on the manner of implementing collision detection in combination with the OBBs.
[0165] If it is determined that the OBB corresponding to any candidate waypoint intersects or contains a voxel unit in the fine voxel map, it is considered that the waypoint has a potential collision risk. The intersection relationship means that the OBB boundary geometrically overlaps the voxel boundary, and the inclusion relationship means that the OBB is completely embedded in a certain voxel unit. Both of them represent the possibility of collision with the terrain or structure when the UAV executes the waypoint task, which may cause flight control failure, image acquisition failure, or even equipment damage. Therefore, when such a determination result occurs, the candidate waypoint can be removed from the candidate set and not participate in subsequent target waypoint sorting and route connection.
[0166] After the collision risk identification and removal operation is performed on all first candidate waypoints and second candidate waypoints, the remaining waypoint set constitutes a target waypoint set. All waypoints in the set meet the spatial safety requirement and have good flight accessibility and data acquisition stability, and can be directly used as an input node for subsequent generation of a UAV operation route, effectively improving the safety of the UAV operation route and reducing the operation risk of the UAV.
[0167] Figure 8 A flowchart schematically showing the determination of a target waypoint set according to some embodiments of the present disclosure is shown.
[0168] Reference Figure 8 As shown, the UAV route planning method for hydropower projects can include three stages: an initial voxel map generation stage, a voxel optimization segmentation stage, and a waypoint output stage, and each stage forms an ordered process according to data flow and judgment logic. Specifically:
[0169] Firstly, the target area base map, i.e. the three-dimensional terrain grid model, is taken as input, and a voxel size calculation step is performed. According to the scale parameter, sensor parameters (including pixel size, horizontal pixel number and vertical pixel number), and heading overlap and side overlap, the initial voxel unit size is calculated. The determined voxel size will be used for the spatial scale setting of the subsequent voxelization processing.
[0170] After the voxel size is determined, the voxelization step is entered, the three-dimensional grid model of the target area is spatially divided according to the calculated voxel size to generate a regular grid structure, and then the voxel-in average normal vector calculation step is performed. The weighted average processing of the normal vector is performed on the triangular patches contained in each basic voxel unit to obtain the average normal vector reflecting the overall surface orientation.
[0171] After the above operations are completed, the initial voxel map is obtained, and the first candidate waypoint generation process is entered. Here, the top voxel unit can be extracted, and the first candidate waypoint set defined by position and direction is obtained based on the voxel center offset along the negative observation direction.
[0172] At the same time, the initial voxel map is subjected to structure optimization processing, i.e. the voxel optimization segmentation stage. First, it is judged whether the current voxel satisfies the segmentation condition: by comparing the included angle between the normal vector of the patch in the voxel and the average normal vector, it is judged whether the number of patches with an included angle greater than a preset threshold (such as 30°) exceeds a set proportion (such as 15%); if it is satisfied, the voxel segmentation process is entered, and the voxel is divided in half in the three-dimensional direction to generate new voxel units with a size of half of the original voxel; if it is not satisfied, the current voxel is output as the final resolution voxel. The above segmentation judgment and operation process can be iteratively executed until all voxel units satisfy the segmentation termination condition, which includes the maximum recursion depth limit (such as less than 1 / 8 of the initial voxel).
[0173] All voxel units after the segmentation refinement together constitute a fine voxel map, and the second candidate waypoint generation process is entered. This process identifies unobservable areas by analyzing the visibility relationship between the fine voxel and the first candidate waypoint, and generates the second candidate waypoint by offsetting the unobservable voxel along the average normal vector direction, thereby complementing the unobservable area of the first candidate waypoint.
[0174] After the two candidate waypoint sets are generated, the collision detection step is entered. This step constructs an oriented bounding box (OBB) centered on the waypoint and performs intersection detection with the voxel units in the fine voxel map. If there is an intersection or inclusion relationship, it is determined that there is a collision risk, and it is removed. The remaining waypoints constitute the final target waypoint set.
[0175] Finally, the target waypoint set can be fitted to a minimum enclosing rectangle according to a spatial distribution rule, and an ordered flight path in an "S" shape distribution is generated, while the flight path direction is made as parallel to the long side direction of the rectangle as possible to reduce the number of turns and improve flight efficiency. The flight path will be output in KML or KMZ format to guide the UAV to perform patrol and monitoring tasks.
[0176] It should be noted that although the various steps of the methods in the present disclosure are described in a particular order in the accompanying drawings, this does not require or imply that the steps must be performed in this particular order, or that all of the steps shown must be performed to achieve the desired result. Additionally or alternatively, certain steps can be omitted, multiple steps can be combined into one step, and / or one step can be divided into multiple steps, etc.
Claims
1. A UAV route planning method for hydropower projects, characterized by: include: Determine multiple target operation areas to be inspected and monitored, and generate a three-dimensional terrain grid model corresponding to each target operation area; voxelize the three-dimensional terrain grid model to construct an initial voxel map, obtain a scale parameter corresponding to the three-dimensional terrain grid model and a lens focal length corresponding to the drone, and determine a movement distance based on the scale parameter and the lens focal length; mark a target voxel unit at the top position in the initial voxel map, and move the voxel center coordinates of the target voxel unit in a target direction according to the movement distance to obtain a first candidate waypoint, where the target direction is the opposite direction of the observation direction at the first candidate waypoint; Based on the average normal vector distribution of the initial voxel map, each voxel unit in the initial voxel map is segmented and refined to generate a fine voxel map, and the average normal vector of each fine voxel unit in the fine voxel map is calculated. In combination with the observation direction of the first candidate waypoint, a second angle between the average normal vector and the opposite direction of the observation direction is determined, and the observability of each fine voxel unit at each first candidate waypoint is determined according to the second angle; all observable fine voxel units are recorded into a visible voxel set through the observability, and all unobservable fine voxel units are recorded into an invisible voxel set; if the invisible voxel set corresponding to any first candidate waypoint is not an empty set, the voxel center of the fine voxel unit is offset by a moving distance along the average normal vector direction of the unobservable fine voxel unit to generate a new waypoint as a second candidate waypoint for supplementing the first candidate waypoint; performing collision detection on the first candidate waypoint and the second candidate waypoint in combination with the refined voxel map to obtain a target waypoint set; An unmanned aerial vehicle (UAV) operation route is generated according to the target waypoint set, so as to control the UAV to inspect and test the corresponding target operation areas through the UAV operation route.
2. The method for UAV route planning for hydropower projects according to claim 1 is characterized in that: The voxelization of the three-dimensional terrain grid model to construct an initial voxel map includes: Determine the initial voxel size of the basic voxel unit; Determining a minimum bounding box corresponding to the three-dimensional terrain grid model, and evenly dividing the minimum bounding box according to the initial voxel size to obtain a basic voxel map; A mapping relationship between the three-dimensional terrain grid model and each of the basic voxel units in the basic voxel map is constructed, and the three-dimensional terrain grid model is mapped to the basic voxel map based on the mapping relationship to obtain an initial voxel map.
3. The method for UAV route planning for hydropower projects according to claim 2 is characterized in that: The determining of the initial voxel size of the basic voxel unit includes: Obtain the flight parameters corresponding to the UAV, including scale parameters, pixel size, horizontal pixel number of the sensor, vertical pixel number of the sensor, heading overlap, and lateral overlap; An initial voxel size of the basic voxel unit is determined according to the flight parameters.
4. The method for UAV route planning for hydropower projects according to claim 2, characterized in that: The constructing of a mapping relationship between the three-dimensional terrain grid model and each of the basic voxel units in the basic voxel map includes: Obtaining the center coordinates of each facet in the three-dimensional terrain grid model, and obtaining the minimum value of the vertex coordinates corresponding to the three-dimensional terrain grid model; Determine the index information of each of the model facets in the basic voxel map according to the facet center coordinates and the minimum value of the vertex coordinates; The index information is used as a mapping relationship between the three-dimensional terrain grid model and each of the basic voxel units in the basic voxel map.
5. The method for UAV route planning for hydropower projects according to claim 1, characterized in that: The step of segmenting and refining each voxel unit in the initial voxel map based on the average normal vector distribution of the initial voxel map to generate a refined voxel map includes: Based on the normal vectors of the model patches contained in each basic voxel unit in the initial voxel map, calculating the average normal vector corresponding to each basic voxel unit; screening voxel units to be refined in the initial voxel map according to the average normal vector; Determining a segmentation voxel size of the to-be-refined voxel unit according to the initial voxel size of the basic voxel unit, wherein the segmentation voxel size is half of the initial voxel size, and segmenting the to-be-refined voxel unit according to the segmentation voxel size to obtain a new basic voxel unit; The above steps are repeated until all basic voxel units in the initial voxel map meet the segmentation restriction conditions, thereby obtaining a refined voxel map.
6. The method for UAV route planning for hydropower projects according to claim 5, characterized in that: The step of screening voxel units to be refined in the initial voxel map according to the average normal vector comprises: Calculating a first angle between the normal vector of each model facet in the basic voxel unit and the average normal vector; Determine the number of facets in the basic voxel unit whose first angle is greater than or equal to a preset angle threshold; If the ratio of the number of facets to the total number of facets in the basic voxel unit exceeds a preset ratio threshold, the basic voxel unit is determined to be a voxel unit to be refined.
7. The method for UAV route planning for hydropower projects according to claim 5, characterized in that: The segmentation restriction condition is that the segmentation voxel size is smaller than one eighth of the initial voxel size.
8. The method for UAV route planning for hydropower projects according to claim 1, characterized in that: The performing collision detection on the first candidate waypoint and the second candidate waypoint in combination with the fine voxel map to obtain a target waypoint set includes: Constructing a directed bounding box with the first candidate waypoint and the second candidate waypoint as centers; If the directed bounding box corresponding to any candidate waypoint intersects or contains a fine voxel unit in the fine voxel map, the candidate waypoint is determined to have a collision risk, and the first candidate waypoint and the second candidate waypoint are eliminated to obtain a target waypoint set.
Citation Information
Patent Citations
Close photography three-dimensional flight path and attitude planning method and device for complex terrains
CN111649723A
Air route planning method and device, server and computer readable storage medium
CN113945217A