A method for generating an orthophoto by an unmanned aerial vehicle
By optimizing UAV flight paths using genetic algorithms and combining terrain and obstacle detection, a globally optimal path is generated, solving the problem of UAV orthophoto acquisition in complex environments and achieving efficient and safe image generation and flight.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-04
- Publication Date
- 2026-03-31
AI Technical Summary
Existing methods for generating flight paths for UAV orthophotos struggle to achieve efficient and accurate image acquisition when faced with complex terrain and obstacles, and lack deep integration with 3D geographic information, resulting in insufficient image quality and flight safety.
A genetic algorithm is used to fuse path optimization strategies. By combining the grid features of the inspection area and image parameter constraints, the flight altitude and waypoint spacing are dynamically adjusted. Obstacle avoidance is achieved through obstacle detection, and the flight path is optimized in a simulation environment to generate the globally optimal path, ensuring image acquisition accuracy and flight safety.
It enables efficient and safe orthophoto acquisition in complex terrain and obstacle environments, optimizes flight path complexity, reduces flight distance and number of turns, adapts to UAV endurance, and ensures image quality and flight safety.
Smart Images

Figure CN120991875B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of UAV surveying and autonomous navigation technology, specifically a method for generating autonomous inspection orthophotos of UAVs. Background Technology
[0002] UAV orthophoto technology, by acquiring vertical photographic images with a uniform scale and no distortion from the air and then stitching them together, has become an indispensable and efficient data acquisition method in fields such as power line inspection, geological disaster monitoring, smart city modeling, and basic surveying and mapping. Compared with traditional manual surveying, this technology has significant advantages such as high efficiency, low cost, uniform data accuracy, and the ability to operate in complex and dangerous areas. With the continuous development of UAV platforms, high-precision positioning technology, and camera sensor technology, industry applications are evolving towards full coverage, high precision, and full automation. The primary prerequisite for achieving high-quality orthophoto results is to generate an efficient flight path that can adapt to complex operating environments and meet the geometric quality requirements of subsequent stitching. Therefore, the intelligent generation method of UAV autonomous inspection flight paths is a core key technology for improving the efficiency and quality of the entire operation process and is also a current research and application hotspot.
[0003] Existing technologies still have significant structural and methodological shortcomings when dealing with complex real-world application scenarios. First, regarding terrain adaptability, most existing solutions use fixed flight altitudes or uniform overlap rate parameters, failing to fully consider elevation differences and terrain undulations within the inspection area. This results in inconsistent ground resolution of images in areas with significant undulations, with huge differences in image detail between flat and hilly areas. Setting a fixed overlap rate in low-lying areas leads to data redundancy, while insufficient coverage in high-altitude areas causes subsequent image stitching failures, severely restricting the accuracy and reliability of orthophoto generation. Second, in terms of intelligence and automation, existing methods generally lack the ability to deeply and in real-time integrate with 3D geographic information. They cannot dynamically adjust the 3D coordinates of waypoints and the attitude of the aircraft based on the actual terrain. When facing obstacles with complex 3D structures, such as high-voltage power lines, wind turbines, and tall buildings, existing obstacle avoidance algorithms mostly rely on pre-set 2D planar obstacle libraries. This not only makes it difficult to autonomously generate safe and reliable 3D avoidance paths but also requires secondary confirmation and intervention by humans, greatly increasing operational risks and time costs, and failing to meet the real-time requirements of large-scale automated inspections.
[0004] In summary, existing technologies lack deep integration with 3D geographic information at the structural level of flight path planning. This makes it difficult for current UAV orthophoto flight path generation methods to meet the increasingly complex industry application requirements in terms of efficiency, accuracy, and safety. Therefore, there is an urgent need for a fully automatic and adaptive flight path generation method that can deeply integrate real-time terrain analysis, dynamic parameter adjustment, and intelligent 3D obstacle avoidance decision-making to break through the bottlenecks of existing technologies. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a method for generating autonomous inspection orthophotos by unmanned aerial vehicles (UAVs). This method utilizes a path optimization strategy fused with a genetic algorithm, combining grid features of the inspection area with image parameter constraints to achieve global route optimization. Using candidate waypoints as nodes, redundant waypoints are filtered out through a segment smoothness factor to reduce route complexity. The genetic algorithm constructs a fitness function including flight distance, number of turns, and overlap rate, using flight altitude and waypoint spacing as constraints. Through population iteration, it finds the globally optimal path, optimizing and balancing multiple objectives. This ensures that the route meets image acquisition accuracy requirements while shortening flight distance, reducing the number of turns, and adapting to the UAV's endurance, guaranteeing efficient progress of the inspection task. Simultaneously, the waypoint coordinates output from the simulation are directly adapted to the flight control system, ensuring consistency between actual flight parameters and planned parameters, thus mitigating image quality issues and flight safety risks caused by route design flaws from the outset.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a method for generating autonomous inspection orthophotos by unmanned aerial vehicles (UAVs), the specific steps of which are as follows:
[0007] S100: Obtain the boundary information and digital elevation model data of the target area, and divide the area into uniform grids according to a preset resolution, with the center point of each grid as a candidate waypoint;
[0008] S200 dynamically calculates flight altitude based on camera focal length, sensor size, preset ground resolution, and overlap rate requirements. Number of routes waypoint spacing and ;
[0009] S300 generates parallel flight routes along the long side of the region, performs elevation interpolation on each waypoint based on the digital elevation model to dynamically adjust the flight altitude, and compares it with the obstacle database. For waypoints with a distance less than the safety threshold, it performs obstacle avoidance operations such as lateral offset and altitude increase.
[0010] S400 uses a genetic algorithm to merge adjacent waypoints and reduce the number of turns. Collision detection and overlap rate verification are performed in a simulation environment, and the final waypoint coordinates are output.
[0011] The S500 drone flies along the flight path and automatically triggers shooting at waypoints, transmitting image data back in real time. When image loss or sudden obstacles are detected, the area is re-divided into grids at half the grid resolution in S100. Combined with the parameter calculation logic of S200, a local supplementary flight path is generated and the supplementary flight is executed, ultimately completing the acquisition of orthophoto data for the entire area.
[0012] Furthermore, in step S100, the specific steps for obtaining digital elevation model data and grid division are as follows:
[0013] The boundary polygons of the target area are imported via a geographic information system interface and drawn manually by the user.
[0014] The point cloud data within the boundary polygon area is scanned in real time using a digital elevation model and airborne lidar.
[0015] The resolution is determined based on the preset ground resolution target and camera parameters, and the resolution is adjusted in combination with the terrain undulation complexity reflected by the digital elevation model. The target area is divided into uniform grids, and each grid is assigned a unique identifier and the latitude, longitude and elevation coordinates of its center point.
[0016] Furthermore, in S200, regarding flight altitude... The calculation is based on the preset ground resolution (GSD) requirements and camera focal length. and the pixel size of the camera sensor By using the ratio of lens focal length to pixel size, combined with a preset ground resolution, the required flight altitude can be obtained. Wherein, the ground resolution GSD is a customized parameter input by the user, representing the actual ground size represented by each pixel in the image. Represents the actual focal length of the camera lens. Represents the pixel size of a camera sensor, that is, the physical size of a single photosensitive unit on the sensor. The sensor area is [area].
[0017] Furthermore, in S200, the waypoint spacing includes the heading spacing. and lateral spacing Its calculation is based on the heading overlap rate. and lateral overlap rate Confirmed, and heading overlap rate Lateral overlap rate Based on the camera's field of view and the flight altitude Calculate the ground coverage width of a single image. and length Then the heading spacing This is used to ensure that adjacent shooting points meet a preset image overlap ratio in the flight direction, and the lateral spacing... This is used to ensure that the images between adjacent parallel flight paths meet the preset overlap requirements in the lateral direction.
[0018] Furthermore, in S200, regarding the number of routes... The width of the target area and the lateral spacing Joint decision, that is ,in, This represents the total number of routes required. This represents the actual width of the inspection area along its shorter side. This represents the lateral distance between two adjacent flight paths. The function is called the floor function, which rounds the calculation result up. This calculation ensures that the generated parallel flight paths can completely cover the entire target area, and the number of flight paths is the minimum value that satisfies the lateral overlap condition. This optimizes the flight path, reduces redundant flight, and improves inspection efficiency while ensuring image quality.
[0019] Furthermore, in step S300, based on the digital elevation model data acquired in step S100, elevation interpolation calculations are performed on each generated initial waypoint to determine the actual terrain elevation of its location. ;
[0020] The elevation interpolation uses bilinear interpolation, which employs a weighted average of grid point data with known elevations around the waypoint to obtain the interpolation result, thereby establishing three-dimensional waypoint coordinates that correspond to the actual terrain.
[0021] Flight altitude calculated from S200 And the terrain elevation obtained by interpolation Dynamically correct the absolute flight altitude of the waypoint The correction is as follows: ,in, The safety redundancy height is preset according to the operation specifications to ensure that there is a sufficient safety gap between the drone and the ground vegetation. The principle of this operation is to enable the drone to strictly follow the changes in terrain and fly in a terrain-following manner, thereby maintaining a constant relative altitude and ground resolution throughout the inspection area, and avoiding inconsistent image resolution or blind spots caused by changes in terrain.
[0022] Furthermore, after the S300 completes the elevation adjustment, it performs three-dimensional spatial conflict detection between each three-dimensional waypoint and a preset obstacle database. The obstacle database includes static obstacles and dynamic obstacles. The coordinates and height information of the static obstacles are pre-imported through a geographic information system, and the information of the dynamic obstacles is updated in real time through the UAV's onboard millimeter-wave radar.
[0023] A safety threshold is set for each type of obstacle. When the three-dimensional Euclidean distance between a waypoint and an obstacle is detected to be less than the safety threshold, obstacle avoidance is automatically triggered. The obstacle avoidance operation adopts a horizontal offset strategy in the horizontal plane, that is, a new waypoint is generated in a direction perpendicular to the original flight path, and the horizontal distance between the new waypoint and the obstacle is greater than the safety threshold. When the horizontal offset cannot be implemented due to airspace restrictions, a vertical altitude boost strategy is activated, that is, the absolute flight altitude of the waypoint is raised to the level of the obstacle and a safety redundancy is added. This forms an obstacle-crossing flight path.
[0024] Furthermore, in S400, the specific process of merging adjacent waypoints and reducing the number of turns using the genetic algorithm includes:
[0025] The initial waypoints of the initial route are initially screened, using the coordinates of the candidate waypoints in S100 as nodes and the straight-line distance between adjacent waypoints as the basic path cost. Simultaneously, a segment smoothness factor is introduced as a heuristic function to delete redundant waypoints and merge consecutive waypoints. The segment smoothness factor... ,in, This is the segment smoothness factor, with a value ranging from 0 to 1. The angle between two adjacent flight segments is the angle between the line connecting the end of the previous flight segment and the current waypoint, and between the current waypoint and the start of the next flight segment. When it approaches 1, it indicates that the angle of the flight segment is... Approaching 0 degrees, the flight path is smooth; when When it approaches 0, it indicates that the angle of the flight segment is... Approaching 90 degrees, the flight path shows a clear turn;
[0026] For parallel routes generated in S300, if the straight-line distance between two adjacent waypoints is less than 0.5 meters, they are identified as redundant waypoints and deleted. If the straight-line distance between three consecutive waypoints is less than 0.5 meters, they are deleted. When the average value is greater than 0.95, intermediate waypoints are merged, and only the first and last waypoints are retained. This filtering process can reduce the number of waypoints in the initial route by 15% to 20%, thereby reducing the route complexity while ensuring coverage accuracy.
[0027] The selected flight routes are globally optimized, using the flight altitude and waypoint spacing calculated in S200 as constraints, with the optimization objectives being to minimize the total flight distance, the number of turns, and the image overlap rate. The number of flight routes and the order of waypoints are used as gene encodings to construct a length of [missing information]. Chromosomes, among which For the total number of waypoints after filtering, perform iterative optimization, including:
[0028] Population size: set to 50, that is, 50 candidate route schemes are maintained in each iteration, and each scheme corresponds to a complete route;
[0029] Fitness function: Constructing a fitness function based on the requirements of the inspection task. ,in, The fitness value is used to evaluate the merits of candidate routes. This is the total flight distance of the route, which is the sum of the straight-line distances between all adjacent waypoints. For the number of turns, The overlap rate compliance rate includes heading overlap rate. Lateral overlap rate The proportion of image pairs within the total number of image pairs. , , These are the weighting coefficients for the total flight distance, number of turns, and overlap rate compliance rate of the flight route, respectively, and they satisfy the following conditions: ;
[0030] Selection operation: The probability of an individual being selected is directly proportional to its fitness value. Of the individuals, 5% are retained and directly enter the next generation;
[0031] The crossover operation uses a two-point crossover method with a crossover probability of 0.7. That is, two parent chromosomes are selected, which are two different routes, and the gene segments of the waypoint sequence between the crossover points are exchanged to generate offspring chromosomes.
[0032] Mutation operation: A random mutation method is used with a mutation probability of 0.05. The waypoint gene in the chromosome is selected, and the waypoint is replaced with one of the candidate waypoints of the center of the eight adjacent grids in S100 according to the coordinates of the adjacent nodes of the grid, so as to make local adjustments to the flight path.
[0033] Number of iterations: set to 50 to 100 times. The iteration termination condition is that the rate of change of the fitness value of an individual is <1% in 10 consecutive iterations. The final waypoint coordinates are output.
[0034] Furthermore, in S500, the logic for detecting image gaps and sudden obstacles is as follows:
[0035] By analyzing the real-time transmitted image metadata and low-resolution thumbnails, when no valid images are received for three consecutive waypoints, it is determined that the images are missing.
[0036] When the airborne obstacle avoidance radar detects a moving object with a relative speed greater than 5 m / s, it is determined to be a sudden obstacle.
[0037] The execution logic for the partial supplementary flight route is as follows:
[0038] When image loss or sudden obstacles are identified, the current main flight path is paused and the boundary coordinates of the area are recorded. The boundary is used as the new target area to trigger a local re-flight process. This process uses half of the initial grid resolution in S100 to re-grid the abnormal area and generate candidate waypoints for re-flight.
[0039] Based on the candidate waypoints for re-flight, the flight parameters, including flight altitude, number of routes, and distance between waypoints, are recalculated to generate local re-flight routes;
[0040] After completing the aforementioned partial supplementary flight route, the drone automatically returns to the interruption point of the main flight route to continue its mission.
[0041] Compared with existing technologies, this method for generating autonomous inspection orthophotos by UAVs has the following advantages:
[0042] I. This invention utilizes a path optimization strategy fused with a genetic algorithm, combining the grid features of the inspection area with image parameter constraints to achieve global route optimization. Using candidate waypoints as nodes, redundant waypoints are filtered out through a segment smoothness factor, reducing route complexity. The genetic algorithm constructs a fitness function including flight distance, number of turns, and overlap rate, using flight altitude and waypoint spacing as constraints. Through population iteration, it finds the globally optimal path, optimizing and balancing multiple objectives. This ensures that the route meets image acquisition accuracy requirements while shortening flight distance and reducing the number of turns, adapting to the UAV's endurance capabilities, and guaranteeing efficient progress of inspection tasks. Simultaneously, the waypoint coordinates output from the simulation are directly adapted to the flight control system, ensuring consistency between actual flight parameters and planned parameters, thus mitigating image quality issues and flight safety risks caused by route design flaws from the outset.
[0043] Other advantages, objectives and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination or study, or may be learned from the practice of the invention. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0045] Figure 1 A flowchart illustrating the operation of a method for generating orthophotos of autonomous inspection by unmanned aerial vehicles (UAVs).
[0046] Figure 2 A step-by-step framework diagram of a method for generating orthophotos of autonomous inspection by unmanned aerial vehicles;
[0047] Figure 3 The execution logic diagram for detecting image loss and sudden obstacles. Detailed Implementation
[0048] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.
[0049] Example 1: This example provides the working principle of a method for generating orthophotos of autonomous UAV inspections, aiming to address the shortcomings of existing UAV inspection route planning in terms of terrain adaptability, obstacle avoidance safety, and inspection efficiency. Figure 2 As shown, this method starts with acquiring basic data and dividing the target area into grids, dynamically calculates key flight parameters by combining camera parameters and terrain data, optimizes the flight path based on real terrain and obstacle information and performs obstacle avoidance operations, and then uses a genetic algorithm to globally optimize the flight path to reduce redundant waypoints and turning times. Finally, it monitors image data in real time during actual flight and generates local supplementary flight paths for abnormal situations, achieving high-precision, high-efficiency, and high-safety orthophoto data acquisition for the entire area. It is suitable for various complex scenarios such as power line inspection, geological disaster monitoring, smart city modeling, and basic surveying and mapping.
[0050] First, the process moves to the target area basic data acquisition and grid division stage (S100). In acquiring the target area boundary information, two complementary methods are employed to ensure the accuracy and flexibility of the boundary data. On one hand, the boundary polygons of the target area are imported through a Geographic Information System (GIS) interface. This method is suitable for scenarios with existing, clearly defined geographic boundary data, directly acquiring area boundaries confirmed by professional surveying and mapping, avoiding potential errors from manual drawing. On the other hand, users are allowed to manually draw the boundary polygons. This method is suitable for situations where there is no preset GIS data or where the inspection area needs temporary adjustment. Users can determine the target area by selecting coordinates or dragging and dropping according to actual inspection needs. The combination of these two methods satisfies both the accuracy requirements of standardized operations and the flexibility of on-site operations. Digital elevation model (DEM) data is acquired to reflect the terrain undulations of the target area, providing a basis for adjusting waypoint elevations. Meanwhile, point cloud data from real-time scanning by airborne lidar further supplements the area with detailed terrain and feature information, improving the precision of the terrain data. Specifically, after determining the target area boundary, the DEM database is accessed to extract DEM data within the boundary polygon area. This data is stored in a regular grid format, with each grid cell containing a corresponding elevation value. Simultaneously, before takeoff or during the initial flight phase, the UAV uses airborne lidar to... The equipment performs real-time scanning of the boundary polygonal region, acquiring 3D point cloud data within that area. This point cloud data contains the 3D coordinates (longitude, latitude, and elevation) of numerous discrete points, accurately capturing detailed terrain information that might be missed in the DEM data, such as ground vegetation and small protrusions. Combining the DEM data with airborne LiDAR point cloud data creates a more comprehensive and accurate target area terrain dataset. Based on this dataset, the continuous target area is transformed into discrete, standardized candidate waypoint carriers, laying the foundation for subsequent waypoint generation and parameter calculation. Before meshing, an initial preset ground resolution is determined, and this is combined with camera parameters (such as sensor size and focal length) to optimize the initial preset ground resolution. The area resolution is adjusted. After determining the final grid resolution, the target area is divided into uniform grids according to this resolution. Each grid serves as a basic image acquisition unit. To facilitate subsequent waypoint management and parameter association, each grid is assigned a unique identifier (such as a code generated based on the grid's row and column numbers within the area). At the same time, the latitude, longitude, and elevation coordinates of the center point of each grid are calculated. This center point is the candidate waypoint. The latitude and longitude coordinates of the candidate waypoint are calculated from the position of the grid in the target area coordinate system, while the elevation coordinates are obtained by fusing and interpolating the DEM data and the airborne LiDAR point cloud data to ensure that the elevation of each candidate waypoint can accurately reflect the terrain height of its location.
[0051] Then, the system enters the dynamic calculation phase for key flight parameters (S200). Based on the target area information, camera hardware parameters, and preset image quality requirements (overlap rate) obtained in S100, the UAV's flight altitude is accurately calculated. Number of routes waypoint spacing and Among them, regarding flight altitude By using the geometric relationship between camera optical parameters and a preset ground resolution (GSD), the required flight altitude of the UAV is determined to ensure that the captured images meet the preset ground resolution requirements. The ground resolution (GSD) is a customized parameter input by the user according to the inspection task requirements, representing the actual ground size corresponding to each pixel in the image, and the camera focal length. The actual optical focal length of the camera lens is an inherent parameter of the camera, directly affecting the lens's imaging range and magnification; the pixel size of the camera sensor... This refers to the physical size of a single photosensitive unit on the sensor, also an inherent parameter of the camera. Its size determines the sensor's ability to capture light signals and its imaging resolution, and is crucial for calculating flight altitude. At that time, when the drone is at a high altitude At this time, the camera lens's field of view will form a coverage area on the ground, and the ground size (i.e., GSD) corresponding to each pixel in the image is related to the flight altitude. Proportional to the camera's focal length Inversely proportional to pixel size Proportional, while also taking into account the camera sensor area Impact on imaging range (the larger the sensor area, the wider the ground coverage at the same focal length and height), the larger the sensor area... Incorporating these factors into the calculations to correct for flight altitude, the final formula for calculating flight altitude is as follows: The flight altitude calculated using this formula This ensures that every image captured by the camera during drone flight meets the user's preset ground resolution requirements, providing a consistent accuracy foundation for subsequent image stitching and orthophoto generation. Calculating waypoint spacing is crucial to ensuring that adjacent images meet overlap requirements; waypoint spacing includes heading spacing. (Waypoint spacing along the flight direction) and lateral spacing (Waypoint spacing perpendicular to the flight direction), its calculation needs to be combined with the heading overlap rate. and lateral overlap rate The requirement, wherein the heading overlap rate Lateral overlap refers to the percentage of overlap between two adjacent images along the flight direction. This refers to the overlap ratio between images of two adjacent parallel flight paths. The overlap ratio is set to ensure that sufficient matching feature points can be found during subsequent image stitching, avoiding stitching gaps or misalignments due to insufficient overlap. In this embodiment, the flight path overlap ratio is set. Lateral overlap rate Based on the camera's field of view and flight altitude Calculate the ground coverage width of a single image and length Then the heading spacing Calculated using this formula This ensures that images taken at adjacent waypoints have sufficient overlap in the flight direction, providing ample matching features for image stitching, and lateral spacing. This spacing ensures seamless lateral image transition between adjacent parallel flight paths, preventing blind spots. Regarding the number of flight paths... The width of the target area Lateral spacing The width of the target area is determined jointly. This refers to the actual width of the inspection area along its shorter side. The shorter side is chosen as the basis for width calculation because when generating parallel flight paths along the longer side of the area, the coverage area along the shorter side directly determines the required number of flight paths. This minimizes the number of turns between flight paths, improving flight efficiency. Therefore, the number of flight paths... ,in This is an up-rounding function. Its function is to round the calculation result up to an integer. Under the premise of satisfying the lateral overlap rate condition, it minimizes the number of flight paths, thereby reducing redundant flights and improving inspection efficiency.
[0052] Next, the flight path generation, waypoint elevation adjustment, and obstacle avoidance phase (S300) begins. The theoretical parameters calculated in S200 are combined with real terrain and obstacle information to generate a 3D flight path adapted to the actual environment. This ensures the UAV can fly along terrain undulations while avoiding static and dynamic obstacles within the area, guaranteeing flight safety and image accuracy. Based on the digital elevation model (DEM) data of the target area and the planar coordinates (latitude and longitude) of candidate waypoints acquired in S100, elevation interpolation is performed on each initial waypoint to determine its actual terrain elevation. Using grid data of four known elevations around a waypoint, the elevation value of the waypoint is calculated by weighted averaging. In this embodiment, for a candidate waypoint P, the four nearest grid points P1(x1, y1, z1), P2(x2, y1, z2), P3(x1, y2, z3), and P4(x2, y2, z4) are found in the DEM data (where x and y are plane coordinates, and z is elevation). Based on the x-coordinate distance between waypoint P and P1 and P2, the approximate elevation value z12 of point P in the y1 direction is calculated. Then, based on the y-coordinate distance between waypoint P and P1 and P3, the approximate elevation value z13 of point P in the x1 direction is calculated. Finally, based on the y-coordinate distance between waypoint P and y1 and y2, z12 and z13 are weighted and averaged to obtain the final elevation value of waypoint P. Combined with the flight altitude calculated from S200 Dynamically correct the absolute flight altitude of the waypoint Absolute flight altitude refers to the flight altitude of a drone relative to sea level, and its correction formula is: ,in To ensure a safe redundancy altitude based on pre-set operational specifications, this correction operation enables the UAV to strictly follow terrain variations during flight, maintaining a constant relative altitude and ground resolution throughout the inspection area. This avoids inconsistent image resolution or blind spots caused by terrain changes. After adjusting waypoint elevations, obstacle collision detection and avoidance operations are performed on each 3D waypoint to address both static and dynamic obstacles within the area. First, an obstacle database is constructed, containing information on both static and dynamic obstacles. The coordinates and altitude information of static obstacles (such as high-voltage transmission towers, tall buildings, and cliffs) are pre-imported using a Geographic Information System (GIS) before flight, ensuring the UAV has a grasp of the distribution of fixed obstacles within the area before takeoff. Information on dynamic obstacles (such as other aircraft, birds, and temporary construction equipment) is obtained via UAV-borne millimeter-wave radar. During flight, the drone captures the position, speed, and altitude information of surrounding moving objects in real time, providing data support for dynamic obstacle avoidance. A safety threshold is set for each type of obstacle. The obstacle avoidance operation employs a "lateral offset priority, altitude boost as a secondary" strategy: First, it attempts to perform a lateral offset in the horizontal plane, generating a new waypoint perpendicular to the original flight path. The planar coordinates of the new waypoint must satisfy the requirement that its horizontal distance from the obstacle is greater than the safety threshold, while ensuring that the new waypoint remains within the target inspection area and does not affect the image overlap rate of adjacent waypoints. The advantage of the lateral offset strategy is that it maintains the drone's relative flight altitude, ensuring that image resolution is not affected, while avoiding other risks caused by altitude changes. When horizontal offset cannot be implemented due to airspace restrictions (such as the edge of the target area or adjacent no-fly zones), the vertical altitude boost strategy is activated. In this case, the absolute flight altitude of the waypoint is... Raise it to a height above the top of the obstacle, and add a safety margin of safety. This process creates an obstacle-crossing flight path, ensuring that the drone can safely fly over obstacles. After implementing the altitude-boosting strategy, the image overlap rate between the waypoint and surrounding waypoints is re-verified. If the overlap rate fails to meet the standard due to altitude boosting, the altitude of the surrounding waypoints needs to be adaptively adjusted to ensure that the overall image quality of the flight path is not affected.
[0053] Next, the route global optimization and simulation verification stage (S400) is entered. The initial route generated in S300 is optimized using a genetic algorithm to remove redundant waypoints and reduce the number of turns. Specifically, the initial waypoints are initially screened; when the straight-line distance between two adjacent waypoints is less than 0.5 meters, they are identified as redundant and deleted. Using the candidate waypoint coordinates from S100 as nodes and the straight-line distance between adjacent waypoints as the basic path cost, a segment smoothness factor is introduced as a heuristic function to delete redundant waypoints and merge consecutive waypoints. ,in, This is the segment smoothness factor, with a value ranging from 0 to 1. The angle between two adjacent flight segments is the angle between the line connecting the end of the previous flight segment and the current waypoint, and between the current waypoint and the start of the next flight segment. When it approaches 1, it indicates that the angle of the flight segment is... Approaching 0 degrees, the flight path is smooth; when When it approaches 0, it indicates that the angle of the flight segment is... Approaching 90 degrees, the flight path exhibits a significant turning point. For parallel routes generated in S300, if the straight-line distance between two adjacent waypoints is less than 0.5 meters, they are identified as redundant waypoints and deleted. When the angle between adjacent segments formed by three consecutive waypoints corresponds to... When the average value is >0.95, intermediate waypoints are merged, retaining only the first and last waypoints. This screening process reduces the number of waypoints in the initial route by 15% to 20%, reducing route complexity while maintaining coverage accuracy. The screened routes are then globally optimized, using the flight altitude and waypoint spacing calculated in S200 as constraints, with the optimization objectives being minimizing total flight distance, minimizing the number of turns, and achieving image overlap. The number of routes and waypoint order are used as gene encodings to construct a length of [missing information]. Chromosomes, among which For the total number of waypoints after filtering, perform iterative optimization, including:
[0054] Population size: set to 50, that is, 50 candidate route schemes are maintained in each iteration, and each scheme corresponds to a complete route;
[0055] Fitness function: Constructing a fitness function based on the requirements of the inspection task. ,in, The fitness value is used to evaluate the merits of candidate routes. This is the total flight distance of the route, which is the sum of the straight-line distances between all adjacent waypoints. For the number of turns, The overlap rate compliance rate includes heading overlap rate. Lateral overlap rate The proportion of image pairs within the total number of image pairs. , , These are the weighting coefficients for the total flight distance, number of turns, and overlap rate compliance rate of the flight route, respectively, and they satisfy the following conditions: ;
[0056] Selection operation: The probability of an individual being selected is directly proportional to its fitness value. Of the individuals, 5% are retained and directly enter the next generation;
[0057] The crossover operation uses a two-point crossover method with a crossover probability of 0.7. That is, two parent chromosomes are selected, which are two different routes, and the gene segments of the waypoint sequence between the crossover points are exchanged to generate offspring chromosomes.
[0058] Mutation operation: A random mutation method is used with a mutation probability of 0.05. The waypoint gene in the chromosome is selected, and the waypoint is replaced with one of the candidate waypoints of the center of the eight adjacent grids in S100 according to the coordinates of the adjacent nodes of the grid, so as to make local adjustments to the flight path.
[0059] Number of iterations: set to 50 to 100 times. The iteration termination condition is that the rate of change of the fitness value of an individual is <1% in 10 consecutive iterations. The final waypoint coordinates are output and directly imported into the UAV flight control system to ensure that the actual flight parameters are consistent with the planned parameters.
[0060] Finally, the image acquisition and partial re-flight phase (S500) begins. The UAV performs flight along the designated route and automatically captures images. After importing the final waypoint coordinates from the S400, the UAV flight control system plans the flight path according to the waypoint sequence. During flight, the UAV uses its onboard GPS and inertial navigation system to locate its position in real time. Upon reaching a preset waypoint, the camera automatically triggers its shooting function, matching the shooting frequency to the waypoint spacing (ensuring that images captured at adjacent waypoints meet the overlap requirement). Simultaneously, the camera transmits the captured image data (including raw images and image metadata such as shooting time, coordinates, and exposure parameters) back to the ground control center in real time. The system performs real-time storage and preliminary analysis of the transmitted data. By analyzing the real-time transmitted image metadata and low-resolution thumbnails, the ground control center sets a continuous waypoint image reception threshold of 3. That is, if no valid images are received for 3 consecutive waypoints (including no image data received, missing image metadata, blurry and unrecognizable image thumbnails, etc.), it is determined that the image is missing. At the same time, the UAV's onboard obstacle avoidance radar scans the three-dimensional space around the UAV in real time. When a moving object with a relative speed > 5m / s is detected, it is determined to be a sudden obstacle. When image missing or sudden obstacles are detected, the system executes the logic of generating and executing a local supplementary flight path. The specific steps are as follows:
[0061] Mission Pause and Area Recording: The system immediately sends a command to pause the UAV's current main flight path mission, and the UAV hovers at a safe altitude; at the same time, the ground control center records the boundary coordinates of the area where the image is missing or where there are sudden obstacles. The boundary range is centered on the abnormal waypoint and extends outwards by twice the distance of the initial grid resolution in S100 to ensure coverage of all areas where there may be problems.
[0062] Local grid re-division: The boundary of the recorded abnormal area is used as the new target area. The grid is re-divided according to 1 / 2 of the initial grid resolution in S100. The purpose of re-dividing with 1 / 2 resolution is to increase the waypoint density of the supplementary flight area, ensure that the images taken by the supplementary flight are more accurate and have more detailed coverage, and make up for the coverage blind spots or insufficient accuracy problems that may exist in the original route.
[0063] Recalculate the parameters for the supplementary flight: Based on the parameter calculation logic of S200, recalculate the flight altitude, number of routes, and waypoint spacing for the supplementary flight route;
[0064] Rescheduled flight path generation and execution: Based on the redefined candidate waypoints and calculated rescheduled flight parameters, a local rescheduled flight path is generated. After receiving the rescheduled flight path instruction, the UAV flies from the hovering position to the starting waypoint of the rescheduled area and performs the shooting task according to the rescheduled flight path. The rescheduled flight image data is transmitted back in real time. The ground control center performs real-time verification of the rescheduled flight images to ensure that there are no missing images and that the overlap rate meets the standard.
[0065] Return to main flight path: After completing the supplementary flight mission, the UAV will automatically fly to the interruption point of the main flight path (i.e. the waypoint where it was paused) and continue to perform the unfinished main flight path mission until the image acquisition of the entire target area is completed.
[0066] In summary, this embodiment achieves the full-process generation of autonomous inspection orthophotos by UAVs through five closely connected stages from S100 to S500. The entire process deeply integrates three-dimensional geographic information, dynamic parameter calculation, intelligent obstacle avoidance decision-making, and global path optimization technology to ensure that the generated orthophotos meet the requirements of uniform scale, no distortion, and high stitching quality.
[0067] Example 2: Figure 1 As shown, this embodiment provides a method for generating orthophotos of autonomous UAV inspections. The workflow for generating orthophotos of autonomous UAV inspections includes the following steps:
[0068] (1) Obtaining regional information and dividing the grid
[0069] Obtain the boundary information of the target area.
[0070] Obtain the digital elevation model (DEM) data for this area.
[0071] The area is divided into a uniform grid based on the preset ground resolution.
[0072] The center point of each grid is used as a candidate waypoint.
[0073] (2) Calculate flight parameters
[0074] Based on camera focal length, sensor size, preset ground resolution, and overlap requirements, the following parameters are dynamically calculated: flight altitude, number of flight paths, and waypoint spacing (including heading spacing and lateral spacing).
[0075] (3) Generate flight path and adjust elevation
[0076] Parallel routes are generated along the longer side of the region.
[0077] Elevation interpolation is performed at each waypoint to obtain the actual terrain height.
[0078] The flight altitude is dynamically adjusted according to the terrain to maintain a constant relative altitude.
[0079] (4) Obstacle detection and obstacle avoidance
[0080] Perform 3D collision detection on each waypoint and obstacle database.
[0081] If the distance between the waypoint and the obstacle is less than the safety threshold, an obstacle avoidance operation will be performed.
[0082] Prioritize lateral offset.
[0083] If you cannot deviate, increase your flight altitude to overcome the obstacle.
[0084] (5) Route optimization and verification
[0085] Genetic algorithms are used to optimize waypoints, remove redundant waypoints, and merge consecutive waypoints to reduce turns.
[0086] Optimize waypoint sequence and route structure, and perform collision detection and overlap rate verification in a simulation environment.
[0087] Output the final waypoint coordinates.
[0088] (6) Performing flight operations and handling anomalies
[0089] like Figure 3 As shown, the drone flies along the planned route, automatically taking pictures at waypoints and transmitting image data back in real time.
[0090] If a missing image or a sudden obstacle is detected.
[0091] Pause the current task.
[0092] The abnormal region is re-divided at half the original grid resolution.
[0093] Generate and execute local supplementary flight routes.
[0094] After completion, return to the main route to continue the mission.
[0095] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A method for generating orthophoto images by an unmanned aerial vehicle (UAV) autonomously inspecting, characterized in that, The specific steps of the method are: S100, obtain the boundary information and digital elevation model data of the target area, divide the area into uniform grids according to the preset ground resolution GSD, and the center point of each grid is a candidate flight point; S200, dynamically calculating the flight height based on the camera focal length, the sensor size, the preset ground resolution GSD, and the overlap rate requirement , the number of flight lines , the flight point spacing , and ; The S200 includes a heading distance and a lateral distance , which are calculated by a heading overlap ratio and a lateral overlap ratio respectively, and the heading overlap ratio and the lateral overlap ratio are calculated according to a camera field of view and the flight height , and a ground coverage width and a length of a single image are calculated, and the heading distance is used to ensure that the image overlap ratio between adjacent shooting points in the flight direction meets a preset requirement, and the lateral distance is used to ensure that the image overlap ratio between adjacent parallel lines in the lateral direction meets a preset requirement. S300, generate parallel flight lines along the long edge direction of the region, perform elevation interpolation on each flight point based on the digital elevation model to dynamically adjust the flight height, and compare with the obstacle database, and perform obstacle avoidance operation of lateral offset and height lifting on the flight points with a distance less than the safety threshold; In the S300, based on the digital elevation model data obtained in the S100, an elevation interpolation calculation is performed on each generated initial waypoint to determine the actual terrain elevation of the location thereof ; The elevation interpolation adopts bilinear interpolation, and the interpolation result is obtained by using the weighted average of the grid point data with known elevation around the flight point, so as to establish the three-dimensional flight point coordinates consistent with the real terrain; the flight height calculated in S200 and the interpolated terrain altitude , the absolute flight height of the waypoint is dynamically corrected , the correction is: wherein, is a safety redundancy height preset according to the operation specification; S400, merge adjacent flight points and reduce the number of turns by using genetic algorithm, and perform collision detection and overlap rate checking in the simulation environment, and output the final flight point coordinates; S500, the unmanned aerial vehicle flies according to the flight line and automatically triggers shooting at the flight point, and the image data is returned in real time, when the image is missing and the sudden obstacle is detected, the grid is redivided according to 1 / 2 of the grid resolution in S100, and the local reflight flight line is generated and executed by combining the parameter calculation logic of S200, and finally the full-area orthographic image data acquisition is completed. 2.The method of claim 1, wherein, In S100, the specific steps of obtaining the digital elevation model data and grid division are: Import the boundary polygon of the target area through the geographic information system interface and manually draw it by the user; Through the digital elevation model and reading the point cloud data scanned by the airborne laser radar in the boundary polygon region in real time; According to the target and camera parameter resolution of the preset ground resolution GSD, and combining the terrain fluctuation complexity reflected by the digital elevation model, the preset ground resolution GSD is adjusted, the target area is divided into uniform grids, and each grid is assigned a unique identifier and the latitude, longitude and elevation coordinates of its center point.
3. The method of claim 1, wherein, In S200, regarding flight altitude The calculation is based on the preset ground resolution (GSD) requirements and camera focal length. and the pixel size of the camera sensor By using the ratio of lens focal length to pixel size, combined with the preset ground resolution (GSD), the required flight altitude is obtained. The preset ground resolution GSD is a customized parameter input by the user, representing the actual ground size represented by each pixel in the image. Represents the actual focal length of the camera lens. Represents the pixel size of a camera sensor, that is, the physical size of a single photosensitive unit on the sensor. The sensor area is [area].
4. The method of claim 1, wherein, The S200 is for the number of flight lines The width of the target area And the lateral spacing Together determine that Wherein, The total number of flight lines required, The actual width of the inspection area along the short side direction, The lateral spacing between adjacent two flight lines, Is the ceiling function, used to make the calculation results up.
5. The method of claim 1, wherein, After S300 completes the elevation adjustment, each three-dimensional flight point is subjected to three-dimensional space conflict detection with the preset obstacle database, the obstacle database includes static obstacles and dynamic obstacles, the coordinates and height information of the static obstacles are imported in advance through the geographic information system, and the information of the dynamic obstacles is updated in real time by the airborne millimeter wave radar of the unmanned aerial vehicle; A safety threshold is set for each type of obstacle, and when the three-dimensional Euclidean distance between the waypoint and the obstacle is detected to be less than the safety threshold, an obstacle avoidance operation is automatically triggered: the obstacle avoidance operation adopts a lateral offset strategy in the horizontal plane, that is, a new evasive waypoint is generated in the direction perpendicular to the original flight path, and the horizontal distance between the new waypoint and the obstacle is greater than the safety threshold, and when the horizontal plane offset cannot be implemented due to airspace restrictions, a height lifting strategy in the vertical direction is enabled, that is, the absolute flight height of the waypoint is lifted to the obstacle and a safety redundancy is superimposed to form an obstacle-crossing flight path. 6. The method of claim 1, wherein, In S400, the specific process of merging adjacent flight points and reducing the number of turns by genetic algorithm includes: The waypoints of the initial route are preliminarily screened, the candidate waypoint coordinates of the S100 are taken as nodes, the straight-line distance between adjacent waypoints is taken as a basic path cost, and a flight segment smoothness factor is introduced as a heuristic function for deleting redundant waypoints and merging continuous waypoints, the flight segment smoothness factor wherein, is a flight segment smoothness factor, and the value range of the flight segment smoothness factor is 0-1, is an included angle between two adjacent flight segments, that is, an included angle between a line connecting a previous flight segment end point and a current waypoint and a line connecting the current waypoint and a next flight segment start point. For the parallel flight path generated in S300, when the straight line distance between two adjacent waypoints is <0.5 meters, it is determined as a redundant waypoint and is deleted, when the included angle of the adjacent segments formed by three consecutive waypoints corresponds to the values of both >0.95, the middle waypoint is combined, and only the first and last waypoints are retained; values are both >0.95, the middle waypoint is combined, and only the first and last waypoints are retained; The screened routes are globally optimized, with the flight height and the waypoint spacing calculated in S200 as constraint conditions, with the minimization of the total flight distance, the minimization of the number of turns and the image overlap rate reaching the standard as optimization objectives, with the number of route lines and the waypoint order as gene coding, a chromosome with a length of is constructed, wherein is the total number of screened waypoints, and the iterative optimization is performed, including: Population size: set to 50, that is, maintain 50 groups of candidate flight line schemes in each iteration process, and each group of schemes corresponds to a complete flight line; Fitness function: construct fitness function based on the requirements of the inspection task , wherein, is the fitness value, used to evaluate the pros and cons of the candidate route, is the total flight distance of the route, i.e. the sum of the straight-line distances between all adjacent waypoints, is the number of turns, is the overlap rate compliance rate, including the heading overlap rate , the lateral overlap rate , and the proportion of the number of image pairs in the image pair total within the overlap rate , , are the weight coefficients of the total flight distance of the route, the number of turns, and the overlap rate compliance rate, respectively, and satisfy ; Selection operation: the probability of an individual being selected is proportional to its fitness value, and for individuals with fitness value 5% of the individuals are directly passed to the next generation; The two-point crossover method is adopted for crossover operation, and the crossover probability is set to 0.7, that is, two parent chromosomes, that is, two different flight lines, are selected, the flight point sequence gene fragments between the crossover points are exchanged, and the child chromosome is generated; Mutation operation: random mutation method is adopted, mutation probability is set to 0.05, flight point gene in the chromosome is selected, and the flight point is replaced by one of the candidate flight points of the eight adjacent grid centers around it according to the coordinates of the adjacent nodes of the grid in S100, and the flight line is locally adjusted. Iteration number: set to 50-100 times, the iteration termination condition is that the fitness value change rate of individuals in 10 consecutive iterations is <1%, and the final waypoint coordinates are output.
7. The method of claim 1, wherein, In the S500, the logic for detecting image loss and sudden obstacles is: By analyzing the real-time returned image metadata and low-resolution thumbnails, when 3 consecutive waypoints do not receive valid images, it is determined that the image is missing; When the airborne obstacle avoidance radar detects a moving object with a relative speed > 5m / s, it is determined that there is a sudden obstacle; The execution logic of the local supplementary flight route is: When image loss and sudden obstacles are identified, the current main route task is suspended, and the boundary coordinates of the region are recorded. Using the boundary as a new target area, the local supplementary flight process is triggered. The process uses half of the initial grid resolution in S100 to redivide the grid in the region to generate supplementary candidate waypoints; Based on the supplementary candidate waypoints, the flight parameters are recalculated, including flight height, route number, and waypoint spacing, to generate a local supplementary flight route; After the UAV completes the local supplementary flight route, it automatically returns to the main route breakpoint to continue the task.
Citation Information
Patent Citations
Method for programming aerophotographic operation of UAV
CN108387219A
Unmanned aerial vehicle nest inspection route planning method and system
CN118819182A