Unmanned aerial vehicle positioning method and device, electronic equipment and storage medium
The drone camera takes images of laser marking points, combines the camera external parameters and laser marking points position, and calculates the drone position, solving the problem that the drone is difficult to determine when the GPS signal is missing, and accurate drone positioning and safe operation are achieved.
Patent Information
- Application Number
- CN202510246861.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-06-20
AI Technical Summary
In the absence of positioning signals such as GPS, it is difficult to determine the specific location of the drone, resulting in possible collisions or damage.
By taking a target image containing at least three laser marking points by a camera mounted on the drone, determining the external parameters of the target camera and the target image position, and computing the position of the drone in combination with the target laser marking points.
It realizes accurate determination of the drone's location without GPS and other positioning signals, ensuring the safety of the drone's operation.
Smart Images

Figure CN120182372A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of positioning, and particularly to a method, device, electronic device and storage medium for positioning an unmanned aerial vehicle (UAV). Background Art
[0002] In modern UAV technology, positioning and navigation are key functions. Especially in environments where GNSS signals are limited or unavailable, traditional UAV positioning mainly relies on the Global Navigation Satellite System (GNSS). However, in some environments, such as urban canyons, forest cover, or high-altitude indoor environments, GNSS signals may be interfered with or completely unavailable. Therefore, a method is needed to determine the specific position of the UAV even in the absence of positioning signals. Summary of the Invention
[0003] The present invention provides a method, device, electronic device and storage medium for positioning an unmanned aerial vehicle, so as to solve the problem of difficulty in determining the orientation of the UAV in the absence of positioning signals such as GPS.
[0004] According to one aspect of the present invention, a method for positioning an unmanned aerial vehicle is provided. The method includes:
[0005] Determine a target image; the target image is an image containing at least three laser marking points, the target image is obtained by shooting with a camera installed on the UAV, among the three laser marking points in the target image, there are three laser marking points as target laser marking points, the target laser marking points can form a triangle in the target image with the laser marking points as vertices, the laser marking points are emitted by a laser emitting device pre-installed at a fixed position, the laser emitting device emits divergent laser, and the divergence distance of the divergent laser is greater than a preset distance;
[0006] Determine the target camera extrinsic parameters, where the target camera extrinsic parameters are the camera extrinsic parameters when the UAV camera shoots the target image;
[0007] According to the target image, determine the target image position, where the target image position is the position of each target laser marking point in the target image;
[0008] According to the target image position, the target camera extrinsic parameters, and the target laser marking point position, determine the UAV position.
[0009] According to another aspect of the present invention, a device for positioning an unmanned aerial vehicle is provided. The device includes:
[0010] An image confirmation module for determining a target image; the target image is an image containing at least three laser marking points, the target image is obtained by shooting with a camera installed on a drone, among the three laser marking points in the target image, there are three laser marking points as target laser marking points, the target laser marking points are such that a triangle can be formed in the target image with the laser marking points as vertices, the laser marking points are emitted by a laser emitting device pre-installed at a fixed position, the laser emitting device emits divergent laser, and the divergence distance of the divergent laser is greater than a preset distance;
[0011] A camera external parameter determination module for determining target camera external parameters, where the target camera external parameters are the camera external parameters when the drone camera shoots the target image;
[0012] An image position determination module for determining the target image position according to the target image, where the target image position is the positions of the respective target laser marking points in the target image;
[0013] A position determination module for determining the drone position according to the target image position, the target camera external parameters, and the target laser marking point positions.
[0014] According to another aspect of the present invention, there is provided an electronic device, which includes:
[0015] At least one processor; and
[0016] A memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the drone positioning method of any embodiment of the present invention.
[0018] According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the drone positioning method of any embodiment of the present invention when executed.
[0019] The technical solution of the embodiments of the present invention realizes the accurate determination of the drone position by determining the target image; determining the target camera external parameters; determining the target image position according to the target image, and finally determining the drone position according to the target image position, the target camera external parameters, and the target laser marking point positions, by determining the relative position relationship between the position of the camera and the laser marking points on the ground, and with the help of the target laser marking point positions and the relative position relationship of the laser marking points. Through the above method, it is possible to accurately determine the position of the drone without positioning signals such as GPS, while ensuring the safe operation of the drone.
[0020] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0022] Figure 1 is a flowchart of a drone positioning method provided according to Embodiment 1 of the present invention;
[0023] Figure 2 is a flowchart of another drone positioning method provided according to Embodiment 2 of the present invention;
[0024] Figure 3 is a schematic structural diagram of a drone positioning device provided according to Embodiment 3 of the present invention;
[0025] Figure 4 is a schematic structural diagram of an electronic device for implementing the drone positioning method of the embodiments of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0026] In order to enable those skilled in the art to better understand the solutions of the present invention, the following clearly and completely describes the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, rather than all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above accompanying drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such used data may be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order different from those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0028] Example 1
[0029] Figure 1 The following is a flowchart of a UAV positioning method provided by Embodiment 1 of the present invention. This embodiment is applicable to the situation of determining the specific position of a UAV in the absence of a positioning signal. This method can be executed by a UAV positioning device, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device with data processing capabilities. As Figure 1 shown, the method includes:
[0030] S110. Determine a target image.
[0031] The target image is an image containing at least three laser marking points. The target image is obtained by shooting with a camera installed on the UAV. Among the three laser marking points in the target image, there are three laser marking points that are target laser marking points. The target laser marking points can form a triangle in the target image with the laser marking points as vertices. The laser marking points are emitted by a laser emitting device pre-installed at a fixed position. The laser emitting device emits divergent laser, and the divergence distance of the divergent laser is greater than a preset distance.
[0032] When the UAV is flying, due to the existence of some special areas or special devices, the UAV may not be able to receive positioning signals such as GPS. In this case, the UAV may be damaged or even destroyed due to collisions. Therefore, it is particularly important to be able to determine the specific orientation of the UAV when it lacks GPS and other positioning signals.
[0033] This application takes into account that the specific orientation of the UAV can be indirectly determined by means of a fixed-position object and the relative position between the UAV and the fixed-position object. Therefore, when the UAV cannot determine its own orientation through signals such as GPS, this application will call the camera on the UAV to take pictures of the environment where the UAV is located. The taken pictures need to contain at least three target laser marking points. Among them, the laser marking points can be luminous points that can clearly define the position of the luminous point, and the laser is divergent laser and the divergence distance of the divergent laser is greater than a preset distance. Among them, the target laser marking points need to form a relatively clear triangle in the target image.
[0034] The existence of the laser marking points can be realized by a pre-installed laser emitting device.
[0035] In an alternative method, determining the target image may include steps A1 - A2:
[0036] Step A1. Shoot the ground with a camera installed on the UAV to obtain an initial image. Among the three laser marking points in the initial image, there are three laser marking points that are target laser marking points.
[0037] Step A2: Filter the initial image to obtain the target image.
[0038] For the determination of the target image, a camera installed on the drone can be used to take pictures of the ground, which can ensure that the relative position between the camera and the drone can be determined in advance. And after taking the image, the obtained initial image will be filtered to reduce noise and details. When filtering, Gaussian filtering and median filtering can be used to process the image. Gaussian filtering is used to smooth the image, reduce noise and details. By convolving the image with a Gaussian kernel, high-frequency noise can be effectively removed. Median filtering is used to remove the salt-and-pepper noise that may occur in the image, and the median of the neighborhood pixels is used to replace the central pixel.
[0039] S120: Determine the external parameters of the target camera.
[0040] The external parameters of the target camera are the external parameters of the drone camera when taking the target image.
[0041] The external parameters of the camera are used to describe the position and attitude of the camera in the three-dimensional world coordinate system. Due to the different shooting angles of the camera, there are certain differences when calculating the distance between the camera and the target laser marking point. Therefore, it is necessary to determine the specific external parameters of the target camera when taking the target image.
[0042] S130: Determine the position of the target image according to the target image.
[0043] The position of the target image is the position of each target laser marking point in the target image.
[0044] Since each target laser marking point can be clearly shown in the target image, the specific position of each target laser marking point relative to the target image can be determined.
[0045] In an alternative solution, determining the position of the target image according to the target image includes:
[0046] Based on the Canny edge detection algorithm, determine the position of the target image corresponding to each target laser marking point.
[0047] The Canny edge detection algorithm is based on the gradient information of the image to find edges. In a digital image, the gradient represents the degree and direction of the change in pixel gray values.
[0048] Since the Canny edge detection algorithm can find the edges of objects in the image, the edges of each target laser marking point in the target image can be determined through the Canny edge detection algorithm, and then the position of the target laser marking point in the target image can be determined.
[0049] S140. Determine the UAV position based on the target image position, the target camera extrinsic parameters, and the target laser marker position.
[0050] After obtaining the target image position, the target camera extrinsic parameters, and the target laser marker position, based on the target image position and the target camera extrinsic parameters, the relative positions between the camera and each target laser marker in the actual position can be indirectly obtained. The target laser marker position and the relative positions are used to accurately determine the UAV position.
[0051] For the determination of the UAV position, the target image position is subjected to coordinate transformation to transform the target image position into world coordinates. The coordinate transformation converts the corresponding coordinates of the target image position into world coordinates, including the image coordinate system, the camera coordinate system, and the world coordinate system, and these conversions are processed using the method of homogeneous transformation. Homogeneous coordinates can facilitate linear transformations such as translation and rotation. A two-dimensional point (u, v) is represented as (u, v, 1) in homogeneous coordinates, and a three-dimensional point (x, y, z) is represented as (x, y, z, 1) in homogeneous coordinates. The corresponding coordinates of the target image position are converted to camera coordinates using the camera intrinsic matrix K. The camera intrinsic matrix K usually contains information such as the focal length and the principal point offset: the focal lengths (fx, fy) and the optical center (cx, cy). Point coordinates are extracted from the camera, and three points form a triangle, (u1, v1), (u2, v2), (u3, v3). The three points are normalized to image coordinates:
[0052]
[0053] This converts the corresponding coordinates of the target image position into a direction vector in the camera coordinate system. Since the world coordinates of each vertex of the triangle, that is, the target laser marker, are known, the normalized image coordinates are used in combination with the PnP algorithm to solve for the rotation vector R and the translation vector t of the camera.
[0054] For the solution using the PnP algorithm, calculations are performed using the three-dimensional point set, the two-dimensional point set, and the camera intrinsic parameters, and the rotation vector and the translation vector are output. The initial estimate of the camera pose is mainly obtained through a linear method, and then a non-linear optimization algorithm is used to minimize the reprojection error. The reprojection error refers to the difference between the position where the three-dimensional point is projected onto the image plane through the estimated camera pose and the actual image point. Finally, through iterative optimization, the rotation and translation parameters are continuously adjusted to minimize the reprojection error.
[0055] For further calculating the position of the camera based on the rotation vector and the translation vector, the rotation vector is converted into a rotation matrix through the Rodrigues transformation. Rodrigues constructs the rotation matrix based on the direction and magnitude of the rotation vector.
[0056] Calculate the rotation angle:
[0057] θ = ||r||;
[0058] Wherein, r is the rotation vector; θ is the rotation angle.
[0059] Calculate the rotation axis:
[0060]
[0061] Wherein, k is the rotation axis.
[0062] Construct the rotation matrix:
[0063] R = I + sin(θ)K + (1 - cos(θ))K 2 ;
[0064] Wherein, R is the rotation matrix.
[0065] K is the skew-symmetric matrix of the rotation axis:
[0066]
[0067] Further calculate the position of the camera based on the obtained external parameters of the camera:
[0068] C = -R T *t.
[0069] According to the technical solution of the embodiment of the present invention, by determining the target image; determining the external parameters of the target camera; determining the position of the target image according to the target image, and finally determining the position of the UAV according to the position of the target image, the external parameters of the target camera, and the position of the target laser marking point, the relative position relationship between the camera and the laser marking point on the ground is determined, and with the help of the position of the target laser marking point and the relative position relationship of the laser marking point, the accurate determination of the UAV position is realized. Through the above method, it is possible to accurately determine the position of the UAV without GPS and other positioning signals, while ensuring the safe operation of the UAV.
[0070] Embodiment 2
[0071] Figure 2 This is a flowchart of another UAV positioning method provided by the embodiment of the present invention. On the basis of the above embodiment, the process after determining the UAV position according to the position of the target image, the external parameters of the target camera, and the position of the target laser marking point in the foregoing embodiment is further optimized. This embodiment can be combined with each optional solution in one or more of the above embodiments. As Figure 2 shown, the UAV positioning method of this embodiment may include the following steps:
[0072] S210. Determine the target image.
[0073] The target image is an image containing at least three laser marking points, which is obtained by shooting with a camera installed on a drone. Among the three laser marking points in the target image, there are three laser marking points as target laser marking points. The target laser marking points can form a triangle in the target image with the laser marking points as vertices. The laser marking points are emitted by a laser emitting device pre-installed at a fixed position. The laser emitting device emits divergent laser, and the divergence distance of the divergent laser is greater than a preset distance.
[0074] S220. Determine the external parameters of the target camera.
[0075] The external parameters of the target camera are the external parameters of the drone camera when shooting the target image.
[0076] S230. Determine the target image position according to the target image.
[0077] The target image position is the position of each target laser marking point in the target image.
[0078] S240. Determine the position of the drone according to the target image position, the external parameters of the target camera, and the position of the target laser marking point.
[0079] S250. Determine the target image group when the drone is moving.
[0080] The target image group contains at least one target image; each target image in the target image group is obtained by shooting with the camera at preset time intervals when the drone is moving.
[0081] Since the drone may not be able to stop in place for shooting due to some working or design situations during flight, it is necessary to determine the position of the drone in real time.
[0082] For this, the drone needs to continuously adjust the camera to obtain a group of target images. When shooting the target image, the determination of the drone position will not wait until all the target images in a group are obtained, but directly determine the drone position after obtaining one target image.
[0083] S260. Determine the target image position corresponding to each target image in the target image group based on the directional fast rotation feature detection algorithm and the Canny edge detection algorithm.
[0084] The Oriented FAST and Rotated BRIEF (ORB) algorithm is a feature detection and description algorithm dedicated to real-time and fast operation. It uses the FAST algorithm to detect key points in an image. The FAST algorithm is specifically designed for feature detection. It defines a circular neighborhood with a radius of 3 around each pixel in the image, which contains 16 pixels. A threshold t is selected and the central pixel in the circular neighborhood is compared. If there is a set of consecutive pixels in the circular neighborhood whose intensity is higher than I + t or lower than I - t compared to the central pixel, then the central pixel is considered a corner point. After the feature point detection is completed, the direction of each key point is calculated to achieve rotation invariance. For the description algorithm, the BRIEF descriptor is used to describe each key point, and BRIEF is rotated to adapt to the direction of the key point. The BRIEF descriptor defines a fixed-size window for each key point. Inside the window, a pair of pixels is randomly selected and their intensities are compared. If the intensity of the first pixel is greater than that of the second pixel, a 1 is recorded in the descriptor; otherwise, a 0 is recorded. This process is repeated to generate a binary string of length n as the descriptor. By combining the feature point detection and the feature description, fast feature matching is then performed using the Hamming distance.
[0085] When the unmanned aerial vehicle (UAV) is moving, to improve the determination efficiency of the UAV's position, the Oriented FAST and Rotated BRIEF algorithm is introduced when determining the position of the target image. Thus, when determining the position of the target image through the Canny edge detection algorithm, the determination efficiency is accelerated, and further, the UAV can quickly determine its own position during flight.
[0086] In an alternative method, after determining the target image positions corresponding to the respective target images in the target image group based on the Oriented FAST and Rotated BRIEF algorithm and the Canny edge detection algorithm, it further includes:
[0087] Adjusting the target image positions corresponding to the respective target images through the Random Sample Consensus (RANSAC) algorithm.
[0088] The Random Sample Consensus (RANSAC) algorithm can be used to remove incorrect matches. The RANSAC algorithm estimates geometric transformation to remove incorrect matches. The RANSAC algorithm randomly selects a minimum subset from the dataset to estimate the model parameters, and then uses the estimated model parameters to verify the entire dataset and calculate the number of inliers. Inliers refer to data points that fit well with the model. If the number of points in the current model exceeds that of the previous best model, the best model is updated. This process is repeated until a predetermined number of iterations is reached or the number of inliers reaches a certain threshold, at which point the best model and the set of inliers are output.
[0089] To ensure the accuracy of the results, the random sample consensus algorithm is needed to remove the misaligned matches, so as to further improve the accuracy of the target image position corresponding to the target image.
[0090] S270. Determine the UAV movement trajectory according to the target image positions corresponding to the respective target images in the target image group.
[0091] After obtaining the target image positions of the respective target images in the target image group, the position where the UAV is located at each photographing moment can be determined, and these positions are connected together to obtain the UAV movement trajectory.
[0092] According to the technical solution of the embodiment of the present invention, when the UAV moves, a target image group is determined, and based on the directional fast rotation feature detection algorithm and the Canny edge detection algorithm, the target image positions corresponding to the respective target images in the target image group are determined. According to the target image positions corresponding to the respective target images in the target image group, the UAV movement trajectory is determined, realizing the rapid determination of the UAV trajectory, and when determining, the accuracy of the determination result can be ensured.
[0093] Embodiment III
[0094] Figure 3 A structural block diagram of a UAV positioning device is provided for an embodiment of the present invention. This embodiment is applicable to the situation of determining the specific position of a UAV in the absence of positioning signals such as GPS. The UAV positioning device can be implemented in the form of hardware and / or software, and the UAV positioning device can be configured in an electronic device with data processing capabilities. As Figure 3 shown, the UAV positioning device of this embodiment may include: an image confirmation module 310, a camera external parameter determination module 320, an image position determination module 330, and a position determination module 340. Among them:
[0095] The image confirmation module 310 is used to determine a target image; the target image is an image containing at least three laser marking points, the target image is obtained by photographing with a camera installed on the UAV, and among the respective three laser marking points in the target image, there are three laser marking points that are target laser marking points, the target laser marking points are capable of forming a triangle in the target image with the laser marking points as vertices, the laser marking points are emitted by a laser emitting device pre-installed at a fixed position, the laser emitting device emits divergent laser, and the divergence distance of the divergent laser is greater than a preset distance;
[0096] The camera external parameter determination module 320 is used to determine a target camera external parameter, and the target camera external parameter is the camera external parameter when the UAV camera photographs the target image;
[0097] An image position determination module 330, configured to determine a target image position according to the target image, where the target image position is the position of each target laser marking point in the target image;
[0098] A position determination module 340, configured to determine the position of the UAV according to the target image position, the target camera extrinsic parameters, and the target laser marking point position.
[0099] Based on the above embodiments, optionally, the determination of the target laser marking point position includes:
[0100] For each target laser marking point, determine the target three-dimensional coordinates of the target laser marking point in the world coordinate system as the target laser marking point position;
[0101] Correspondingly, determining the position of the UAV according to the target image position, the target camera extrinsic parameters, and the target laser marking point position includes:
[0102] Based on the N-point perspective algorithm, determine the camera three-dimensional coordinates of the camera in the world coordinate system according to each target three-dimensional coordinate, the target image position, and the target camera extrinsic parameters;
[0103] Determine the position of the UAV according to the camera three-dimensional coordinates.
[0104] Based on the above embodiments, optionally, the image confirmation module 310 includes:
[0105] Shoot the ground through a camera installed on the UAV to obtain an initial image, where three of the three laser marking points in the initial image are target laser marking points;
[0106] Perform filtering processing on the initial image to obtain a target image.
[0107] Based on the above embodiments, optionally, the image position determination module 330 includes:
[0108] Based on the Canny edge detection algorithm, determine the target image position corresponding to each target laser marking point.
[0109] Based on the above embodiments, optionally, after the position determination module 340, it further includes:
[0110] When the UAV moves, determine a target image group; the target image group includes at least one target image; each target image in the target image group is obtained by shooting through the camera at a preset time interval when the UAV moves;
[0111] Based on the directional fast rotation feature detection algorithm and the Canny edge detection algorithm, determine the target image positions corresponding to the respective target images in the target image group;
[0112] According to the target image positions corresponding to the respective target images in the target image group, determine the UAV movement trajectory.
[0113] Based on the above embodiments, optionally, after determining the target image positions corresponding to the respective target images in the target image group based on the directional fast rotation feature detection algorithm and the Canny edge detection algorithm, further include:
[0114] Adjust the target image positions corresponding to the respective target images through the random sample consensus algorithm.
[0115] The UAV positioning device provided by the embodiments of the present invention can execute the UAV positioning method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.
[0116] Embodiment Four
[0117] Figure 4 FIG. shows a schematic structural diagram of an electronic device 10 that can be used to implement the embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0118] As Figure 4 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. Among them, the memory stores a computer program executable by the at least one processor. The processor 11 can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.
[0119] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0120] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the drone positioning method.
[0121] In some embodiments, the drone positioning method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the drone positioning method described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the drone positioning method by any other suitable means (e.g., by means of firmware).
[0122] The various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGA), application-specific integrated circuits (ASIC), application-specific standard products (ASSP), systems-on-chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: implemented in one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a dedicated or general-purpose programmable processor, and can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0123] A computer program for implementing the method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, a special purpose computer, or other programmable data processing device, such that the computer programs, when executed by the processor, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer programs can be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine, or entirely on the remote machine or server.
[0124] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0125] In order to provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0126] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected with each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.
[0127] The computing system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0128] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is imposed herein.
[0129] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for positioning a drone, characterized in that: include: Determine a target image; the target image is an image including at least three laser marking points, the target image is obtained by photographing a camera installed on a drone, three laser marking points among the three laser marking points in the target image are target laser marking points, the target laser marking points are capable of forming a triangle in the target image with the laser marking points as vertices, the laser marking points are emitted by a laser emitting device pre-installed at a fixed position, the laser emitting device emits divergent laser light, and the divergence distance of the divergent laser light is greater than a preset distance; Determine a target camera extrinsic parameter, wherein the target camera extrinsic parameter is a camera extrinsic parameter when the drone camera captures the target image; Determine the target image position according to the target image, wherein the target image position is the position of each target laser marking point in the target image; The position of the drone is determined according to the target image position, the target camera extrinsic parameters and the target laser marking point position.
2. The method according to claim 1, characterized in that Determination of the target laser marking point position, including: For each of the target laser marking points, determining the target three-dimensional coordinates of the target laser marking point in the world coordinate system as the target laser marking point position; Accordingly, determining the position of the drone according to the target image position, the target camera extrinsic parameters and the target laser marking point position includes: Based on the N-point perspective algorithm, the three-dimensional coordinates of the camera in the world coordinate system are determined according to the three-dimensional coordinates of each target, the target image position and the target camera external parameters; Determine the drone's position based on the camera's 3D coordinates.
3. The method according to claim 1, characterized in that Determine the target image, including: The ground is photographed by a camera installed on the drone to obtain an initial image, wherein three laser marking points among the three laser marking points in the initial image are target laser marking points; The initial image is filtered to obtain a target image.
4. The method according to claim 1, characterized in that Determining a target image position according to the target image includes: Based on the Canny edge detection algorithm, the target image position corresponding to each target laser marking point is determined.
5. The method according to claim 1, characterized in that After determining the position of the drone according to the target image position, the target camera external parameters and the target laser marking point position, the method further includes: When the drone is moving, a target image group is determined; the target image group includes at least one target image; each target image in the target image group is obtained by shooting a camera at a preset time interval when the drone is moving; Based on the directional fast rotation feature detection algorithm and the Canny edge detection algorithm, the target image position corresponding to each target image in the target image group is determined; The moving trajectory of the UAV is determined according to the target image positions corresponding to each target image in the target image group.
6. The method according to claim 5, characterized in that After determining the target image position corresponding to each target image in the target image group based on the directional fast rotation feature detection algorithm and the Canny edge detection algorithm, the method further includes: The target image positions corresponding to each target image are adjusted through a random sampling consensus algorithm.
7. A drone positioning device, characterized in that: include: An image confirmation module is used to determine a target image; the target image is an image including at least three laser marking points, the target image is obtained by photographing a camera installed on a drone, three laser marking points among the three laser marking points in the target image are target laser marking points, the target laser marking points are capable of forming a triangle in the target image with the laser marking points as vertices, the laser marking points are emitted by a laser emitting device pre-installed at a fixed position, the laser emitting device emits divergent laser light, and the divergence distance of the divergent laser light is greater than a preset distance; A camera extrinsic parameter determination module is used to determine a target camera extrinsic parameter, wherein the target camera extrinsic parameter is a camera extrinsic parameter when the drone camera captures a target image; An image position determination module, used to determine a target image position according to the target image, wherein the target image position is a position of each of the target laser marking points in the target image; The position determination module is used to determine the position of the drone based on the target image position, the target camera extrinsic parameters and the target laser marking point position.
8. The device according to claim 7, characterized in that The image position determination module comprises: The position acquisition unit is used to determine the target image position corresponding to each target laser marking point based on the Canny edge detection algorithm.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the drone positioning method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the drone positioning method according to any one of claims 1 to 6 when executed.