QR code identification method and device for unmanned aerial vehicle landing and medium
Through deep learning models and visual perception technology, it can identify and avoid obstacles, solve the safety hazards and landing height restrictions of autonomous drone landing in complex scenes, and achieve safe and efficient landing in diverse environments.
Patent Information
- Application Number
- CN202410570618.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-09
- Publication Date
- 2024-09-17
AI Technical Summary
Existing autonomous landing methods for drones have safety risks in diverse real-life scenarios, they cannot effectively avoid obstacles, and their landing height is limited, making it difficult to achieve safe landings especially in highway scenarios.
Using a deep learning model combined with visual perception technology, the image semantic segmentation algorithm is used to identify ground images, divide the grid area, determine whether there is a QR code landing mark, and adjust the grid division accuracy according to the height of the drone. If no QR code is found, determine For obstacles, the Canny algorithm and connected domain analysis method are used for edge extraction and identification.
It can effectively identify the QR code landing mark in the real environment and avoid obstacles to improve the safety of the drone's autonomous landing, adapt to complex scenarios, and improve the controllability of the landing height.
Smart Images

Figure CN118657938A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of navigation and positioning technology, and in particular to a QR code recognition method, device and storage medium for unmanned aerial vehicle landing. Background Art
[0002] The development of drone technology has led to increasingly widespread applications of drones, such as emergency response, logistics distribution, disaster monitoring, agricultural spraying, etc. The automatic processing capability of the drone system is a prerequisite for achieving efficient, stable and safe flight. Although the landing process of the drone is the last link in the drone flight movement, the automation capability of this process plays an important role in the popularization and application of drones. Generally speaking, this process needs to be supplemented by a variety of algorithms such as machine learning, visual judgment, artificial intelligence and flight control.
[0003] The autonomous landing process of the drone is mainly supported by GPS positioning technology and visual recognition technology. The ground situation is recorded by the camera mounted on the drone, and the video stream is recognized by visual recognition technology. The recognized content is generally a landing mark (such as a CH mark, a QR code, etc.). The accuracy of the landing mark recognition, the rationality of the drone's attitude adjustment, and the safety settings for the landing scene are important processes to support the safe and rapid landing of the drone.
[0004] Most of the existing autonomous landing methods for drones focus on general scenarios and are mainly based on QR codes or landing patterns. They rely on artificial intelligence or machine learning algorithms to determine the spatial relative relationship between the drone and the landing point, adjust the drone's posture, and achieve final landing. The existing methods mainly have two problems: First, they are not suitable for diverse real-life scenarios. Real-life scenarios can have complex road conditions, fixed objects such as trees, and moving objects such as moving vehicles. The drones mentioned in the prior art do not consider the constraints of spatial obstacle avoidance and the space that can be dropped during landing, which means that the use of existing methods may cause safety hazards, such as collisions with obstacles; second, the stable landing height that can be achieved by the existing methods generally does not exceed 20 meters, which is far from the setting of cruising above 100 meters in highway scenarios. If the drone is directly dropped below 20 meters, it may not be able to search for the landing reference pattern or may directly face safety problems. Summary of the invention
[0005] In order to solve the problem of the drone landing in the real environment, identifying the QR code landing mark and avoiding obstacles. The embodiment of the present invention provides a QR code recognition method, device and storage medium for drone landing. The technical solution is as follows:
[0006] In a first aspect, a QR code recognition method for drone landing is provided, comprising: acquiring a ground image through a visual perception device; recognizing the ground image using an image semantic segmentation algorithm model obtained through deep learning model training; locating the ground image and dividing it into M×N grid areas; wherein M and N are positive integers and depend on the height of the drone above the ground, wherein the higher the height above the ground, the smaller the values of M and N; inputting the ground image corresponding to each grid area into the deep learning model for training, and determining whether the grid area contains a QR code landing mark; if no QR code landing mark is found, determining the object in the grid area as an obstacle.
[0007] In some embodiments, the ground image corresponding to each grid area is input into the deep learning model for training, including: graying the ground image corresponding to each grid area, and then converting it into a matrix form as the input matrix of the deep learning model; subjecting the input matrix to linear operation to obtain a matrix composed of feature points, subjecting the feature points to nonlinear operation to obtain a matrix composed of enhanced points, and using the matrix composed of feature points and the matrix composed of enhanced points to construct an intermediate layer of the width learning model; wherein, the input matrix is subjected to linear operation to obtain a matrix composed of feature points, and the value of each feature point is calculated according to the following formula:
[0008]
[0009] x represents the feature point value, f(x) represents the feature vector from the feature point to the origin, Wi(m,x) represents the weighted value of m feature points adjacent to the feature point, n represents the number of feature points, and m≤n.
[0010] In some embodiments, determining whether the grid area contains a QR code landing mark includes: when the values of M and N are less than a predetermined threshold, using the Canny algorithm to process the ground image in the grid area to extract edge graphics; obtaining the nested relationship of the edge graphics, identifying the graphic area with a resolution less than a predetermined threshold as black pixels or white pixels; using a connected domain analysis method, if the white connected domain and the black connected domain meet a predetermined value, then determining that the grid area contains a QR code landing mark; wherein the predetermined threshold is the reciprocal of the scale of the ground image. δ is a predetermined positive integer used to control the accuracy of the grid area division.
[0011] In some embodiments, the nesting relationship of the edge graphics is obtained, and the graphic area with a resolution less than a predetermined threshold is identified as black pixels or white pixels, including: after obtaining the contour information of the ground image in the grid area, screening is performed; a contour with at least two layers of contour nesting is used as a graphic to be determined for the position of the QR code; and along the direction of the contour nesting of the graphic to be determined from the inside to the outside, the graphic area with a resolution less than a predetermined threshold is identified as black pixels or white pixels in sequence.
[0012] In some embodiments, the ground image positioning is calculated according to the following formula:
[0013]
[0014] Wherein, d represents the distance from the UAV to the center of the ground image, ε represents a predetermined calculation coefficient, x represents the width of the ground image, h1 represents the length of the ground image, and h2 represents the flight altitude of the UAV.
[0015] In a second aspect, a QR code recognition device for drone landing is provided, including: a perception module, which acquires ground images through a visual perception device; a model building module, which is used to recognize ground images using an image semantic segmentation algorithm model obtained through deep learning model training; an image processing module, which locates the ground image and divides it into M×N grid areas; wherein M and N are positive integers and depend on the height of the drone from the ground, wherein the higher the height from the ground, the smaller the values of M and N; a judgment processing module, which inputs the ground image corresponding to each grid area into the deep learning model for training, and judges whether the grid area contains a QR code landing mark; if no QR code landing mark is found, the object in the grid area is judged as an obstacle.
[0016] In some embodiments, the ground image corresponding to each grid area is input into the deep learning model for training, including: graying the ground image corresponding to each grid area, and then converting it into a matrix form as the input matrix of the deep learning model; subjecting the input matrix to linear operation to obtain a matrix composed of feature points, subjecting the feature points to nonlinear operation to obtain a matrix composed of enhanced points, and using the matrix composed of feature points and the matrix composed of enhanced points to construct an intermediate layer of the width learning model; wherein, the input matrix is subjected to linear operation to obtain a matrix composed of feature points, and the value of each feature point is calculated according to the following formula:
[0017]
[0018] x represents the feature point value, f(x) represents the feature vector from the feature point to the origin, Wi(m,x) represents the weighted value of m feature points adjacent to the feature point, n represents the number of feature points, and m≤n.
[0019] In some embodiments, determining whether the grid area contains a QR code landing mark includes: when the values of M and N are less than a predetermined threshold, using the Canny algorithm to process the ground image in the grid area to extract edge graphics; obtaining the nested relationship of the edge graphics, and identifying the graphic area with a resolution less than a predetermined threshold as black pixels or white pixels; using a connected domain analysis method, if the white connected domain and the black connected domain meet a predetermined value, then determining that the grid area contains a QR code landing mark; wherein the predetermined threshold is the reciprocal of the scale of the ground image. δ is a predetermined positive integer used to control the accuracy of the grid area division.
[0020] In some embodiments, the ground image positioning is calculated according to the following formula:
[0021]
[0022] Wherein, d represents the distance from the UAV to the center of the ground image, ε represents a predetermined calculation coefficient, x represents the width of the ground image, h1 represents the length of the ground image, and h2 represents the flight altitude of the UAV.
[0023] In a third aspect, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement any one of the above-mentioned QR code recognition methods for drone landing.
[0024] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention at least include: in a real environment, the QR code landing mark is identified and obstacles are avoided, thereby ensuring the safety of autonomous landing of the drone. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0026] Figure 1 is a flow chart of a QR code recognition method for drone landing shown in an exemplary embodiment of the present invention;
[0027] Figure 2is a schematic block diagram of a QR code recognition device for drone landing according to an exemplary embodiment of the present invention;
[0028] Figure 3 is a schematic diagram of the working process of a QR code recognition device for drone landing shown in an exemplary embodiment of the present invention;
[0029] Figure 4 is a schematic structural diagram of a QR code recognition device for drone landing according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0030] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0031] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.
[0032] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.
[0033] In the embodiments of the present invention, sometimes a subscript such as W1 may be mistakenly written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are consistent.
[0034] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0035] Specifically, an embodiment of the present invention provides a QR code recognition method for drone landing, which can be implemented by a QR code recognition device for drone landing, and the QR code recognition device for drone landing can be a terminal or a server. Figure 1 The QR code recognition method 100 for drone landing shown in the flowchart may include the following steps:
[0036] Step S1: Acquire a ground image, that is, acquire a ground image through a visual perception device.
[0037] In some exemplary embodiments of the present invention, the at least one sensing device may include a radar for acquiring data information generated by the target vehicle in the radar device in real time; preferably, the radar may be a millimeter wave radar. The data information acquired by the radar may include real-time speed information, relative position information, lane information, heading angle information, acceleration information, etc. of the target vehicle. In addition, the at least one sensing device may also include a camera or a video camera for acquiring vehicle information or pedestrian information of the target vehicle. The vehicle information may include: vehicle brand, vehicle model, vehicle license plate, vehicle color, vehicle type, lane number, location and appearance information of the driver. The pedestrian information may include: gender, clothing and whether the driver is the driver, etc.
[0038] Step S2: using an image semantic segmentation algorithm model to recognize ground images, that is, using an image semantic segmentation algorithm model trained by a deep learning model to recognize ground images.
[0039] Step S3: Divide into M×N grid areas, that is, after positioning the ground image, divide it into M×N grid areas; wherein M and N are positive integers, depending on the height of the drone from the ground, wherein the higher the height from the ground, the smaller the values of M and N.
[0040] Step S4: Determine the QR code landing mark and handle obstacles, that is, input the ground image corresponding to each grid area into the deep learning model for training, and determine whether the grid area contains the QR code landing mark; if the QR code landing mark is not found, the object in the grid area is determined to be an obstacle.
[0041] In some exemplary embodiments of the present invention, inputting the ground image corresponding to each grid area into the deep learning model for training may include the following implementation steps:
[0042] Step S41: grayscale the ground image corresponding to each grid area, and then convert it into a matrix form as an input matrix of the deep learning model;
[0043] Step S42: The input matrix is subjected to linear operation to obtain a matrix composed of feature points, the feature points are subjected to nonlinear operation to obtain a matrix composed of enhanced points, and the matrix composed of feature points and the matrix composed of enhanced points are used to construct the intermediate layer of the width learning model; wherein, the input matrix is subjected to linear operation to obtain a matrix composed of feature points, and the value of each feature point is calculated according to the following formula:
[0044]
[0045] x represents the feature point value, f(x) represents the feature vector from the feature point to the origin, Wi(m,x) represents the weighted value of m feature points adjacent to the feature point, n represents the number of feature points, and m≤n.
[0046] In some exemplary embodiments of the present invention, determining whether the grid area contains a QR code landing mark may include the following implementation steps:
[0047] Step S43: When the values of M and N are less than a predetermined threshold, the ground image in the grid area is processed using the Canny algorithm to extract edge graphics; wherein the predetermined threshold is the inverse of the ground image scale. δ is a predetermined positive integer used to control the accuracy of the grid area division.
[0048] Step S44: Obtain the nesting relationship of the edge graphics, and identify the graphic area with a resolution less than a predetermined threshold as black pixels or white pixels. For example, in some exemplary embodiments of the present invention, the QR code can be nested, and the following situations may occur: First, when the drone is far away from the QR code, the resolution is less than the predetermined threshold, and the replaced part of the pixels in the original QR code will still be identified as black pixels, so it will not interfere with the acquisition of QR code information and the calculation of the relative spatial position of the drone; second, when the drone is closer to the QR code, the resolution is greater than the predetermined threshold, and the medium QR code in the original QR code can be identified. The identified information can guide the drone to perform further spatial position calculation and approach descent behavior. After further identifying the small QR code, the drone can achieve the final smooth landing; third, the formation of multiple nested forms of QR codes can maximize the use of limited vehicle-mounted (emergency patrol car on the highway) space compared to multiple models of QR codes in a spatial tiling manner, and larger models of QR codes can support drones to more accurately identify landing signs at higher altitudes. Step S44 can be further implemented according to the following steps:
[0049] Step S441: After obtaining the contour information of the ground image in the grid area, screening is performed.
[0050] Step S442: using an outline having at least two layers of nested outlines as a QR code position determination graphic.
[0051] Step S443: along the direction of the nested outline of the to-be-determined graphic from inside to outside, the graphic areas with a resolution less than a predetermined threshold are sequentially determined and identified as black pixels or white pixels.
[0052] Step S45: using a connected domain analysis method, if the white connected domain and the black connected domain meet a predetermined value, it is determined that the network area contains a QR code landing mark.
[0053] In some exemplary embodiments of the present invention, the ground image positioning is calculated according to the following formula:
[0054]
[0055] Wherein, d represents the distance from the UAV to the center of the ground image, ε represents a predetermined calculation coefficient, x represents the width of the ground image, h1 represents the length of the ground image, and h2 represents the flight altitude of the UAV.
[0056] Figure 2 : is a schematic block diagram of a QR code recognition device 200 for drone landing according to an exemplary embodiment. The QR code recognition device 200 for drone landing is characterized by comprising:
[0057] A perception module 202 acquires ground images through a visual perception device;
[0058] A model building module 204 is used to recognize ground images using an image semantic segmentation algorithm model obtained through deep learning model training;
[0059] The image processing module 206 locates the ground image and divides it into M×N grid areas; wherein M and N are positive integers, depending on the height of the drone from the ground, wherein the higher the height from the ground, the smaller the values of M and N;
[0060] The judgment processing module 208 inputs the ground image corresponding to each grid area into the deep learning model for training, and judges whether the grid area contains a QR code landing mark; if no QR code landing mark is found, the object in the grid area is judged as an obstacle.
[0061] In some exemplary embodiments of the present invention, the judgment processing module 208 can be implemented by the following steps, in order to input the ground image corresponding to each grid area into the deep learning model for training, including: graying the ground image corresponding to each grid area, and then converting it into a matrix form as the input matrix of the deep learning model; subjecting the input matrix to linear operations to obtain a matrix composed of feature points, subjecting the feature points to nonlinear operations to obtain a matrix composed of enhanced points, and using the matrix composed of feature points and the matrix composed of enhanced points to construct an intermediate layer of the width learning model; wherein, the input matrix is subjected to linear operations to obtain a matrix composed of feature points, and the value of each feature point is calculated according to the following formula:
[0062]
[0063] x represents the feature point value, f(x) represents the feature vector from the feature point to the origin, Wi(m,x) represents the weighted value of m feature points adjacent to the feature point, n represents the number of feature points, and m≤n.
[0064] In some exemplary embodiments of the present invention, the judgment processing module 208 can also be implemented by the following steps to judge whether the grid area contains a QR code landing mark, including: when the values of M and N are less than a predetermined threshold, using the Canny algorithm to process the ground image in the grid area to extract the edge graphics; obtaining the nested relationship of the edge graphics, and identifying the graphic area with a resolution less than a predetermined threshold as black pixels or white pixels; using the connected domain analysis method, if the white connected domain and the black connected domain meet the predetermined value, it is determined that the network area contains the QR code landing mark; wherein the predetermined threshold is the inverse of the scale of the ground image. δ is a predetermined positive integer used to control the accuracy of the grid area division.
[0065] In some exemplary embodiments of the present invention, the QR code recognition device 200 for drone landing, in order to locate the ground image, follows the following formula for calculation:
[0066]
[0067] Wherein, d represents the distance from the UAV to the center of the ground image, ε represents a predetermined calculation coefficient, x represents the width of the ground image, h1 represents the length of the ground image, and h2 represents the flight altitude of the UAV.
[0068] Figure 3 1 is a schematic diagram of a working process of a QR code recognition device 200 for drone landing according to an exemplary embodiment.
[0069] ① Before the drone patrols, it trains the automatic recognition model based on the collected data or public data sets, and deploys the trained model to the drone system (including but not limited to the drone end, remote control end or drone cloud platform);
[0070] ② The drone carries out emergency patrol missions and flies to and hovers at the corresponding location (i.e. above the drone carrier) based on the GPS and other information prompted by the drone cloud platform or remote controller;
[0071] ③ Based on the automatic identification model deployed by the UAV system, the UAV also carries out automatic identification of the target;
[0072] ④ If the drone recognizes the QR code, it calculates the relative spatial position and performs maneuvers to descend to the pre-set minimum flight altitude and execute step ⑥;
[0073] ⑤ If the drone fails to recognize the QR code, it will adjust the camera focus or lower the flight altitude appropriately. The altitude after landing must be above the set altitude threshold, and then jump to step ④;
[0074] ⑥Finally complete the landing behavior.
[0075] Figure 4 is a schematic diagram of the structure of a QR code recognition device 400 for drone landing provided by an embodiment of the present invention, such as Figure 4 As shown, the QR code recognition device 400 for drone landing may include the above Figure 2 The QR code recognition device 200 for drone landing is shown. Optionally, the QR code recognition device 400 for drone landing may include a first processor 2001.
[0076] Optionally, the QR code recognition device 400 for drone landing may also include a memory 2002 and a transceiver 2003 .
[0077] The first processor 2001, the memory 2002 and the transceiver 2003 may be connected via a communication bus.
[0078] Combine the following Figure 4 The various components of the QR code recognition device 400 for drone landing are specifically introduced:
[0079] The first processor 2001 is the control center of the QR code recognition device 400 for the landing of the drone, and can be a processor or a general term for multiple processing elements. For example, the first processor 2001 is one or more central processing units (CPUs), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention, such as one or more microprocessors (digital signal processors, DSPs), or one or more field programmable gate arrays (field programmable gate arrays, FPGAs).
[0080] Optionally, the first processor 2001 can perform various functions of the QR code recognition device 400 for drone landing by running or executing a software program stored in the memory 2002 and calling data stored in the memory 2002.
[0081] In a specific implementation, as an embodiment, the first processor 2001 may include one or more CPUs, such as Figure 4 CPU0 and CPU1 are shown in FIG.
[0082] In a specific implementation, as an embodiment, the QR code recognition device 400 for drone landing may also include multiple processors, such as Figure 4 The first processor 2001 and the second processor 2004 are shown in FIG. Each of these processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). The processor here can refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0083] The memory 2002 is used to store the software program for executing the solution of the present invention, and is controlled to be executed by the first processor 2001. The specific implementation method can refer to the above method embodiment, which will not be repeated here.
[0084] Optionally, the memory 2002 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2002 may be integrated with the first processor 2001, or may exist independently, and may be accessed through the interface circuit ( Figure 4 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.
[0085] The transceiver 2003 is used to communicate with a network device or a terminal device.
[0086] Optionally, the transceiver 2003 may include a receiver and a transmitter ( Figure 4The receiver is used to implement a receiving function, and the transmitter is used to implement a sending function.
[0087] Optionally, the transceiver 2003 may be integrated with the first processor 2001, or may exist independently, and may be connected to the first processor 2001 through the interface circuit ( Figure 4 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.
[0088] It should be noted that Figure 4 The structure of the QR code recognition device 400 for drone landing shown in the figure does not constitute a limitation on the router. The actual knowledge structure recognition device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0089] In addition, the technical effects of the QR code recognition device 400 used for drone landing can refer to the technical effects of the vehicle recognition method of radar and vision fusion described in the above method embodiment, and will not be repeated here.
[0090] It should be understood that the first processor 2001 in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0091] The present invention also discloses a computer-readable storage medium, characterized in that a program code is stored in the computer-readable storage medium, and the program code can be called by a processor to execute the above-mentioned QR code recognition method for drone landing.
[0092] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0093] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0094] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0095] In the present invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0096] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0097] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0098] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0099] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0100] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0101] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0102] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0103] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A QR code recognition method for drone landing, characterized in that: include: Acquire ground images through visual perception devices; The image semantic segmentation algorithm model trained by the deep learning model is used to identify ground images; After locating the ground image, divide it into M×N grid areas; wherein M and N are positive integers, depending on the height of the drone from the ground, wherein the higher the height from the ground, the smaller the values of M and N; The ground image corresponding to each grid area is input into the deep learning model for training to determine whether the grid area contains a QR code landing mark; if no QR code landing mark is found, the object in the grid area is determined to be an obstacle.
2. The QR code recognition method for drone landing according to claim 1, characterized in that: Inputting the ground image corresponding to each grid area into the deep learning model for training includes: The ground image corresponding to each grid area is grayed out and then converted into a matrix form as an input matrix of the deep learning model; The input matrix is subjected to linear operation to obtain a matrix composed of feature points, the feature points are subjected to nonlinear operation to obtain a matrix composed of enhanced points, and the matrix composed of feature points and the matrix composed of enhanced points are used to construct the middle layer of the width learning model; Among them, the input matrix is subjected to linear operation to obtain a matrix composed of feature points, and the value of each feature point is calculated according to the following formula: x represents the feature point value, f(x) represents the feature vector from the feature point to the origin, Wi(m,x) represents the weighted value of m feature points adjacent to the feature point, n represents the number of feature points, and m≤n.
3. The QR code recognition method for drone landing according to claim 2, characterized in that: Determining whether the grid area contains a QR code landing mark includes: When the values of M and N are less than the predetermined threshold, the Canny algorithm is used to process the ground image in the grid area to extract the edge graphics; Acquire the nested relationship of the edge graphics, and identify the graphic area with a resolution less than a predetermined threshold as black pixels or white pixels; Using the connected domain analysis method, if the white connected domain and the black connected domain meet the predetermined value, it is determined that the network area contains the QR code landing mark; The predetermined threshold is the reciprocal of the ground image scale. δ is a predetermined positive integer used to control the accuracy of the grid area division.
4. The QR code recognition method for drone landing according to claim 3, characterized in that: Acquiring the nested relationship of the edge graphics, and identifying the graphic area with a resolution less than a predetermined threshold as a black pixel or a white pixel, comprising: After obtaining the contour information of the ground image in the grid area, screening is performed; A contour having at least two layers of contours is used as a QR code position determination graphic; Along the direction of nesting the outline of the graphic to be determined from the inside to the outside, the graphic areas with a resolution less than a predetermined threshold are sequentially determined and identified as black pixels or white pixels.
5. The QR code recognition method for drone landing according to any one of claims 1 to 4, characterized in that: The ground image positioning is calculated according to the following formula: Wherein, d represents the distance from the UAV to the center of the ground image, ε represents a predetermined calculation coefficient, x represents the width of the ground image, h1 represents the length of the ground image, and h2 represents the flight altitude of the UAV.
6. A QR code recognition device for drone landing, characterized in that: include: A perception module acquires ground images through a visual perception device; A model building module, used to recognize ground images using an image semantic segmentation algorithm model trained by a deep learning model; The image processing module locates the ground image and divides it into M×N grid areas; wherein M and N are positive integers, depending on the height of the drone from the ground, wherein the higher the height from the ground, the smaller the values of M and N; The judgment processing module inputs the ground image corresponding to each grid area into the deep learning model for training, and judges whether the grid area contains a QR code landing mark; if no QR code landing mark is found, the object in the grid area is judged as an obstacle.
7. The QR code recognition device for drone landing according to claim 6, characterized in that: Inputting the ground image corresponding to each grid area into the deep learning model for training includes: The ground image corresponding to each grid area is grayed out and then converted into a matrix form as an input matrix of the deep learning model; The input matrix is subjected to linear operation to obtain a matrix composed of feature points, the feature points are subjected to nonlinear operation to obtain a matrix composed of enhanced points, and the matrix composed of feature points and the matrix composed of enhanced points are used to construct the middle layer of the width learning model; Among them, the input matrix is subjected to linear operation to obtain a matrix composed of feature points, and the value of each feature point is calculated according to the following formula: x represents the feature point value, f(x) represents the feature vector from the feature point to the origin, Wi(m,x) represents the weighted value of m feature points adjacent to the feature point, n represents the number of feature points, and m≤n.
8. The QR code recognition device for drone landing according to claim 7, characterized in that: Determining whether the grid area contains a QR code landing mark includes: When the values of M and N are less than the predetermined threshold, the Canny algorithm is used to process the ground image in the grid area to extract the edge graphics; Acquire the nested relationship of the edge graphics, and identify the graphic area with a resolution less than a predetermined threshold as black pixels or white pixels; Using the connected domain analysis method, if the white connected domain and the black connected domain meet the predetermined value, it is determined that the network area contains the QR code landing mark; The predetermined threshold is the reciprocal of the ground image scale. δ is a predetermined positive integer used to control the accuracy of the grid area division.
9. The QR code recognition device for drone landing according to any one of claims 6 to 8, characterized in that: The ground image positioning is calculated according to the following formula: Wherein, d represents the distance from the UAV to the center of the ground image, ε represents a predetermined calculation coefficient, x represents the width of the ground image, h1 represents the length of the ground image, and h2 represents the flight altitude of the UAV.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program code, and the program code can be called by a processor to execute the QR code recognition method for landing a drone as described in any one of claims 1 to 4.
