DBSCAN unmanned aerial vehicle path planning method based on depth estimation and optical flow analysis
The DBSCAN UAV path planning method, which combines depth estimation and optical flow analysis, solves the navigation instability problem of UAVs in multi-path bifurcation and temporary obstacles, achieving higher accuracy and more flexible path planning and control, and improving the navigation performance of UAVs in complex environments.
Patent Information
- Application Number
- CN202511428990.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-06
- Publication Date
- 2026-01-09
AI Technical Summary
Existing UAV path planning methods are not flexible enough when faced with multiple path forks or temporary obstacles, and path continuity and controllability are limited. Ignoring the differential flatness theory leads to unstable control commands and poor navigation performance.
The DBSCAN UAV path planning method based on depth estimation and optical flow analysis is adopted. Depth features are extracted by the VGG16 model, and image enhancement and segmentation are performed by combining Gamma transformation and region growing algorithm. The seed group is optimized by conditional random field and optical flow analysis, path clustering is performed, and obstacle avoidance path planning is combined with A* algorithm. The execution is carried out by dual-loop PID control algorithm.
It improves navigation accuracy and robustness in complex environments, enhances perception accuracy, environmental adaptability and real-time response capabilities, and optimizes real-time obstacle avoidance capabilities.
Smart Images

Figure CN121297848A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of autonomous navigation technology for unmanned aerial vehicles (UAVs), and in particular to a DBSCAN UAV path planning method based on depth estimation and optical flow analysis. Background Technology
[0002] In recent years, UAV navigation technology has made significant progress in fields such as aviation, remote sensing, emergency rescue, and precision agriculture. With the rapid development of computer vision, sensor fusion, and deep learning technologies, the DBSCAN UAV path planning method based on depth estimation and optical flow analysis has gradually become a research hotspot. Traditional UAV navigation mainly relies on the Global Positioning System (GPS) and Inertial Measurement Unit (INS) for positioning and path planning, combined with LiDAR or ultrasonic sensors to achieve obstacle detection and avoidance. With the breakthrough progress of deep learning models, especially VGG16, in image feature extraction, it has provided strong support for high-dimensional feature representation and multimodal information fusion. The development of image segmentation technology based on region growing and conditional random fields has enabled more accurate characterization of the connectivity and edge consistency of target regions. Optical flow analysis and DBSCAN for path recognition and classification in dynamic scenes have also provided new ideas for real-time obstacle avoidance and path planning for UAVs. Combined with mature mathematical tools such as Hough transform, spline interpolation, and differential flatness theory, UAVs can achieve smooth trajectory generation and control input mapping between the image plane and the three-dimensional Cattell coordinate system, further improving the accuracy and safety of navigation.
[0003] However, existing technologies still have shortcomings. Path clustering and trajectory modeling algorithms are not flexible enough in dealing with multiple path bifurcations or temporary obstacles. Path continuity and controllability are limited. Ignoring control strategies based on differential flatness theory leads to unstable control commands and poor navigation performance. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a DBSCAN UAV path planning method based on depth estimation and optical flow analysis, which solves the problems that path clustering and trajectory modeling algorithms are not flexible enough in response to multiple path bifurcations or temporary obstacles, and the path continuity and controllability are limited. Furthermore, ignoring the physical modeling control strategy based on differential flatness theory leads to unstable control commands and poor navigation execution.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides a DBSCAN UAV path planning method based on depth estimation and optical flow analysis, comprising, Collect UAV data, preprocess and construct a coordinate system, use the VGG16 model to extract depth features, perform Gamma transformation on the G component of the visible light image to obtain an enhanced grayscale image, initialize the seed group, use the region growing algorithm to obtain connected regions, and stack them horizontally to form segmented regions. Apply global Gaussian blur enhancement to the fused image to obtain the enhanced image. Conditional random fields are used to calculate the initial seed probability, the seed group is updated by optical flow analysis, and the depth features of infrared and visible light images are combined with VGG16 to extract and stitch them into multi-view features. The center feature vector of each path class is calculated, and the closest class is matched by Euclidean distance. Path clustering is performed using DBSCAN. Combining the new seed population and clustering results, the path label probability is optimized using a conditional random field. The Hough transform parameters and voting weights are calculated, and an initial path point set is obtained through screening. Continuous trajectories are obtained through spline interpolation. Key points are marked to form a path point set. Image plane control input is generated based on the differential flatness theory. Combined with filtered point cloud data, three-dimensional Cattell coordinates are obtained, and the optimized three-dimensional path point set is calculated. The A* algorithm is used to generate candidate obstacle avoidance paths. The path with the lowest cost is selected, and spline interpolation is used to generate the desired trajectory. The dual-loop PID controller is input to obtain the control output. Combined with the initial positioning, the path points are updated, and the PID controller is input again to generate control commands for execution.
[0007] As a preferred embodiment of the DBSCAN UAV path planning method based on depth estimation and optical flow analysis described in this invention, the step of applying global Gaussian blur enhancement to the fused image to obtain the enhanced image includes: Based on the fused image, feature extraction is performed using the VGG16 model to obtain depth features. Gamma is used to transform the G component in the visible light image to obtain an enhanced grayscale image. Region growing is performed using a region growing algorithm to obtain connected regions. These regions are then horizontally stacked to obtain segmented regions. Finally, the fused image is combined with global Gaussian blur for enhancement to obtain an enhanced image.
[0008] As a preferred embodiment of the DBSCAN UAV path planning method based on depth estimation and optical flow analysis described in this invention, the step of using DBSCAN for path clustering includes: Based on the enhanced image, the initial seed population probability is calculated using a conditional random field and updated using optical flow analysis to obtain a new seed population. Based on depth features, infrared images, and visible light images, VGG16 was used for feature extraction, which was then concatenated into multi-view depth features. The center feature vector of the initial path category was calculated, and the best matching category was obtained through the Euclidean distance formula. DBSCAN was used for clustering to obtain the path clustering results.
[0009] As a preferred embodiment of the DBSCAN UAV path planning method based on depth estimation and optical flow analysis described in this invention, wherein: the marking of key points to form a path point set includes: Based on the path clustering results, combined with a new seed group, conditional random fields are used for optimization. The Hough transform parameters are calculated with depth constraints, and the voting weights are calculated to generate an initial path point set. Continuous trajectories are obtained through spline interpolation, and key points are marked and spliced into a path point set.
[0010] As a preferred embodiment of the DBSCAN UAV path planning method based on depth estimation and optical flow analysis described in this invention, wherein: the generation of image plane control input based on differential flatness theory includes: Based on the path point set, the image plane control input is generated using the differential flatness theory. Combined with filtered point cloud data, it is converted into three-dimensional Cattell coordinates. The extended Kalman filter is then used for optimization to obtain three-dimensional path points, which are then stitched together to form a three-dimensional path point set.
[0011] As a preferred embodiment of the DBSCAN UAV path planning method based on depth estimation and optical flow analysis described in this invention, the step of updating path points and re-inputting PID control commands for execution includes: Based on the 3D path point set and combined with filtered point cloud data, the A* algorithm is used to generate candidate obstacle avoidance paths, calculate the path cost of each candidate obstacle avoidance path, obtain the initial path through screening, obtain the continuous trajectory through spline interpolation, set it as the desired trajectory, input it into a dual-loop PID controller, and obtain the control output. The path points are updated based on the initial positioning, and the dual-loop PID is re-inputted to obtain the updated control output; Update waypoints and update control outputs to the drone for mission execution.
[0012] As a preferred embodiment of the DBSCAN UAV path planning method based on depth estimation and optical flow analysis described in this invention, the step of collecting UAV data, preprocessing it, and constructing a coordinate system includes: Deploy infrared cameras, visible light cameras, lidar, IMU, and GPS for drones to collect drone data, including infrared images, visible light images, point cloud data, attitude data, drone initial position, and initial positioning.
[0013] Secondly, this invention provides a DBSCAN UAV path planning system based on depth estimation and optical flow analysis, comprising: The data collection and processing module is used to collect UAV data, perform preprocessing and construct a coordinate system, extract depth features using the VGG16 model, perform Gamma transformation on the G component of the visible light image to obtain an enhanced grayscale image, initialize the seed group, use the region growing algorithm to obtain connected regions, and stack them horizontally to form segmented regions. Global Gaussian blur enhancement is applied to the fused image to obtain the enhanced image. The fusion classification module is used to calculate the initial seed probability using conditional random fields, update the seed group through optical flow analysis, combine the depth features of infrared and visible light images, extract and stitch them into multi-view features using VGG16, calculate the center feature vector of each path class, match the closest class through Euclidean distance, and perform path clustering using DBSCAN. The modeling and reconstruction module is used to combine the new seed group and clustering results, optimize the path label probability using conditional random fields, calculate the Hough transform parameters and voting weights, obtain the initial path point set through screening, obtain the continuous trajectory through spline interpolation, mark key points to form the path point set, generate image plane control input based on differential flatness theory, and obtain three-dimensional Cattell coordinates by combining filtered point cloud data, and calculate the optimized three-dimensional path point set. The planning and execution module is used to generate candidate obstacle avoidance paths using the A* algorithm, select the path with the lowest cost, perform spline interpolation to generate the desired trajectory, input a dual-loop PID controller to obtain the control output, combine the initial positioning, update the path points, input the PID controller again to generate control commands, and execute them.
[0014] Thirdly, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, it implements any step of the DBSCAN UAV path planning method based on depth estimation and optical flow analysis as described in the first aspect of the present invention.
[0015] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the DBSCAN UAV path planning method based on depth estimation and optical flow analysis as described in the first aspect of the present invention.
[0016] The beneficial effects of this invention are as follows: This invention extracts image depth features through the VGG16 model, enhances and segments the image through Gamma transformation and region growing algorithms, optimizes the seed group through optical flow analysis and conditional random field algorithms, performs path clustering using the DBSCAN algorithm, plans obstacle avoidance paths through the A* algorithm, and combines it with a dual-loop PID control algorithm for execution; it improves navigation accuracy and robustness in complex environments, enhances perception accuracy, environmental adaptability, and real-time response capabilities, and optimizes real-time obstacle avoidance capabilities. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart of the DBSCAN UAV path planning method based on depth estimation and optical flow analysis in Example 1.
[0019] Figure 2 This is a schematic diagram of the DBSCAN UAV path planning system based on depth estimation and optical flow analysis in Example 1. Detailed Implementation
[0020] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0021] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0022] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0023] Example 1, referring to Figure 1 and Figure 2 This is the first embodiment of the present invention, which provides a DBSCAN UAV path planning method based on depth estimation and optical flow analysis, including the following steps: S1. Collect UAV data, preprocess and construct a coordinate system, extract depth features using the VGG16 model, perform Gamma transformation on the G component of the visible light image to obtain an enhanced grayscale image, initialize the seed group, use the region growing algorithm to obtain connected regions, and stack them horizontally to form segmented regions. Apply global Gaussian blur enhancement to the fused image to obtain the enhanced image. Specifically, the process involves collecting drone data, preprocessing it, and establishing a coordinate system, including: Deploy infrared cameras, visible light cameras, lidar, IMU, and GPS for the drone to collect drone data, including infrared images, visible light images, point cloud data, attitude data (angular velocity and acceleration), drone initial position (body coordinate system), and initial positioning. Based on infrared and visible light images, Gaussian filtering is used to denoise them respectively, and then weighted fusion is performed to obtain a fused image; Based on point cloud data, a stereo filter is used to filter the point cloud data to obtain filtered point cloud data. Based on the initial position of the UAV as the origin, local Catastrophe coordinates are constructed using filtered point cloud data and attitude data. These coordinates are then mapped to the global coordinate system (WGS84) using multiplication operations based on the initial positioning, as shown in the formula: , in, For local Catastrophe coordinates, Rotation matrix for IMU measurements. This is the translation vector measured by the lidar.
[0024] By deploying infrared cameras, visible light cameras, LiDAR, IMU, and GPS on the UAV, multimodal data including images, point clouds, attitude data, and localization is collected, effectively expanding the perception dimension and providing a complete information foundation for subsequent processing. Gaussian filtering is used to reduce noise in infrared and visible light images separately, followed by weighted fusion, which improves image contrast and detail. While preserving the thermal characteristics of infrared information, the texture information of visible light images is enhanced, thereby improving the detectability of targets in complex environments. Point cloud data is processed through stereo filtering to eliminate isolated noise points and preserve the structural information of terrain and obstacles, providing accurate data for spatial modeling. The construction of a local Catastrophe coordinate system combines LiDAR point cloud and IMU attitude data, achieving unified spatial alignment of UAV body data. By mapping the local coordinate system to the global WGS84 coordinate system, geographic reference alignment of data from different sensors is achieved, laying a unified spatial reference foundation for subsequent image enhancement and region segmentation.
[0025] Furthermore, a global Gaussian blur enhancement is applied to the fused image to obtain an enhanced image, including: Based on the fused image, the VGG16 model is used for feature extraction to obtain deep features; Based on depth features, the G component in the visible light image is transformed using Gamma to obtain the enhanced grayscale image, as shown in the formula: , , in, For the enhanced grayscale image, It is a local mean. For local standard deviation, For depth features, As weight, It is a small constant. For Gamma transformation parameters, For G component image; The local mean refers to the summation and averaging of all G components in a region centered on a pixel, such as a 5×5 window. The local standard deviation refers to the sum of squared deviations between the G components and the local mean, which is then averaged and squared. Based on the enhanced grayscale image, a seed group is initialized, and a region growing algorithm is used to grow regions to obtain connected regions. These regions are then horizontally stacked to obtain segmented regions, such as paths and fire sources. The formula is: , in, For the first The connected region in the next iteration. , , as well as These are the gray level, H value, depth feature, and S value of the seed point, respectively. , , as well as Grayscale H channel S-channel and the Euclidean distance between depth features The threshold is set based on rules of thumb. For the first An enhanced grayscale image of 1 pixel, For the first H channel values of each pixel in the HSV color space For the first The S-channel value of each pixel. For the first The depth features of each pixel in the enhanced grayscale image. For the first The Euclidean distance between the depth features of each pixel and the seed point is calculated using the Euclidean distance formula. The initialization seed group includes selecting pixels whose enhanced grayscale value is greater than the enhanced grayscale threshold and whose H and S channel values are both between the maximum and minimum H and S channel value thresholds, and setting them as initialization seeds; Based on the segmented regions, the fused image is enhanced using global Gaussian blur to obtain the enhanced image, as shown in the formula: , in, To enhance the image, To merge images, To fuzzy Gaussian kernel standard deviation, and These are the x and y coordinates of the pixels. It is a mathematical constant.
[0026] By using fused images for global Gaussian blur enhancement and introducing a VGG16 deep convolutional network to extract high-level semantic features, the system can capture complex nonlinear structures in images. Based on the extracted depth features, the brightness of the G channel of the visible light image is adjusted by combining Gamma transformation. Local mean and standard deviation are introduced to dynamically adjust the degree of Gamma transformation, thereby achieving adaptive contrast enhancement and edge prominence. This is particularly suitable for weak target recognition in complex backgrounds. The grayscale image enhancement strategy not only improves image quality but also enhances the accuracy of seed point selection in the region growing algorithm. In the region segmentation stage, the seed group is initialized and Euclidean distance of multi-dimensional features is used for region growing, which effectively improves the discrimination ability of connected regions. The expansion degree of the blur kernel is controlled by a Gaussian function, which suppresses high-frequency noise while maintaining the image structure edges, effectively improving the compatibility between deep features and traditional features.
[0027] S2. Initialize the seed probability using conditional random field, update the seed group through optical flow analysis, combine the depth features of infrared and visible light images, extract and stitch them into multi-view features using VGG16, calculate the center feature vector of each path class, match the closest class through Euclidean distance, and perform path clustering using DBSCAN. Specifically, DBSCAN is used for path clustering, including: Based on the enhanced image, the probability of initializing the seed population is calculated using a conditional random field, as follows: , in, To enhance the image The Middle Each pixel is a seed point. The probability, As the normalization factor, For a univariate potential function, based on the first The color and grayscale value of the nth pixel are calculated, representing the nth pixel. The probability of each pixel being a seed point For a binary potential function, based on the first The pixel and the The similarity of pixels in each domain is obtained. For the first A set of neighborhood pixels of 1 pixel; Based on the initial seed population probability, optical flow analysis is used to update the seed population, resulting in a new seed population. The formula is as follows: , , in, For optical flow vector, For the first Images fused together over time and Optical flow vectors of Components and Component, representing the first Pixels along shaft and The motion displacement of the shaft, For along and a tiny increment, For the integral element, For the first The probability threshold for each pixel is set based on a fixed threshold method. Optical flow vector The threshold; Based on depth features, infrared images, and visible light images, VGG16 is used for feature extraction, and the results are concatenated to form multi-view depth features. The center feature vector of the initial path category is calculated using the following formula: , in, For the first The class center feature vector of the class path, For the first Number of features in the class path For the first Multiple perspective depth features; The categories, such as fire source paths, obstacle boundaries, and escape routes, are set based on the mission scenario; Based on the central feature vector, the best-matching category is obtained using the Euclidean distance formula, which is: , , in, For multi-view depth features and category center feature vector Euclidean distance between them Index the path category that best matches. To select the first Category center feature vector of class path and the Multi-view depth features Minimum category of Euclidean distance; Based on the most matching category, DBSCAN is used for clustering to obtain path clustering results.
[0028] By fusing Conditional Random Fields (CRF), optical flow analysis, and multimodal feature extraction (including depth maps, infrared images, and visible light images), a refined path extraction mechanism was constructed. Utilizing enhanced image input, a seed swarm probability model was established using CRF. This model considers not only pixel color and grayscale information but also the similarity between neighboring pixels, effectively avoiding the sensitivity to image noise in traditional seed selection. Combined with optical flow analysis, the seed swarm is updated temporally to capture dynamic targets, ensuring temporal coherence and stability of path extraction in dynamic image sequences. This is further demonstrated through VG (Visual Generative Grammar) analysis. The G16 neural network learns features from infrared, visible light, and depth images and stitches them together into a unified multi-view depth feature, improving the discriminative power of the feature space and enhancing the system's robustness to different lighting conditions and occlusions. Based on the matching mechanism of class center vector and Euclidean distance, path category recognition has good interpretability and discriminative power. On the basis of the DBSCAN clustering algorithm, it realizes clustering modeling of path pixels, ensuring the integrity and continuity of path boundaries, and has adaptive density clustering capability, adapting to path target recognition tasks of different scales and densities.
[0029] S3. Combining the new seed group and clustering results, the path label probability is optimized using conditional random fields. The Hough transform parameters and voting weights are calculated. An initial path point set is obtained through screening. A continuous trajectory is obtained through spline interpolation. Key points are marked to form a path point set. Image plane control input is generated based on the differential flatness theory. Combined with filtered point cloud data, three-dimensional Cattell coordinates are obtained. The optimized three-dimensional path point set is calculated. Specifically, key points are marked to form a path point set, including: Based on the path clustering results and combined with the new seed population, a conditional random field is used for optimization, with the following formula: , in, Path label vector The probability distribution of represents that if the th is , then is a probability distribution of . If the path label of a given pixel represents a path, the value is 1; otherwise, it is 0. The pixel depth value is obtained based on LiDAR. For the first A label of 1 pixel, For the first Path clustering results for pixels; Based on the optimized path probabilities, the Hough transform parameters are calculated in conjunction with depth constraints, and the voting weights are calculated using the following formula: , , in, Let be the distance from a straight line in Hough space to the origin. For straight lines and Angle between axes cosine value, For straight lines and Angle between axes The sine value, For voting weight, For the first The depth value of each pixel is obtained based on LiDAR. For path reference depth, The depth standard deviation; Based on the Hough transform parameters set as path line segment parameters, the voting weights are selected to be greater than the voting weight threshold, and the initial path point set is generated by splicing them together. Based on the initial path point set, a continuous trajectory is obtained through spline interpolation, and key points, such as path inflection points or high-probability points, are marked and concatenated to form a path point set. The formula is as follows: , in, For the set of path points, Initial path point The curvature is calculated based on the second derivative. For the initial set of path points, For curvature threshold, The probability threshold is set based on experimental experience.
[0030] By employing techniques such as Conditional Random Fields (CRF), Hough Transform, and spline interpolation, a complete path construction mechanism mapping from image space to 3D physical space is constructed. By optimizing path label probabilities, a refined path annotation model is established, laying the foundation for subsequent path point extraction. The introduction of Hough Transform provides excellent linear structure detection capabilities, particularly suitable for extracting straight path features in images, effectively avoiding the problem of pseudo-paths easily generated by simply relying on pixel voting. By setting a threshold for voting weights, only path segments with significant structures are retained, and an initial path point set is constructed to ensure the geometric consistency of the proposed path in space. Spline interpolation technology generates continuous trajectories, which not only improves the smoothness of the path but also provides differentiable structures for the generation of control inputs. The introduction of a key point marking mechanism based on curvature thresholds can effectively detect inflection points and abrupt changes in the path, which is beneficial for speed adjustment and navigation strategy optimization in path planning.
[0031] Furthermore, image plane control inputs are generated based on the differential flatness theory, including: Based on the path point set, the image plane control input is generated using the differential flatness theory, with the following formula: , in, For image plane control input, and For the first Time is shaft and axial control input, and for shaft and The difference flatness mapping function of the axis, and For the path point set in shaft and The direction of the axis, and For path points in shaft and The speed of the shaft, and For path points in shaft and The acceleration of the shaft, , as well as The weights are for position, velocity, and acceleration, respectively. For the first The drone's altitude over time Vertical velocity, For drone altitude vertical acceleration, For the first Time drone altitude The difference flatness mapping function; Based on the image plane control input, combined with filtered point cloud data, it is converted into three-dimensional Cattell coordinates, as shown in the formula: , in, In three-dimensional Catastrophe coordinates, For the camera intrinsic parameter matrix, The inverse matrix is represented by the Zhang Zhengyou calibration method. For target depth, The transformation matrix from the camera to the UAV body coordinate system includes rotation and translation components, set based on calibration experiments; Based on 3D Cattell coordinates, an extended Kalman filter is used for optimization to obtain 3D path points, which are then concatenated into a 3D path point set, as shown in the formula: , in, For three-dimensional path points, For the first The time-varying drone state vector includes the drone's position and velocity. The state transition matrix is obtained based on Kalman filter state prediction. The control input matrix is obtained based on the UAV parameters. For the first The time-related process noise was obtained based on Allan analysis of variance. For the first The time observation vector represents the initial positioning and three-dimensional Katz coordinates. For the observation matrix, For the first The observation noise over time is obtained based on GPS.
[0032] By introducing a weighted function of position, velocity, and acceleration, the response speed and stability can be dynamically adjusted according to mission requirements. This multi-objective weighted model makes the control commands more flexible and adaptable. The control framework established using differential flatness theory can adapt to different mission scenarios and flight platforms, and has good scalability and module reusability. Through the bridging formula between image plane control input and 3D point cloud transformation, a mapping relationship between vision and geometry is constructed. A reversible transformation mechanism is established between the image control domain and the spatial geometry domain, ensuring the accuracy of 3D spatial estimation and providing reliable raw data for point cloud filtering and path extraction.
[0033] S4. Use the A* algorithm to generate candidate obstacle avoidance paths, select the path with the lowest cost, perform spline interpolation to generate the desired trajectory, input the dual-loop PID to obtain the control output, combine with the initial positioning, update the path points, input the PID again to generate control commands, and execute them. Specifically, update the path points and re-enter the PID to generate control commands, then execute them, including: Based on a 3D path point set and filtered point cloud data, the A* algorithm is used to generate candidate obstacle avoidance paths. This includes defining 3D path points as the starting point and the target location as the ending point, such as the center of a fire source or a task execution point. The path cost of each candidate obstacle avoidance path is calculated, sorted in ascending order, and the minimum cost is selected as the initial path. The formula is as follows: , in, The total cost of the path. From the starting point to the current node The actual path cost is represented by the sum of the Euclidean distances from the starting point to the current node. From the starting point to the current node The estimated path cost is represented by the square root of the sum of the distances between the current node and the target point. Heuristic weights; The initial 3D path point set is interpolated using splines to obtain a continuous trajectory, which is then set as the desired trajectory. This trajectory is input into a dual-loop PID controller to obtain the control output, including UAV speed or attitude adjustment. The formula is as follows: , in, For the first Time control output, , as well as These are proportional gain, integral gain, and derivative gain, respectively. For the first The trajectory deviation over time is the difference between the expected position (obtained based on the path point set) and the actual position. For integration variables, For differentiation operations; The path points are updated based on the initial positioning. The dual-loop PID controller is then re-inputted to obtain the updated control output, as shown in the formula: , in, To update the path points, This is the set of all candidate path points in the RRT algorithm. The path cost function represents the calculation of the Euclidean distance between locations. This is the current location of the drone. For the target location of the drone, These are candidate path points, obtained through random sampling; Update waypoints and update control outputs to the drone for mission execution.
[0034] By introducing heuristic functions and Euclidean distance evaluation mechanisms through the A* algorithm, path search not only considers global optima but also computational efficiency. The introduction of heuristic weights in the path cost function can be dynamically adjusted according to the environment, effectively avoiding local optima traps. Using three-dimensional spline functions to smoothly interpolate the initial path point set not only improves the continuity of the trajectory but also significantly reduces the impact of sudden changes in steering angle on controller stability. Through a dual-loop PID control strategy, control commands are corrected under position and velocity error feedback, enabling the aircraft to respond quickly to path deviations, external disturbances, and sensor errors. In the final control command issuance stage, real-time updates of path points and rapid response of control outputs ensure the stability of UAV mission execution in sudden environments.
[0035] This embodiment also provides a DBSCAN UAV path planning system based on depth estimation and optical flow analysis, including: The data collection and processing module is used to collect UAV data, perform preprocessing and construct a coordinate system, extract depth features using the VGG16 model, perform Gamma transformation on the G component of the visible light image to obtain an enhanced grayscale image, initialize the seed group, use the region growing algorithm to obtain connected regions, and stack them horizontally to form segmented regions. Global Gaussian blur enhancement is applied to the fused image to obtain the enhanced image. The fusion classification module is used to calculate the initial seed probability using conditional random fields, update the seed group through optical flow analysis, combine the depth features of infrared and visible light images, extract and stitch them into multi-view features using VGG16, calculate the center feature vector of each path class, match the closest class through Euclidean distance, and perform path clustering using DBSCAN. The modeling and reconstruction module is used to combine the new seed group and clustering results, optimize the path label probability using conditional random fields, calculate the Hough transform parameters and voting weights, obtain the initial path point set through screening, obtain the continuous trajectory through spline interpolation, mark key points to form the path point set, generate image plane control input based on differential flatness theory, and obtain three-dimensional Cattell coordinates by combining filtered point cloud data, and calculate the optimized three-dimensional path point set. The planning and execution module is used to generate candidate obstacle avoidance paths using the A* algorithm, select the path with the lowest cost, perform spline interpolation to generate the desired trajectory, input a dual-loop PID controller to obtain the control output, combine the initial positioning, update the path points, input the PID controller again to generate control commands, and execute them.
[0036] This embodiment also provides a computer device applicable to the DBSCAN UAV path planning method based on depth estimation and optical flow analysis, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the DBSCAN UAV path planning method based on depth estimation and optical flow analysis as proposed in the above embodiment.
[0037] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0038] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the DBSCAN UAV path planning method based on depth estimation and optical flow analysis as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0039] In summary, this invention extracts image depth features using the VGG16 model, enhances and segments the image using Gamma transformation and region growing algorithms, optimizes the seed group using optical flow analysis and conditional random field algorithms, performs path clustering using the DBSCAN algorithm, plans obstacle avoidance paths using the A* algorithm, and executes the process using a dual-loop PID control algorithm. This improves navigation accuracy and robustness in complex environments, enhances perception accuracy, environmental adaptability, and real-time response capabilities, and optimizes real-time obstacle avoidance capabilities.
[0040] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A DBSCAN UAV path planning method based on depth estimation and optical flow analysis, characterized in that: include, Collect UAV data, preprocess and construct a coordinate system, use the VGG16 model to extract depth features, perform Gamma transformation on the G component of the visible light image to obtain an enhanced grayscale image, initialize the seed group, use the region growing algorithm to obtain connected regions, and stack them horizontally to form segmented regions. Apply global Gaussian blur enhancement to the fused image to obtain the enhanced image. Conditional random fields are used to calculate the initial seed probability, the seed group is updated by optical flow analysis, and the depth features of infrared and visible light images are combined with VGG16 to extract and stitch them into multi-view features. The center feature vector of each path class is calculated, and the closest class is matched by Euclidean distance. Path clustering is performed using DBSCAN. Combining the new seed population and clustering results, the path label probability is optimized using a conditional random field. The Hough transform parameters and voting weights are calculated, and an initial path point set is obtained through screening. Continuous trajectories are obtained through spline interpolation. Key points are marked to form a path point set. Image plane control input is generated based on the differential flatness theory. Combined with filtered point cloud data, three-dimensional Cattell coordinates are obtained, and the optimized three-dimensional path point set is calculated. The A* algorithm is used to generate candidate obstacle avoidance paths. The path with the lowest cost is selected, and spline interpolation is used to generate the desired trajectory. The dual-loop PID controller is input to obtain the control output. Combined with the initial positioning, the path points are updated, and the PID controller is input again to generate control commands for execution.
2. The DBSCAN UAV path planning method based on depth estimation and optical flow analysis as described in claim 1, characterized in that: The process of applying global Gaussian blur enhancement to the fused image to obtain an enhanced image includes: Based on the fused image, feature extraction is performed using the VGG16 model to obtain depth features. Gamma is used to transform the G component in the visible light image to obtain an enhanced grayscale image. Region growing is performed using a region growing algorithm to obtain connected regions. These regions are then horizontally stacked to obtain segmented regions. Finally, the fused image is combined with global Gaussian blur for enhancement to obtain an enhanced image.
3. The DBSCAN UAV path planning method based on depth estimation and optical flow analysis as described in claim 2, characterized in that: The use of DBSCAN for path clustering includes: Based on the enhanced image, the initial seed population probability is calculated using a conditional random field and updated using optical flow analysis to obtain a new seed population. Based on depth features, infrared images, and visible light images, VGG16 was used for feature extraction, which was then concatenated into multi-view depth features. The center feature vector of the initial path category was calculated, and the best matching category was obtained through the Euclidean distance formula. DBSCAN was used for clustering to obtain the path clustering results.
4. The DBSCAN UAV path planning method based on depth estimation and optical flow analysis as described in claim 3, characterized in that: The marked key points form a path point set, including: Based on the path clustering results, combined with a new seed group, conditional random fields are used for optimization. The Hough transform parameters are calculated with depth constraints, and the voting weights are calculated to generate an initial path point set. Continuous trajectories are obtained through spline interpolation, and key points are marked and spliced into a path point set.
5. The DBSCAN UAV path planning method based on depth estimation and optical flow analysis as described in claim 4, characterized in that: The image plane control input generated based on the differential flatness theory includes: Based on the path point set, the image plane control input is generated using the differential flatness theory. Combined with filtered point cloud data, it is converted into three-dimensional Cattell coordinates. The extended Kalman filter is then used for optimization to obtain three-dimensional path points, which are then stitched together to form a three-dimensional path point set.
6. The DBSCAN UAV path planning method based on depth estimation and optical flow analysis as described in claim 5, characterized in that: The process of updating the path point and re-entering the PID to generate control commands for execution includes: Based on the 3D path point set and combined with filtered point cloud data, the A* algorithm is used to generate candidate obstacle avoidance paths, calculate the path cost of each candidate obstacle avoidance path, obtain the initial path through screening, obtain the continuous trajectory through spline interpolation, set it as the desired trajectory, input it into a dual-loop PID controller, and obtain the control output. The path points are updated based on the initial positioning, and the dual-loop PID is re-inputted to obtain the updated control output; Update waypoints and update control outputs to the drone for mission execution.
7. The DBSCAN UAV path planning method based on depth estimation and optical flow analysis as described in claim 6, characterized in that: The process of collecting UAV data, preprocessing it, and constructing a coordinate system includes: Deploy infrared cameras, visible light cameras, lidar, IMU, and GPS for drones to collect drone data, including infrared images, visible light images, point cloud data, attitude data, drone initial position, and initial positioning.
8. A DBSCAN UAV path planning system based on depth estimation and optical flow analysis, based on the DBSCAN UAV path planning method based on depth estimation and optical flow analysis as described in any one of claims 1 to 7, characterized in that: include, The data collection and processing module is used to collect UAV data, perform preprocessing and construct a coordinate system, extract depth features using the VGG16 model, perform Gamma transformation on the G component of the visible light image to obtain an enhanced grayscale image, initialize the seed group, use the region growing algorithm to obtain connected regions, and stack them horizontally to form segmented regions. Global Gaussian blur enhancement is applied to the fused image to obtain the enhanced image. The fusion classification module is used to calculate the initial seed probability using conditional random fields, update the seed group through optical flow analysis, combine the depth features of infrared and visible light images, extract and stitch them into multi-view features using VGG16, calculate the center feature vector of each path class, match the closest class through Euclidean distance, and perform path clustering using DBSCAN. The modeling and reconstruction module is used to combine the new seed group and clustering results, optimize the path label probability using conditional random fields, calculate the Hough transform parameters and voting weights, obtain the initial path point set through screening, obtain the continuous trajectory through spline interpolation, mark key points to form the path point set, generate image plane control input based on differential flatness theory, and obtain three-dimensional Cattell coordinates by combining filtered point cloud data, and calculate the optimized three-dimensional path point set. The planning and execution module is used to generate candidate obstacle avoidance paths using the A* algorithm, select the path with the lowest cost, perform spline interpolation to generate the desired trajectory, input a dual-loop PID controller to obtain the control output, combine the initial positioning, update the path points, input the PID controller again to generate control commands, and execute them.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the DBSCAN UAV path planning method based on depth estimation and optical flow analysis as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the DBSCAN UAV path planning method based on depth estimation and optical flow analysis as described in any one of claims 1 to 7.
Citation Information
Cited By
Intelligent track planning method for cruise section of reusable vehicle
CN121635429A