An unmanned aerial vehicle and its takeoff and landing method, computer device, and storage medium
By using the camera module to identify pit marks and QR codes in the drone storage device, navigation information is constructed, and the precise take-off and landing of the drone is achieved, the problem of low take-off and landing efficiency in the existing technology is solved, and the efficiency and safety of cluster operations are improved.
Patent Information
- Application Number
- CN202210993366.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-18
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-08-18
AI Technical Summary
During the take-off and recovery process of existing drone clusters, take-off and recovery efficiency are inefficient, manual operation is cumbersome, and improper take-off and landing position planning is likely to lead to collisions.
By using the camera module in the drone storage device to identify the pit identification ID and QR code, record and confirm the pit identification, and build navigation information to achieve accurate take-off and landing of the drone.
It improves the accuracy and recycling efficiency of drones, reduces manual operations, and improves the efficiency and safety of cluster take-off and landing.
Smart Images

Figure CN115258181B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicles, and particularly to an unmanned aerial vehicle, a take-off and landing method thereof, a computer device, and a storage medium. Background Art
[0002] With the increasing popularity of unmanned aerial vehicle light shows, the scale of cluster performances is also constantly expanding, from the initial cluster of about a hundred to the current cluster of thousands. With the expansion of the cluster scale, the placement before take-off and the storage work after the performance are becoming more and more onerous.
[0003] Currently, the general process for placement before take-off is as follows: First, the staff takes out the unmanned aerial vehicles from the storage box. Then, the unmanned aerial vehicles are placed one by one at the previously determined positions. The disadvantages of this method are: (1) The unmanned aerial vehicles need to be manually taken out from the storage box; (2) When placing the unmanned aerial vehicles, the staff can only place one at a time, resulting in low efficiency; (3) The approximate placement positions of each unmanned aerial vehicle need to be planned in advance, otherwise, due to improper placement positions, the take-off spacing of some unmanned aerial vehicles may be too close, resulting in collisions.
[0004] Currently, the general process for storage after the performance is as follows: First, the staff divides the landed unmanned aerial vehicles into several areas and gathers the unmanned aerial vehicles in the same area together. Then, the staff puts the unmanned aerial vehicles into the storage box one by one. Finally, the storage box is retrieved. The disadvantage of this method is also low efficiency, and it takes a lot of time to put the unmanned aerial vehicles into the storage box. Summary of the Invention
[0005] Embodiments of the present invention provide an unmanned aerial vehicle, a take-off and landing method thereof, a computer device, and a storage medium, aiming to improve the take-off and landing accuracy and recovery efficiency of the unmanned aerial vehicle.
[0006] In a first aspect, an embodiment of the present invention provides an unmanned aerial vehicle take-off and landing method, which is applicable to an unmanned aerial vehicle storage device and includes:
[0007] When the unmanned aerial vehicle takes off from the unmanned aerial vehicle storage device, the pit identification ID of the corresponding pit is identified and recorded by the camera module;
[0008] When the unmanned aerial vehicle returns for landing, the two-dimensional code in the unmanned aerial vehicle storage device is identified by the camera module, and the pit identification of the corresponding pit is confirmed according to the recorded pit identification ID;
[0009] The pit identification is identified to obtain the identification result of the corresponding pit identification;
[0010] Based on the identification result of the pit identification, the corresponding navigation information is constructed, and the unmanned aerial vehicle lands in the corresponding pit based on the navigation information.
[0011] Second aspect, an embodiment of the present invention provides a drone, including:
[0012] An identification recording unit, configured to, when the drone takes off from the drone storage device, identify and record the pit identification ID of the corresponding pit through the camera module;
[0013] An identification confirmation unit, configured to, when the drone returns for landing, identify the two-dimensional code in the drone storage device through the camera module, and confirm the pit identification of the corresponding pit according to the recorded pit identification ID;
[0014] An identification recognition unit, configured to recognize the pit identification to obtain the recognition result of the corresponding pit identification;
[0015] A navigation construction unit, configured to construct the corresponding navigation information based on the recognition result of the pit identification, and descend into the corresponding pit based on the navigation information.
[0016] Third aspect, an embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the drone takeoff and landing method described in the first aspect is implemented.
[0017] Fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the drone takeoff and landing method described in the first aspect is implemented.
[0018] An embodiment of the present invention provides a drone and its takeoff and landing method, a computer device, and a storage medium. The method is applicable to a drone storage device and includes: when the drone takes off from the drone storage device, identifying and recording the pit identification ID of the corresponding pit through the camera module; when the drone returns for landing, identifying the two-dimensional code in the drone storage device through the camera module, and confirming the pit identification of the corresponding pit according to the recorded pit identification ID; recognizing the pit identification to obtain the recognition result of the corresponding pit identification; constructing the corresponding navigation information based on the recognition result of the pit identification, and descending into the corresponding pit based on the navigation information. By identifying the pit identification of the drone storage device, the position information therein is read, so as to construct navigation information, enabling the drone to accurately descend into its respective pit, thereby improving the takeoff and landing accuracy and recovery efficiency of the drone. Description of the Drawings
[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0020] Figure 1 It is a schematic flowchart of a method for a drone to take off and land provided by an embodiment of the present invention;
[0021] Figure 2 It is a schematic sub - flowchart of a method for a drone to take off and land provided by an embodiment of the present invention;
[0022] Figure 3 It is a schematic diagram of the relationship between different coordinate systems in a method for a drone to take off and land provided by an embodiment of the present invention;
[0023] Figure 4 It is a schematic block diagram of a drone provided by an embodiment of the present invention; <urchin
[0024] Figure 5 It is a sub - schematic block diagram of a drone provided by an embodiment of the present invention. Detailed implementation manners
[0025] The following will clearly and completely describe 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 some, but not 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 fall within the protection scope of the present invention.
[0026] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprise" indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0027] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in this specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are intended to include the plural forms.
[0028] It should be further understood that the term "and / or" used in this specification of the present invention and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0029] Please refer to the following Figure 1 , Figure 1 , which is a schematic flow chart of a method for a drone to take off and land provided by an embodiment of the present invention, applicable to a drone storage device, and specifically includes: steps S101 to S104.
[0030] S101. When the drone takes off from the drone storage device, the camera module identifies and records the pit identification ID of the corresponding pit.
[0031] S102. When the drone returns for landing, the camera module identifies the two-dimensional code in the drone storage device, and confirms the pit identification of the corresponding pit according to the recorded pit identification ID.
[0032] S103. Identify the pit identification to obtain the identification result of the corresponding pit identification.
[0033] S104. Based on the identification result of the pit identification, construct the corresponding navigation information, and land in the corresponding pit based on the navigation information.
[0034] In this embodiment, when the drone takes off, it first records the pit identification ID of the corresponding pit. When it needs to land in the corresponding pit, it can confirm the corresponding pit identification according to the pit identification ID, and identify the pit identification, so as to obtain the corresponding position information according to the identification result, construct the navigation information that can guide the landing, and then land accurately in the corresponding pit according to the navigation information.
[0035] In this embodiment, by identifying the pit identification of the drone storage device to read the position information therein, the navigation information is constructed, so that the drone can land accurately in its respective pits, thus improving the take-off and landing accuracy and recovery efficiency of the drone.
[0036] The embodiment of the present invention also provides a storage device for a drone to take off and land quickly. There are multiple pits in the storage device, and each pit is attached with a different pit identification (such as a two-dimensional code or a bar code, etc.). The storage device can be unfolded. When the storage device is unfolded, the drone can take off directly from its own pit. When the performance is over, the drone will return above the storage device under the guidance of the GPS. At this time, the camera module on the drone starts to look for its own two-dimensional code. When the drone finds its own two-dimensional code, it will accurately land back in its own pit under the guidance of the two-dimensional code.
[0037] Compared with the existing placement method, the advantages of the embodiments of the present invention are as follows: (1) The staff only needs to place the storage device at the specified position and unfold it, without taking the UAV out of the storage device; (2) The staff can place multiple UAVs at one time, improving the placement efficiency; (3) As long as the position of the storage device is planned before placement, it is not necessary to plan the position of each UAV. Compared with the existing storage method, the advantages of the embodiments of the present invention are as follows: The staff does not need to manually put the UAV into the storage device. Just closing the storage device can recycle the UAV.
[0038] In a specific embodiment, the take-off and landing process of the UAV is as follows:
[0039] 1. When the UAV takes off and reaches 0.5 meters above the ground, the camera module starts to identify the QR code id directly below and records it in the flight control memory;
[0040] 2. The UAV performs a performance task;
[0041] 3. After the performance is completed, the UAV returns above the take-off point under the guidance of GPS. Due to the positioning error of GPS, there may be a position error of more than 10 centimeters between the UAV and the take-off pit at this time;
[0042] 4. When the UAV descends to 1.5 meters above the ground, the camera module is started to identify the QR code below, and according to the id identified at take-off, it searches for the QR code corresponding to its own pit;
[0043] 5. Under the guidance of the QR code, the position is adjusted, and the UAV precisely lands in the pit.
[0044] In one embodiment, the pit identifier is a QR code;
[0045] The step S103 includes:
[0046] Identifying the QR code as a QR code image and performing binarization processing on the QR code image;
[0047] Performing image segmentation on the binarized QR code image to obtain multiple image sub-regions containing region IDs;
[0048] Judging whether each pixel in the binarized QR code image has a different gray value from the adjacent pixel;
[0049] If it is determined that there is a target pixel with a different gray value from the adjacent pixel, an edge ID is generated according to the region ID of the image sub-region to which the target pixel belongs and the region ID of the image sub-region to which the adjacent pixel belongs;
[0050] Traversing the QR code image and classifying all the edge pixels according to the edge ID to generate an image edge set;
[0051] Sort the edge pixels in each edge according to the coordinates of the pixels in the QR code image, perform linear fitting on the sorted edge pixels according to a preset sliding window, and record the fitting error at the same time;
[0052] Control the preset sliding window to slide to obtain the extreme value of the fitting error, and set the pixel point corresponding to the extreme value of the fitting error as the edge corner point;
[0053] After obtaining all the edge corner points, exclude the non-quadrilateral edges according to the relative position relationship between the edge corner points, and obtain the quadrilateral edges of the QR code image;
[0054] For each quadrilateral edge, sequentially check the pixel gray values at multiple preset specific positions within the quadrilateral;
[0055] When the pixel gray value at the specific position is 0, encode the corresponding pixel point as 0; when the pixel gray value at the specific position is 255, encode the corresponding pixel point as 1;
[0056] Combine the encodings of all specific positions in order to obtain the encoding of the quadrilateral, and compare the encoding of the quadrilateral with the pre-stored identification ID. If the comparison is successful, it is determined that the QR code is successfully recognized.
[0057] In this embodiment, image processing is performed on the obtained QR code image, which specifically includes:
[0058] Image binarization: Divide the image into multiple sub-blocks with 4 adjacent pixels as a unit, and calculate the maximum and minimum gray values of all pixels in each sub-block and the adjacent 3*3 sub-block. Take the average of the maximum and minimum pixel gray values in the 3*3 sub-block as the threshold, set the gray value of each pixel in the sub-block greater than the threshold to white (gray value 255), and less than the threshold to black (gray value 0).
[0059] Image segmentation: Judge each pixel in the binarized image. If the adjacent pixel has the same gray value as the current pixel, classify the adjacent pixel and the current pixel into the same set, which is called a region, and assign an id called the region id to this set. Traverse all pixels to divide the image into several regions, and each region has its own unique region id.
[0060] Edge detection: Judge each pixel in the binarized image. If the adjacent pixel has a different gray value from the current pixel, generate a new id according to the region id of the current pixel and the region id of the adjacent pixel, which is called the edge id.
[0061] Traverse the entire image, classify all edge pixels according to the edge id, and thus generate several sets called the edges of the image.
[0062] Quadrilateral detection: First, sort the pixels in each edge according to their coordinates in the image. Then, perform linear fitting on the sorted edge pixels using a set sliding window, and record the fitting error. The size of the sliding window is 1 / 12 of the entire edge length. As the sliding window slides, the corner points of the edge are the places where the fitting error reaches its extreme values. After obtaining all the corner points of the edge, exclude the non - quadrilateral edges based on the relative position relationship between the corner points to obtain all the edges that conform to a quadrilateral.
[0063] Coding recognition: For each edge that conforms to a quadrilateral, check the gray - scale values of the pixels at 9 specific positions inside the quadrilateral in sequence. If the gray - scale value of a point is 0, set the code of this point to 0; if it is 255, set the code of this point to 1. In this way, according to the codes at the 9 specific positions, combine them in sequence to obtain a binary number, which is the code of the quadrilateral. Then, compare this code with the QR - code id pre - stored in the flight control memory. If the code matches the QR - code id, a QR - code is successfully recognized.
[0064] In one embodiment, step S104 includes:
[0065] Based on the recognition result of the pit position identifier, obtain the pixel coordinate values of the corner points of the edge of the pit position identifier;
[0066] Establish a coordinate system with the center of the pit position identifier as the origin, and map the pixel coordinate values in this coordinate system to obtain the corresponding physical coordinate values;
[0067] In this step, for any corner point of the edge, convert the pixel coordinate values to physical coordinate values according to the following coordinate conversion formula:
[0068]
[0069] where X1 and Y1 represent the abscissa and ordinate of the pixel coordinate values respectively, X5 and Y5 represent the abscissa and ordinate of the physical coordinate values respectively, and H1, H2... H8 all represent unknowns;
[0070] Calculate the displacement information of the pit position identifier relative to the camera module based on the physical coordinate values.
[0071] In this step, solve the coordinate conversion formula to obtain the linear transformation matrix
[0072] Decompose the linear transformation matrix into the product of two matrices according to the following formula:
[0073]
[0074] Among them, f x , f y , c x , c y are all known internal parameters of the camera module, indicating the displacement vector of the pit position identifier relative to the camera module.
[0075] In this embodiment, taking the QR code image as an example, first calculate the pose information of the QR code relative to the camera module according to the corner coordinates of the QR code:
[0076] The pixel coordinate values of the image points corresponding to the 4 corner points of the known QR code are (X1, Y1), (X2, Y2), (X3, Y3), (X4, Y4), and the coordinate values of the 4 corner points of the QR code in the coordinate system with the center of the QR code as the origin are (X5, Y5), (X6, Y6), (X7, Y7), (X8, Y8)
[0077] Among them, (X1, Y1) and (X5, Y5) are a pair of image point and object point coordinates. The following transformation relationship is satisfied between them in the homogeneous coordinate system:
[0078]
[0079] where s represents the homogeneity between the two, and h1, h2,... etc. represent unknowns.
[0080] Since s can be any non-zero number, h9 can be replaced by 1 to obtain formula ② as follows:
[0081]
[0082] Among them
[0083] Formula ② can be sorted out to obtain:
[0084]
[0085] The same applies to the other 3 corner points. According to the 4 corner points, equation ④ can be obtained as follows:
[0086]
[0087] By solving equation ④, the matrix
[0088] The matrix H describes the linear transformation from the QR code to the image point of the camera module. H can be decomposed into the product of the following two matrices:
[0089]
[0090] Among them, f x, f y , c x , c y The internal parameters belonging to the camera module are known quantities. It is the description of the displacement vector of the center of the QR code relative to the center of the camera module in the camera coordinate system. It is the rotational change of the QR code relative to the camera module. By decomposing H, the R and T matrices can be obtained.
[0091] In one embodiment, as Figure 2 shown, step S104 further includes: steps S201 to S205.
[0092] S201: Taking the take-off point of the UAV as the origin, the north direction as the positive x-axis direction, the east direction as the positive y-axis direction, and the downward direction as the positive z-axis direction, establish a geodetic coordinate system;
[0093] Since the UAV is placed at the center of the QR code before take-off, the center point of the QR code coincides with the origin of the geodetic coordinate system. The geodetic coordinate system is denoted by the symbol n, that is, Figure 3 the three-dimensional rectangular coordinate system N in
[0094] S202: Taking the center of the UAV as the origin, the nose direction as the positive x-axis direction, the right side of the nose as the positive y-axis direction, and the downward direction as the positive z-axis direction, establish a body coordinate system;
[0095] The body coordinate system is denoted by b, that is, Figure 3 the three-dimensional rectangular coordinate system b in. There is a rotational relationship between the body coordinate system and the geodetic coordinate system, and this rotational relationship is represented by the matrix indicated.
[0096] S203: Taking the center of the camera module as the origin, the front of the camera module as the positive x-axis direction, the right side as the positive y-axis direction, and the downward direction as the positive z-axis direction, establish a camera coordinate system;
[0097] The camera coordinate system is denoted by c, that is, Figure 3 the three-dimensional rectangular coordinate system c in.
[0098] S204: Construct a first rotation matrix based on the geodetic coordinate system and the body coordinate system, and obtain a second rotation matrix based on the body coordinate system and the camera coordinate system;
[0099] In this step, the first rotation matrix is constructed according to the following formula
[0100]
[0101] Where, r represents the roll angle of the UAV, p represents the pitch angle, y represents the heading angle, and r, p, and y are all in radians. n represents the geodetic coordinate system, and b represents the body coordinate system;
[0102] For the second rotation matrix, since the camera module and the UAV are fixedly connected together, the rotation transformation from the camera coordinate system to the body coordinate system is a known constant matrix, denoted by It should be noted that this matrix describes the rotation relationship between the camera module and the UAV. This matrix can be obtained according to the installation direction of the camera module. For example, when the camera module is on the UAV, the x-axis of the camera module faces the y-axis (i.e., the right side) of the UAV. The rotation relationship between the two is a 90° rotation along the z-axis. Described by attitude angles, it is pitch angle: 0, roll angle: 0, heading angle 90°. Converting these three attitude angles into a rotation matrix gives Shown in Figure 3 with a blue dashed line, representing the rotation transformation from coordinate system c to b. It should also be noted that Figure 3 In order to facilitate drawing, the origins of coordinate system b and coordinate system c are separated in
[0103] S205. Combine the first rotation matrix and the second rotation matrix to map the displacement information to the position coordinate value in the geodetic coordinate system, and construct the navigation information according to the position coordinate value.
[0104] The step S205 includes:
[0105] Describe the displacement vector through the camera coordinate system according to the following formula:
[0106]
[0107] where the subscript cn represents the displacement from the origin of the camera coordinate system to the origin of the geodetic coordinate system, and the superscript c represents that the displacement is described in the camera coordinate system;
[0108] According to the second rotation matrix, map the displacement vector to the body coordinate system according to the following formula:
[0109]
[0110] where represents the displacement vector in the body coordinate system;
[0111] According to the first rotation matrix, map the displacement vector in the body coordinate system to the geodetic coordinate system:
[0112]
[0113] Among them, represents the displacement vector in the geodetic coordinate system;
[0114] Construct the navigation information based on the displacement vector in the geodetic coordinate system.
[0115] As Figure 3 shown, the vector represents the vector pointing from the origin of the n - system to the origin of the c - system, and the vector represents the vector pointing from the origin of the c - system to the origin of the n - system. They are equal in magnitude and opposite in direction. Representing a vector in the form of three - dimensional coordinates requires establishing a rectangular coordinate system. Under different rectangular coordinate systems, the coordinate representations of the same vector are also different. For example, the vector is represented by the coordinate in the c - system and is represented by the coordinate in the b - system. They can be mutually converted through the rotation matrix between the c - system and the b - system, as shown in the following formula 7.
[0116] The vector represents the description of the displacement vector of the center of the pit position identifier (such as a QR code) relative to the center of the camera module in the camera coordinate system. The subscript cn represents the displacement from the origin of the camera coordinate system to the origin of the geodetic coordinate system, and the superscript c indicates that this displacement is described in the camera coordinate system. The actual displacement vector used for the UAV return control is which represents the description in the geodetic coordinate system of the displacement from the origin of the geodetic coordinate system to the origin of the camera coordinate system. From to the following conversion is required:
[0117]
[0118] Obtain the description of the displacement vector from the origin of the geodetic system to the origin of the camera coordinate system in the camera coordinate system
[0119] [[ID=4,7]]
[0120] Obtain the description of the displacement vector from the origin of the geodetic system to the origin of the camera coordinate system in the body coordinate system The known rotation matrix is determined by the installation direction of the camera module on the UAV.
[0121]
[0122] Obtain the description of the displacement vector from the origin of the geodetic system to the origin of the camera coordinate system in the geodetic coordinate system. is the rotation matrix from the geodetic coordinate system to the body coordinate system, which is obtained by the inertial sensors carried on the UAV. It can be understood that when performing position control on the UAV, a desired position (i.e., the position where the UAV is expected to reach) and the current actual position of the UAV are required. And to describe the position, a reference coordinate system needs to be established. The reference coordinate system used to describe the desired position is the geodetic coordinate system, which requires that the obtained actual position must also be described using the geodetic coordinate system. However, the UAV position information directly obtained from the camera module is described in the camera coordinate system. Therefore, a series of conversions need to be performed on the original position to convert it into a description in the geodetic coordinate system.
[0123] Figure 4 FIG. 4 is a schematic block diagram of a UAV 400 provided by an embodiment of the present invention. The UAV 400 includes:
[0124] An identification recording unit 401, configured to, when the UAV takes off from the UAV storage device, identify and record the pit identification ID of the corresponding pit through the camera module;
[0125] An identification confirmation unit 402, configured to, when the UAV returns for landing, identify the two-dimensional code in the UAV storage device through the camera module, and confirm the pit identification of the corresponding pit according to the recorded pit identification ID;
[0126] An identification recognition unit 403, configured to recognize the pit identification to obtain the recognition result of the corresponding pit identification;
[0127] A navigation construction unit 404, configured to construct corresponding navigation information based on the recognition result of the pit identification, and descend into the corresponding pit based on the navigation information.
[0128] In an embodiment, the pit identification is a two-dimensional code;
[0129] The identification recognition unit 403 includes:
[0130] A binarization processing unit, configured to recognize the two-dimensional code as a two-dimensional code image and perform binarization processing on the two-dimensional code image;
[0131] An image segmentation unit, configured to perform image segmentation on the binarized two-dimensional code image to obtain a plurality of image sub-regions containing region IDs;
[0132] A grayscale judgment unit, configured to judge whether each pixel in the binarized two-dimensional code image has a different grayscale value from adjacent pixels;
[0133] An ID generation unit, configured to generate an edge ID according to the region ID of the image sub-region to which the target pixel belongs and the region ID of the adjacent pixel sub-region if it is determined that there is a target pixel having a different gray value from the adjacent pixel;
[0134] An image traversal unit, configured to traverse the two-dimensional code image and classify all edge pixels according to the edge ID to generate an image edge set;
[0135] A pixel sorting unit, configured to sort the edge pixels in each edge according to the coordinates of the pixels in the two-dimensional code image, perform linear fitting on the sorted edge pixels according to a preset sliding window, and record the fitting error;
[0136] A corner point setting unit, configured to control the preset sliding window to slide to obtain an extreme value of the fitting error, and set the pixel point corresponding to the extreme value of the fitting error as an edge corner point;
[0137] An edge exclusion unit, configured to exclude non-quadrilateral edges according to the relative position relationship between all edge corner points after obtaining all edge corner points, and obtain the quadrilateral edge of the two-dimensional code image;
[0138] A gray level check unit, configured to sequentially check the pixel gray levels at a plurality of preset specific positions within the quadrilateral for each quadrilateral edge;
[0139] A pixel encoding unit, configured to encode the corresponding pixel point as 0 when the pixel gray level at the specific position is 0; and encode the corresponding pixel point as 1 when the pixel gray level at the specific position is 255;
[0140] An encoding comparison unit, configured to combine all the encodings at the specific positions in sequence to obtain the encoding of the quadrilateral, and compare the encoding of the quadrilateral with a pre-stored identification ID. If the comparison is successful, it is determined that the two-dimensional code is successfully recognized.
[0141] In one embodiment, the navigation construction unit 404 includes:
[0142] A coordinate value acquisition unit, configured to acquire the pixel coordinate values of the edge corner points of the pit identifier based on the recognition result of the pit identifier;
[0143] A coordinate value mapping unit, configured to establish a coordinate system with the center of the pit identifier as the origin, and map the pixel coordinate values in the coordinate system to obtain corresponding physical coordinate values;
[0144] A displacement calculation unit, configured to calculate the displacement information of the pit identifier relative to the camera module based on the physical coordinate values.
[0145] In one embodiment, as Figure 5As shown, the navigation construction unit 404 further includes:
[0146] A first establishment unit 501, configured to establish a geodetic coordinate system with the take-off point of the unmanned aerial vehicle as the origin, the northward direction as the positive x-axis direction, the eastward direction as the positive y-axis direction, and the downward direction as the positive z-axis direction;
[0147] A second establishment unit 502, configured to establish a body coordinate system with the center of the unmanned aerial vehicle as the origin, the nose direction as the positive x-axis direction, the right side of the nose as the positive y-axis direction, and the downward direction as the positive z-axis direction;
[0148] A third establishment unit 503, configured to establish a camera coordinate system with the center of the camera module as the origin, the front of the camera module as the positive x-axis direction, the right side as the positive y-axis direction, and the downward direction as the positive z-axis direction;
[0149] A matrix construction unit 504, configured to construct a first rotation matrix based on the geodetic coordinate system and the body coordinate system, and obtain a second rotation matrix based on the body coordinate system and the camera coordinate system;
[0150] A displacement mapping unit 505, configured to map the displacement information to the position coordinate value in the geodetic coordinate system by combining the first rotation matrix and the second rotation matrix, and construct the navigation information according to the position coordinate value.
[0151] In one embodiment, the coordinate value mapping unit includes:
[0152] A coordinate conversion unit, configured to convert the pixel coordinate value into a physical coordinate value for any edge corner point according to the following coordinate conversion formula:
[0153]
[0154] where X1 and Y1 respectively represent the abscissa and ordinate of the pixel coordinate value, X5 and Y5 respectively represent the abscissa and ordinate of the physical coordinate value, and H1, H2... H8 all represent unknowns;
[0155] The displacement calculation unit includes:
[0156] A conversion solving unit, configured to solve the coordinate conversion formula to obtain a linear transformation matrix
[0157] A matrix decomposition unit, configured to decompose the linear transformation matrix into the product of two matrices according to the following formula:
[0158]
[0159] where f x 、f y 、c x, c y are all known internal parameters of the camera module, indicating the displacement vector of the pit position identifier relative to the camera module.
[0160] In one embodiment, the matrix construction unit 504 includes:
[0161] A first matrix construction unit for constructing the first rotation matrix according to the following formula
[0162]
[0163] where r represents the roll angle of the UAV, p represents the pitch angle, y represents the heading angle, r, p, and y are all in radians, n represents the earth coordinate system, and b represents the body coordinate system;
[0164] A second matrix acquisition unit for acquiring the second rotation matrix according to the fixed connection relationship between the UAV and the camera module where c represents the camera coordinate system.
[0165] In one embodiment, the displacement mapping unit 505 includes:
[0166] A vector description unit for describing the displacement vector through the camera coordinate system according to the following formula:
[0167]
[0168] where the subscript cn represents the displacement from the origin of the camera coordinate system to the origin of the earth coordinate system, and the superscript c represents that the displacement is described in the camera coordinate system;
[0169] A first vector mapping unit for mapping the displacement vector into the body coordinate system according to the second rotation matrix according to the following formula:
[0170]
[0171] where, represents the displacement vector in the body coordinate system;
[0172] A second vector mapping unit for mapping the displacement vector in the body coordinate system into the earth coordinate system according to the first rotation matrix:
[0173]
[0174] where, represents the displacement vector in the earth coordinate system;
[0175] An information construction unit for constructing the navigation information based on the displacement vector in the earth coordinate system.
[0176] Since the embodiments in the apparatus part correspond to the embodiments in the method part, for the descriptions of the embodiments in the apparatus part, please refer to the descriptions of the embodiments in the method part, and will not be elaborated here.
[0177] The embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed, the steps provided in the above embodiments can be implemented. The storage medium may include: various media such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs that can store program codes.
[0178] The embodiments of the present invention further provide a computer device, which may include a memory and a processor. When the processor calls the computer program stored in the memory, the steps provided in the above embodiments can be implemented. Of course, the computer device may further include various network interfaces, power supplies and other components.
[0179] The various embodiments in the specification are described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other. For the system disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description in the method part. It should be noted that for those of ordinary skill in the art of the present technology, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
[0180] It should also be noted that in this specification, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover a non-exclusive inclusion, such that a process, method, article or device including a series of elements includes not only those elements but also other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising a..." does not exclude the presence of additional identical elements in the process, method, article or device including the element.
Claims
1. A method for a drone to take off and land, applicable to a drone storage device, characterized in that Including: When the drone takes off from the drone storage device, the pit identification ID of the corresponding pit is identified and recorded through the camera module; the pit identification is a two-dimensional code; When the drone returns and lands, the two-dimensional code in the drone storage device is identified through the camera module, and the pit identification of the corresponding pit is confirmed according to the recorded pit identification ID; Identify the pit identification to obtain the identification result of the corresponding pit identification; Based on the identification result of the pit identification, construct the corresponding navigation information, and descend into the corresponding pit based on the navigation information; The identifying the pit identification to obtain the identification result of the corresponding pit identification includes: Identify the two-dimensional code as a two-dimensional code image, and perform binarization processing on the two-dimensional code image; Perform image segmentation on the binarized two-dimensional code image to obtain multiple image sub-regions containing region IDs; Judge whether each pixel in the binarized two-dimensional code image has a different gray value from the adjacent pixel; If it is determined that there is a target pixel with a different gray value from the adjacent pixel, generate an edge ID according to the region ID of the image sub-region to which the target pixel belongs and the region ID of the image sub-region to which the adjacent pixel belongs; Traverse the two-dimensional code image, and classify all edge pixels according to the edge ID to generate an image edge set; Sort the edge pixels in each edge according to the coordinates of the pixels in the two-dimensional code image, perform linear fitting on the sorted edge pixels according to a preset sliding window, and record the fitting error; Control the preset sliding window to slide to obtain the extreme value of the fitting error, and set the pixel point corresponding to the extreme value of the fitting error as an edge corner point; After obtaining all the edge corner points, exclude non-quadrilateral edges according to the relative position relationship between the edge corner points, and obtain the quadrilateral edge of the two-dimensional code image; For each quadrilateral edge, sequentially check the pixel gray values at multiple preset specific positions inside the quadrilateral; When the pixel gray value at a specific position is 0, encode the corresponding pixel point as 0; when the pixel gray value at a specific position is 255, encode the corresponding pixel point as 1; Combine all the encodings at specific positions in order to obtain the encoding of the quadrilateral, and compare the encoding of the quadrilateral with the pre-stored identification ID. If the comparison is successful, it is determined that the two-dimensional code is successfully identified.
2. The UAV takeoff and landing method according to claim 1, wherein The constructing the corresponding navigation information based on the identification result of the pit identification and descending into the corresponding pit based on the navigation information includes: Based on the identification result of the pit identification, obtain the pixel coordinate values of the edge corner points of the pit identification; Establish a coordinate system with the center of the pit identification as the origin, and map the pixel coordinate values in the coordinate system to obtain the corresponding physical coordinate values; Calculate the displacement information of the pit identification relative to the camera module based on the physical coordinate values.
3. The UAV takeoff and landing method according to claim 2, wherein The constructing the corresponding navigation information based on the identification result of the pit identification and descending into the corresponding pit based on the navigation information further includes: Establish a geodetic coordinate system with the drone take-off point as the origin, the north direction as the positive x-axis direction, the east direction as the positive y-axis direction, and the downward direction as the positive z-axis direction; Taking the center of the drone as the origin, the nose direction as the positive x-axis direction, the right side of the nose as the positive y-axis direction, and the downward direction as the positive z-axis direction, a body coordinate system is established; Taking the center of the camera module as the origin, the front of the camera module as the positive x-axis direction, the right side as the positive y-axis direction, and the downward direction as the positive z-axis direction, a camera coordinate system is established; Constructing a first rotation matrix based on the earth coordinate system and the body coordinate system, and obtaining a second rotation matrix based on the body coordinate system and the camera coordinate system; Combining the first rotation matrix and the second rotation matrix to map the displacement information to the position coordinate value in the earth coordinate system, and constructing the navigation information according to the position coordinate value.
4. The drone takeoff and landing method according to claim 3, characterized in that, Establishing a coordinate system with the center of the pit identifier as the origin, and mapping the pixel coordinate value to the coordinate system to obtain the corresponding physical coordinate value, including: For any edge corner point, converting the pixel coordinate value to the physical coordinate value according to the following coordinate conversion formula: Where X1 and Y1 respectively represent the abscissa and ordinate of the pixel coordinate value, X5 and Y5 respectively represent the abscissa and ordinate of the physical coordinate value, and H1, H2... H8 all represent unknowns; Calculating the displacement information of the pit identifier relative to the camera module based on the physical coordinate value, including: Solve the coordinate transformation formula to obtain the linear transformation matrix Decomposing the linear transformation matrix into the product of two matrices according to the following formula: Among them, f x , f y , c x , c y are all known internal parameters of the camera module, represents the displacement vector of the pit position identifier relative to the camera module.
5. The UAV takeoff and landing method according to claim 4, characterized in that, Constructing a first rotation matrix based on the earth coordinate system and the body coordinate system, and obtaining a second rotation matrix based on the body coordinate system and the camera coordinate system, including: Construct the first rotation matrix according to the following formula Where r represents the roll angle of the drone, p represents the pitch angle, y represents the heading angle, r, p, y are all in radian values, n represents the earth coordinate system, and b represents the body coordinate system; Obtain the second rotation matrix according to the fixed connection relationship between the drone and the camera module where c represents the camera coordinate system.
6. The drone takeoff and landing method according to claim 5, characterized in that Combining the first rotation matrix and the second rotation matrix to map the displacement information to the position coordinate value in the earth coordinate system, and constructing the navigation information according to the position coordinate value, including: Describing the displacement vector through the camera coordinate system according to the following formula: Where the subscript cn represents the displacement from the origin of the camera coordinate system to the origin of the earth coordinate system, and the superscript c represents that the displacement is described in the camera coordinate system; Mapping the displacement vector to the body coordinate system according to the following formula based on the second rotation matrix: Among them, represents the displacement vector in the body coordinate system; Mapping the displacement vector in the body coordinate system to the earth coordinate system based on the first rotation matrix: Among them, represents the displacement vector in the geodetic coordinate system; Constructing the navigation information based on the displacement vector in the earth coordinate system.
7. A drone, characterized in that, Including: An identification recording unit, used to identify and record the pit identifier ID of the corresponding pit through the camera module when the drone takes off from the drone storage device; the pit identifier is a two-dimensional code; An identification confirmation unit, used to identify the two-dimensional code in the drone storage device through the camera module when the drone returns and lands, and confirm the pit identifier of the corresponding pit according to the recorded pit identifier ID; An identification recognition unit, used to recognize the pit identifier to obtain the recognition result of the corresponding pit identifier; A navigation construction unit, used to construct the corresponding navigation information based on the recognition result of the pit identifier, and land in the corresponding pit based on the navigation information; The identification recognition unit includes: A binarization processing unit for recognizing the two-dimensional code as a two-dimensional code image and performing binarization processing on the two-dimensional code image; An image segmentation unit for segmenting the binarized two-dimensional code image to obtain a plurality of image sub-regions containing region IDs; A grayscale judgment unit for judging whether each pixel in the binarized two-dimensional code image has a different grayscale value from adjacent pixels; An ID generation unit for, if it is determined that there is a target pixel having a different grayscale value from adjacent pixels, generating an edge ID according to the region ID of the image sub-region to which the target pixel belongs and the region ID of the image sub-region to which the adjacent pixel belongs; An image traversal unit for traversing the two-dimensional code image and classifying all edge pixels according to the edge ID to generate an image edge set; A pixel sorting unit for sorting the edge pixels in each edge according to the coordinates of the pixels in the two-dimensional code image, performing linear fitting on the sorted edge pixels according to a preset sliding window, and recording the fitting error; A corner point setting unit for controlling the preset sliding window to slide to obtain the extreme value of the fitting error and setting the pixel point corresponding to the extreme value of the fitting error as an edge corner point; An edge exclusion unit for, after obtaining all edge corner points, excluding non-quadrilateral edges according to the relative position relationship between the edge corner points and obtaining the quadrilateral edge of the two-dimensional code image; A grayscale inspection unit for sequentially inspecting the pixel grayscale values at a plurality of preset specific positions within the quadrilateral for each quadrilateral edge; A pixel encoding unit for encoding the corresponding pixel point as 0 when the pixel grayscale value at a specific position is 0; and encoding the corresponding pixel point as 1 when the pixel grayscale value at a specific position is 255; An encoding comparison unit for combining all the encodings at specific positions in sequence to obtain the encoding of the quadrilateral, and comparing the encoding of the quadrilateral with a pre-stored identification ID. If the comparison is successful, it is determined that the two-dimensional code is successfully recognized.
8. A computer device, characterized in that, It includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the UAV takeoff and landing method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium. When the computer program is executed by the processor, it implements the UAV takeoff and landing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Independent unmanned aerial vehicle landing method and system based on two-dimensional code and inertial navigation assistance
CN108549397A