A method for calculating the altitude of a UAV based on target recognition and navigation equipment
By taking high-resolution aerial photos with drones and using deep learning algorithms to identify targets, and combining them with inertial combined navigation equipment to calculate altitude, the problem of poor adaptability of drone altitude calculation environments is solved, and a low-cost altitude calculation method is achieved.
Patent Information
- Application Number
- CN202211676662.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-26
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2042-12-26
AI Technical Summary
Existing drone altitude calculation methods rely on inertial integrated navigation, barometers and ranging equipment, which have poor environmental adaptability, high costs, and limited accuracy in complex environments.
A method based on target recognition and inertial combined navigation is adopted. High-resolution aerial images are taken by drones, deep learning algorithms are used to identify targets and calculate pixel distances. The height difference is obtained by combining inertial combined navigation equipment to calculate the height of the drone.
Without relying on ranging equipment, the accurate calculation of the UAV's altitude in complex environments is achieved. It is suitable for military and civilian fields and is low-cost.
Smart Images

Figure CN116086398B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of target recognition and unmanned aerial vehicle (UAV) self-positioning, and in particular relates to a method for calculating the altitude of an UAV based on target recognition and navigation equipment. Background Art
[0002] Due to their flexibility, portability, and powerful capabilities, drones are used in a variety of military and civilian applications, including reconnaissance and strike missions. Flight altitude is a crucial parameter during drone flight, impacting flight safety and ground control accuracy.
[0003] Calculating drone altitude typically relies on inertial navigation systems (IRUs), barometers, photometric rangefinders, and radar. While IRUs can provide GPS position information, barometers provide altitude, not the ground altitude typically required for flight missions. The accuracy of laser rangefinders relies on the intensity of the reflected laser light, which is affected by various factors, such as the surface color and lighting conditions of the object being measured. This significantly limits their usability. Therefore, a method for calculating drone altitude that is independent of rangefinders, has greater environmental adaptability, and is applicable to a wider range of applications is needed. Summary of the Invention
[0004] The purpose of the present invention is to solve the above technical problems and propose a low-cost method for calculating the altitude of a drone that is suitable for various complex environments, has strong adaptability to light changes, does not require ranging equipment, and is low-cost.
[0005] In order to achieve the above object, the present invention provides the following method:
[0006] A method for calculating the altitude of a drone based on target recognition and navigation equipment includes the following steps:
[0007] The drone obtains high-resolution aerial photos of the target area at the first and second positions. The field of view angle of the onboard camera is θ, and the pitch angle maintains an orthophoto of the ground in the target area. The orthophoto of the target area is taken:
[0008] The resolution of the high-resolution aerial image is H×W;
[0009] Read the high-resolution aerial image set, and input the ground orthophoto aerial images taken consecutively at the first and second positions into the deep learning target recognition algorithm. The algorithm can quickly identify the target type and mark the target with a rectangular box;
[0010] The coordinates of the center point of the rectangular box of the identified target in the first aerial image are calculated based on the coordinates of the four vertices of the rectangular box. Then, the pixel distance (x1, y1) from the center point of the identified target rectangular box to the center point of the first aerial image can be calculated. Similarly, the pixel distance (x2, y2) from the center point of the target rectangular box in the second aerial image to the center point of the second aerial image can be calculated.
[0011] Calculate the spatial resolution of the first aerial image and the second aerial image respectively;
[0012] Calculate the heights h1 and h2 of the first and second positions.
[0013] Furthermore, the first position and the second position have the same latitude and longitude coordinates (ensuring that the horizontal distances between the drone and the target at these two positions are equal), but have different heights relative to the ground in the area where the target is located.
[0014] Furthermore, the pixel distance is calculated based on the target recognition result of the aerial image, and the specific process is as follows:
[0015] The coordinates of the center point of the rectangular box of the identified target in the aerial image are calculated based on the coordinates of the four vertices of the rectangular box. The coordinate system of the coordinates of the center point of the rectangular box is consistent with the coordinate system of the aerial image, and the coordinates of the center point of the aerial image correspond to the resolution. Then, the pixel distance from the center point of the identified target rectangular box to the center point of the aerial image is calculated by subtracting the coordinates of the center point of the aerial image from the coordinates of the center point of the target rectangular box.
[0016] Furthermore, the spatial resolutions of the first aerial image and the second aerial image are calculated separately, specifically including
[0017] The equation for spatial resolution and height is as follows:
[0018]
[0019] In the formula, the specific value of h is the height h1 and h2 of the first position and the second position, which are unknown quantities to be determined; the specific value of p is the spatial resolution p1 and p2 of the first aerial image and the second aerial image, that is, p1 and p2 can be represented by h1 and h2 respectively.
[0020] Furthermore, the method of solving the heights h1 and h2 of the first position and the second position specifically includes:
[0021] Since the latitude and longitude coordinates (GPS coordinates) of the first and second positions are the same, the horizontal distances from the target are the same. The horizontal distance is obtained by multiplying the spatial resolution of the aerial image by the pixel distance, resulting in the following linear equation:
[0022]
[0023] Define △h = h1-h2, and solve the above equation to find the heights h1 and h2 of the first and second positions.
[0024] Specifically, the first position and the second position have the same latitude and longitude coordinates and the same horizontal distance from the target. The latitude and longitude coordinates are obtained by an inertial navigation device installed on the UAV, and △h is also obtained by integrating the vertical acceleration measured by the inertial navigation device.
[0025] Specifically, the deep learning target recognition algorithm includes the yolov3-v6 series target recognition algorithm, preferably yolov5.
[0026] The present invention also provides a computer-readable storage medium, characterized in that the computer-readable storage medium includes a stored program, wherein the program executes the above-mentioned drone altitude calculation method based on target recognition and inertial group when running.
[0027] The present invention also provides an electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the above-mentioned drone altitude calculation method based on target recognition and inertial group through the computer program.
[0028] Compared with the prior art, the above technical solution conceived by the present invention can achieve the following beneficial effects:
[0029] (1) The present invention can realize the altitude calculation of the UAV during flight without the need for a common distance measuring device;
[0030] (2) Compared with the existing UAV flight altitude calculation method, the present invention is simpler in theory and has low cost. It only needs to use the target recognition algorithm to identify the target in the image information taken by the UAV and integrate the altitude displacement through the inertial group.
[0031] (3) The present invention is applicable to various complex scenes and is applicable to both military and civilian fields when the captured images meet the recognition conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a flow chart of a preferred embodiment of the method for calculating the altitude of a UAV based on target recognition and inertial group according to the present invention;
[0033] Figure 2 This is a schematic diagram of the UAV flight process;
[0034] Figure 3a This is a schematic diagram of determining the center point of the first aerial image and the center point of the first target rectangular frame in the first aerial image from the first aerial image; a is the first target rectangular frame, c1 is the center point of the first aerial image, and d1 is the center point of the first target rectangular frame;
[0035] Figure 3b Schematic diagram of determining the center point of the second aerial image from the second aerial image; b is the second target rectangular frame, c2 is the center point of the second aerial image, and d2 is the center point of the second target rectangular frame;
[0036] Figure 4 It is a schematic diagram of the pixel distance between the center point of the aerial image and the center point of the target rectangle in the aerial image.
[0037] Among them, position 1 is the first position, and position 2 is the second position. DETAILED DESCRIPTION
[0038] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0039] The present invention will be described in further detail below in conjunction with the accompanying drawings and specific embodiments. The following examples are merely illustrative and do not constitute a limitation of the present invention.
[0040] like Figure 1 As shown, the present invention provides a method for calculating the altitude of a UAV based on target recognition and inertial group, comprising the following steps:
[0041] In step 1, according to the flight mission requirements, the drone flies in an area near a reconnaissance or strike target, continuously capturing high-resolution aerial images of the ground during flight. Typically, these images are taken continuously, with the time and GPS coordinates recorded for each image. Two images with identical GPS coordinates are then selected from the images to calculate the drone's altitude according to the method of the present invention.
[0042] In step 1, the resolution of the high-resolution aerial images of the target area continuously taken by the drone is H×W; the field of view angle of the onboard camera is θ, and the pitch angle is kept orthogonal to the ground, and the orthogonal image of the target area is taken.
[0043] In step 1, the UAV flies in a spiral descent with the target as the center; during the spiral descent, the UAV passes through a first position and a second position with the same GPS coordinates but different altitudes under the guidance of the GPS system of the inertial navigation device, ensuring that the horizontal distance between the UAV and the target at these two points is equal; for a rotor UAV that can take off and land vertically, vertical descent is sufficient; the descent distance is Δh, which can be obtained by integrating the inertial navigation device; as another example, the same Beidou navigation coordinates can be used for the Beidou navigation system.
[0044] In step 1, the GPS coordinates of the first position and the second position are the same, and the horizontal distances from the target are the same;
[0045] In step 1, the drone's onboard camera captures a first aerial image and a second aerial image of the ground containing the target at a first position and a second position, respectively;
[0046] The resolution of high-resolution aerial images is H×W.
[0047] Step 2: read the high-resolution aerial image group taken, input the first ground orthophoto aerial image taken at the first position into the YOLOv5 target recognition algorithm, and the algorithm can quickly identify the target type and mark the target with the first target rectangular frame, as shown in the figure; similarly, input the second ground orthophoto aerial image taken at the second position into the YOLOv5 target recognition algorithm, and the algorithm can quickly identify the target type and mark the target with the second target rectangular frame; wherein, the target type to be identified depends on the target type trained by the deep learning algorithm. In a certain scenario, if only people and vehicles need to be identified, only people and vehicle targets are trained. The training targets can be added or changed as needed so that the algorithm can identify the targets to be identified. As another example, it can be a YOLOv3, YOLOv4, or YOLOv6 target recognition algorithm.
[0048] Step 3: Calculate the coordinates of the center point of the first rectangular box according to the coordinates of the four vertices of the rectangular box that identifies the first target in the first aerial image, and then calculate the pixel distance (x1, y1) from the center point d1 of the rectangular box that identifies the first target to the center point c1 of the first aerial image, as shown in the following example: Figure 3a Similarly, the pixel distance (x2, y2) from the center point d2 of the second target rectangular frame in the second aerial image to the center point c2 of the second aerial image can be calculated, as shown in FIG. Figure 3b As shown;
[0049] The coordinates of the center point c1 or c2 of the first or second aerial image correspond to the image's resolution. Specifically, if the image's resolution is H*W, the coordinates of the center point are (H / 2, W / 2). The resolution H*W refers to the number of pixels in the image's height and width. The rectangular coordinate system of the first or second aerial image is defined with the image's upper-left corner as the origin, O, the horizontal axis as the Y-axis, and the vertical axis as the X-axis.
[0050] The coordinates of the center point of the first target rectangular box are calculated based on the coordinates of the four vertices of the rectangular box identifying the first target in the first aerial image. Then, the pixel distance (x1, y1) between the center point of the first target rectangular box and the center point of the first aerial image can be calculated. Similarly, the pixel distance (x2, y2) between the center point of the second target rectangular box and the center point of the second aerial image can be calculated.
[0051] The coordinate system of the coordinates of the center point of the first or second target rectangular frame is consistent with the coordinate system of the first or second aerial image.
[0052] If the coordinates of the center point of the aerial image are (MIDx, MIDy), and the resolution of the aerial image is H*W, the coordinates of the center point are (MIDx=H / 2, MIDy=W / 2). Specifically, if in the first aerial image, the coordinates of the center point of the aerial image are (MIDx1, MIDy1), and the coordinates of the center point of the target rectangle are (TARx1, TARy1), the difference between the horizontal and vertical coordinates of the two points is subtracted from the coordinates of the center point of the aerial image and the center point of the target rectangle, which is (MIDx1-TARx1, MIDy1-TARy1). This is the pixel distance (x1, y1) from the center point of the identified target rectangle to the center point of the first aerial image described in step 3. If in the second aerial photo, the coordinates of the center point of the aerial photo are (MIDx2, MIDy2), and the coordinates of the center point of the target rectangular box are (TARx2, TARy2), the coordinates of the center point of the aerial photo are subtracted from the coordinates of the center point of the target rectangular box to obtain the horizontal and vertical coordinate difference between the two points (MIDx2-TARx2, MIDy2-TARy2), which is the pixel distance (x2, y2) from the center point of the identified target rectangular box to the center point of the first aerial photo described in step 3.
[0053] Step 4: Calculate the spatial resolutions of the first aerial image and the second aerial image respectively. Spatial resolution refers to the length in reality corresponding to one pixel in the aerial image.
[0054] The equation for spatial resolution and height is as follows:
[0055]
[0056] In the formula, h is the height h1 and h2 of the first and second positions, which are unknown quantities to be determined. Correspondingly, p is the spatial resolution p1 and p2 of the first and second aerial images. That is, p1 and p2 can be represented by h1 and h2, respectively. The heights h1 and h2 are relative to the plane where the target (object) is located.
[0057] In step 5, since the GPS coordinates of the first and second locations are the same, the horizontal distances to the target are the same. The horizontal distance can be obtained by multiplying the spatial resolution of the aerial image by the pixel distance, resulting in the following linear equation:
[0058]
[0059] definition △ h=h1-h2. Solving the above equation, we can find the heights h1 and h2 of the first and second positions.
[0060] The first position and the second position have the same latitude and longitude coordinates and the same horizontal distance from the target. The latitude and longitude coordinates are obtained by the inertial navigation device set on the UAV, specifically GPS coordinates or Beidou navigation coordinates. △h is also obtained by integrating the vertical acceleration measured by the inertial navigation device.
[0061] In detail, the pixel distance in this method is the straight-line distance between two pixel points on the aerial image, such as Figure 4 As shown in , the pixel distance can be calculated by the square root of the sum of the squares of the differences between the horizontal and vertical coordinates of two pixel points.
[0062] This embodiment also provides a computer-readable storage medium, which includes a stored program, wherein when the program is run, the above-mentioned drone altitude calculation method based on target recognition and inertial group is executed.
[0063] This embodiment also provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the above-mentioned drone altitude calculation method based on target recognition and inertial group through the computer program.
Claims
1. A method for calculating the altitude of a drone based on target recognition and navigation equipment, characterized in that The steps include: The drone obtains high-resolution aerial photos of the target area at the first and second positions. The field of view angle of the onboard camera is θ, and the pitch angle maintains an orthophoto of the ground in the target area. The orthophoto of the target area is taken: The resolution of the high-resolution aerial image is H×W; Read the high-resolution aerial image set, and input the ground orthophoto aerial images taken consecutively at the first and second positions into the deep learning target recognition algorithm. The algorithm can quickly identify the target type and mark the target with a rectangular box; The coordinates of the center point of the first target rectangular box are calculated based on the coordinates of the four vertices of the rectangular box identifying the first target in the first aerial image, and the pixel distance (x1, y1) between the center point of the first target rectangular box and the center point of the first aerial image can be calculated; Similarly, calculate the pixel distance (x2, y2) from the center point of the second target rectangular box in the second aerial image to the center point of the second aerial image; Calculate the spatial resolution of the first aerial image and the second aerial image respectively; Calculate the heights h1 and h2 of the first and second positions; The first position and the second position have the same latitude and longitude coordinates, but different heights relative to the ground in the target area.
2. The method for calculating the altitude of a drone based on target recognition and navigation equipment according to claim 1, characterized in that The pixel distance is calculated based on the target recognition results of the aerial image. The specific process is as follows: The coordinates of the center point of the rectangular box of the identified target in the aerial image are calculated based on the coordinates of the four vertices of the rectangular box. The coordinate system of the coordinates of the center point of the rectangular box is consistent with the coordinate system of the aerial image, and the coordinates of the center point of the aerial image correspond to the resolution. Then, the pixel distance from the center point of the identified target rectangular box to the center point of the aerial image is calculated by subtracting the coordinates of the center point of the aerial image from the coordinates of the center point of the target rectangular box.
3. The method for calculating the altitude of a drone based on target recognition and navigation equipment according to claim 2 is characterized in that The spatial resolution of the first aerial image and the second aerial image is calculated separately, specifically including The equation for spatial resolution and height is as follows: In the formula, the specific value of h is the height h1 and h2 of the first position and the second position, which are unknown quantities to be determined; the specific value of p is the spatial resolution p1 and p2 of the first aerial image and the second aerial image, that is, p1 and p2 can be represented by h1 and h2 respectively.
4. The method for calculating the altitude of a drone based on target recognition and navigation equipment according to claim 3 is characterized in that The method of solving the heights h1 and h2 of the first position and the second position specifically includes: Since the first and second positions have the same latitude and longitude coordinates and the same horizontal distance from the target, the horizontal distance is obtained by multiplying the spatial resolution of the aerial image by the pixel distance, resulting in the following linear equation: definition △ h=h1-h2. Solving the above equation, we can find the heights h1 and h2 of the first and second positions.
5. The method for calculating the altitude of a drone based on target recognition and navigation equipment according to claim 4 is characterized in that The first position and the second position have the same longitude and latitude coordinates and the same horizontal distance from the target, and the longitude and latitude coordinates are obtained by an inertial navigation device set on the UAV. △ h is also obtained by integrating the vertical acceleration measured by the inertial group.
6. The method for calculating the altitude of a drone based on target recognition and navigation equipment according to claim 1, characterized in that The deep learning target recognition algorithm includes the yolov3-v6 series target recognition algorithm.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is run, the method for calculating the altitude of a drone based on target recognition and navigation equipment as described in any one of claims 1 to 6 is executed.
8. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method for calculating the altitude of a drone based on a target recognition and navigation device as described in any one of claims 1 to 6 through the computer program.
Citation Information
Patent Citations
Real-time speed measuring method and system for unmanned aerial vehicle
CN105807083A
Aerial photography data target positioning method and system based on deep learning
CN114004977A