A method for determining landing posture and electronic equipment

By obtaining and analyzing the characteristic information in the target image, the target area of ​​the drone's landing position is determined, which solves the problem of inaccurate drone landing in the existing technology and achieves a higher-precision landing.

CN112785646BActive Publication Date: 2024-08-23LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110107086.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-26
Publication Date
2024-08-23
Estimated Expiration
2041-01-26

AI Technical Summary

Technical Problem

Existing drone landing solutions rely on inertial navigation systems and GPS navigation systems, which cannot achieve precise landings, resulting in uncertain landing locations.

Method used

By obtaining the feature information in the target image, the target area used to characterize the landing position of the electronic device is determined, and the pose of the electronic device when it lands is calculated based on the imaging plane and the actual position.

Benefits of technology

It improves the accuracy of UAV landing, ensures that electronic equipment can accurately determine the landing area and attitude, and enhances the accuracy of landing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112785646B
    Figure CN112785646B
Patent Text Reader

Abstract

The present application discloses a method for determining a landing posture and an electronic device, which are used to improve the accuracy of landing, obtain a target image and an imaging plane of the target image; obtain feature information in the target image, wherein the feature information in the target image includes feature points in the target image and the shape of the target object in the target image; determine a target area in the target image used to characterize the landing position of the electronic device according to the feature information in the target image; determine the actual position of the target area according to the target area; determine the posture of the electronic device when landing according to the target area of ​​the target image, the imaging plane of the target image and the actual position of the target area. The scheme provided by the present application is adopted to improve the accuracy of determining the landing area. In the present application, both the landing position and the posture during landing can be obtained, which further improves the accuracy of landing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of unmanned aerial vehicles, and in particular to a method for determining a landing posture and an electronic device. Background Art

[0002] In recent years, the application fields of drones have become increasingly extensive, and the control technology of drones has become increasingly mature. The automatic landing of drones is the key to further realizing the automation of drones.

[0003] At present, the UAV landing scheme is mainly based on the inertial navigation system and the GPS navigation system to guide the UAV to land. Due to the cumulative error expression of the inertial navigation system and the large inherent error of GPS, it is impossible to accurately guide the UAV to land at the target point. Therefore, how to provide a landing posture determination method to improve the landing accuracy is a technical problem that needs to be solved urgently. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a landing posture determination method and electronic equipment to improve the landing accuracy.

[0005] In order to solve the above technical problems, the embodiments of the present application adopt the following technical solutions: a method for determining a landing posture, comprising:

[0006] Acquire a target image and an imaging plane of the target image;

[0007] Acquiring feature information in the target image, wherein the feature information in the target image includes feature points in the target image and a shape of a target object in the target image;

[0008] Determining a target area in the target image for representing a landing position of the electronic device according to feature information in the target image;

[0009] determining the actual position of the target area according to the target area;

[0010] The posture of the electronic device when landing is determined according to the target area of ​​the target image, the imaging plane of the target image and the actual position of the target area.

[0011] In one embodiment, determining a target area in the target image for representing a landing position of the electronic device according to feature information in the target image includes:

[0012] Determine whether there is a target object matching the preset shape template in the target image;

[0013] When there is a target object matching a preset shape template in the target image, if the number of feature points in the target object reaches a specific number and the relative position relationship between the feature points meets preset requirements, the target object is determined to be a target area in the target image used to characterize the landing position of the electronic device.

[0014] In one embodiment, it further includes:

[0015] If the target image does not satisfy any target condition, deleting the target image;

[0016] generating instructions for re-determining the target image;

[0017] Among them, the target conditions include: there is no target object matching the preset shape template in the target image; the number of feature points in the target object does not reach a specific number; the relative position relationship between the feature points does not meet the preset requirements.

[0018] In one embodiment, the target area is composed of a circular ring and three rectangles within the circular ring; wherein the three rectangles are arranged at equal intervals, and the center point of the middle rectangle coincides with the center of the circular ring.

[0019] In one embodiment, it further includes:

[0020] When the number of feature points exceeds a specific number, the feature points are eliminated based on a preset method until the number of feature points reaches the specific number.

[0021] In one embodiment, the preset method is performed by the following steps:

[0022] Selecting the feature points one by one as feature points to be removed;

[0023] Determine whether there is a target feature point in the target image whose distance from the feature point to be removed is less than a preset distance;

[0024] When there is no target feature point in the target image whose distance to the feature point to be removed is less than a preset distance, the feature point to be removed is deleted.

[0025] In one embodiment, when there is a target feature point in the target image whose distance from the feature point to be removed is less than a preset distance, the preset method is performed as follows:

[0026] Obtaining grayscale change parameter values ​​of the target feature point and the feature point to be removed;

[0027] When the grayscale change parameter value of the target feature point is greater than the grayscale change parameter value of the feature point to be removed, the feature point to be removed is deleted, otherwise the target feature point is deleted.

[0028] A deletion operation is performed on the feature points to be removed.

[0029] In one embodiment, it further includes:

[0030] Determining whether a feature point in the target image is located within the annulus;

[0031] In the case where the feature point in the target image is located within the circular ring, determining whether the feature point in the target image coincides with each corner point of three rectangles within the circular ring;

[0032] In the case where the feature points in the target image coincide with the corner points of the three rectangles, it is determined that the relative positional relationship between the feature points meets the preset requirements.

[0033] In one embodiment, determining the posture of the electronic device when it lands according to the target area of ​​the target image, the imaging plane of the target image, and the actual position of the target area includes:

[0034] Determining an imaging coordinate system of the target image according to the imaging plane of the target image;

[0035] Establishing a world coordinate system based on the plane where the actual position of the target area is located;

[0036] Determine the attitude angle information and relative position information of the world coordinate system relative to the imaging coordinate system according to the coordinates of the feature points in the world coordinate system and the coordinates of the feature points projected onto the imaging plane of the target image;

[0037] The target posture of the electronic device is determined according to the posture angle information and the relative position information.

[0038] The present application also provides an electronic device, comprising:

[0039] A first acquisition module, used to acquire a target image and an imaging plane of the target image;

[0040] A second acquisition module is used to acquire feature information in the target image, wherein the feature information in the target image includes feature points in the target image and a shape of a target object in the target image;

[0041] A first determining module, configured to determine a target area in the target image for representing a landing position of the electronic device according to feature information in the target image;

[0042] A second determining module, used to determine the actual position of the target area according to the target area;

[0043] The third determination module is used to determine the posture of the electronic device when it lands according to the target area of ​​the target image, the imaging plane of the target image and the actual position of the target area.

[0044] The present application also provides a drone, comprising:

[0045] processor;

[0046] A memory for storing executable instructions in the processor;

[0047] Wherein, the processor is configured to:

[0048] Acquire a target image and an imaging plane of the target image;

[0049] Acquiring feature information in the target image, wherein the feature information in the target image includes feature points in the target image and a shape of a target object in the target image;

[0050] Determining a target area in the target image for representing a landing position of the electronic device according to feature information in the target image;

[0051] determining the actual position of the target area according to the target area;

[0052] The posture of the electronic device when landing is determined according to the target area of ​​the target image, the imaging plane of the target image and the actual position of the target area.

[0053] Based on the feature points of the target image and the shape of the target object in the target image and the target area in the target image used to characterize the landing position of the electronic device, the accuracy of judging the landing area is improved. Secondly, in the present application, both the landing position and the landing posture can be obtained, which further improves the landing accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 This is a flow chart of a method for determining a landing posture in an embodiment of the present application;

[0055] Figure 2A A schematic diagram for representing the corresponding relationship between the imaging coordinate system and the world coordinate system, including the imaging plane and the actual position of the target image;

[0056] Figure 2B A schematic diagram for representing the shape of a landing marker in a target area in a target image;

[0057] Figure 2CThis is a flow chart of a method for determining a landing posture in another embodiment of the present application;

[0058] Figure 3 This is a flow chart of a method for determining a landing posture in another embodiment of the present application;

[0059] Figure 4 A schematic diagram of a landing scene including a UAV and a landing ship;

[0060] Figure 5 This is a schematic diagram for representing the corresponding relationship between the imaging coordinate system and the world coordinate system in one embodiment of the present application;

[0061] Figure 6 This is a schematic diagram for representing the corresponding relationship between the imaging coordinate system and the world coordinate system in another embodiment of the present application;

[0062] Figure 7 This is a schematic diagram for representing the corresponding relationship between the imaging coordinate system and the world coordinate system in another embodiment of the present application;

[0063] Figure 8 A schematic diagram of the relative positions of the imaging plane and the plane where the actual position is located in one embodiment of the present application;

[0064] Fig. 9 A schematic diagram of the relative positions of the imaging plane and the plane where the actual position is located in another embodiment of the present application;

[0065] Fig.10 A block diagram of an electronic device in an embodiment of the present application;

[0066] Fig.11 This is a block diagram of an electronic device in another embodiment of the present application. DETAILED DESCRIPTION

[0067] Various aspects and features of the present application are described herein with reference to the accompanying drawings.

[0068] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.

[0069] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0070] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0071] It should also be understood that, although the present application has been described with reference to some specific examples, those skilled in the art will be able to realize many other equivalent forms of the present application that have the features described in the claims and are therefore within the scope of protection defined thereby.

[0072] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.

[0073] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.

[0074] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.

[0075] Figure 1 This is a flow chart of a method for determining a landing posture according to an embodiment of the present application, the method comprising the following steps S11-S15:

[0076] In step S11, a target image and an imaging plane of the target image are acquired;

[0077] In step S12, feature information in the target image is obtained, wherein the feature information in the target image includes feature points in the target image and the shape of the target object in the target image;

[0078] In step S13, a target area in the target image for representing the landing position of the electronic device is determined according to the feature information in the target image;

[0079] In step S14, the actual position of the target area is determined according to the target area;

[0080] In step S15, the posture of the electronic device when landing is determined according to the target area of ​​the target image, the imaging plane of the target image and the actual position of the target area.

[0081] In this embodiment, a target image and an imaging plane of the target image are obtained; wherein, Figure 2A As shown, the imaging plane of the target image is π 1The plane where the electronic device is located. For example, a drone is about to land, and its landing position needs to be photographed. The photographed image is the target image. However, whether the image taken by the drone contains the landing position needs to be confirmed. Specifically, it can be determined by judging whether the target image contains a target area for representing the landing position of the electronic device. Specifically, feature information in the target image is obtained, wherein the feature information in the target image includes feature points in the target image and the shape of the target object in the target image; the target area in the target image for representing the landing position of the electronic device is determined according to the feature information in the target image;

[0082] Specifically, the target area may be a marker pre-set at the landing position; Figure 2B As shown, the target area is composed of a circle and three rectangles in the circle; the three rectangles are arranged at equal intervals, and the center point of the middle rectangle coincides with the center of the circle.

[0083] On this basis, the target area in the target image for characterizing the landing location of the electronic device can be determined in the following manner:

[0084] Determine whether there is a target object matching the preset shape template in the target image; if there is a target object matching the preset shape template in the target image, if the number of feature points in the target object reaches a specific number and the relative position relationship between the feature points meets the preset requirements, then determine that the target object is a target area in the target image used to characterize the landing position of the electronic device.

[0085] That is, when determining that the target object is a target area in the target image used to represent the landing position of the electronic device, the following three conditions need to be met at the same time:

[0086] Condition 1: There is a target object in the target image that matches the preset shape template; for example, the preset shape template can be a ring, or a ring and three equally spaced rectangles contained in the ring; Condition 2: The number of feature points in the target object reaches a specific number. For example, assuming that the target area is a ring and three equally spaced rectangles contained in the ring, then the specific number of feature points in the target object is 12; Condition 3: The relative position relationship between the feature points meets the preset requirements.

[0087] When the target object satisfies the above three conditions at the same time, the target object is determined to be a target area in the target image used to represent the landing position of the electronic device.

[0088] When the target image does not satisfy any of the above conditions (condition one, condition two and condition three), the target image is deleted; and an instruction to redefine the target image is generated.

[0089] When selecting feature points, it is usually necessary to select points with large translation grayscale changes as feature points. Since the geometric shape of the target area in this application is composed of a ring and three rectangles in the ring, the points with large translation grayscale changes are the points corresponding to the four corners of the rectangles. It can be understood that there are 12 points in three rectangles. Then, if the number of feature points is greater than or less than 12, it is possible that the wrong target area has been located. Therefore, when judging whether the target object meets the above condition 2, if the number of feature points is lower than a specific number, then the filter window can be appropriately lowered, so as to continue to obtain new feature points by lowering the acquisition conditions. If it still cannot be obtained, the image is abandoned and re-acquired. When the number of feature points exceeds a specific number, the feature points are eliminated based on a preset method until the number of feature points reaches a specific number (i.e., 12). When eliminating, two situations are considered: one is adjacent feature points. Feature points may be estimated to be near the theoretical target feature points due to problems with the light source or the camera itself. Therefore, the grayscale change parameter values ​​of two adjacent points can be compared (such as the square difference of grayscale changes between two adjacent points and their surroundings). The ones with larger change parameter values ​​are retained, and the ones with smaller change parameter values ​​are eliminated. The other is isolated feature points. This feature point may be due to pixel interference sources in the target area. This feature point is not near the theoretical target feature point. Therefore, isolated feature points can be eliminated based on whether there are other feature points near this specific point.

[0090] It should be noted that in this embodiment, for the convenience of introduction and subsequent calculation, the feature points will be marked, and the specific marking method is as follows:

[0091] Establish the image origin and find the two points farthest from the origin. These two points are defined as feature point 1 and feature point 12 (the specific length depends on the image). The center point of the two feature points is the end point of the reference vector. The reference vector is confirmed by combining the two points.

[0092] Assume that the homogeneous coordinates of the 12 feature points extracted from the image are P 1 (u 1 , v 1 ,1),P 2 (u 2 , v 2 , 1),…,P 12 (u 12 , ν 12 , 1);

[0093] Among them, P1 to P12 are the coordinate system information of the feature points selected in the figure in the pixel coordinate system. Because all feature points are in the same plane, they are represented by the coordinate type (u, v, 1).

[0094] Homogeneous coordinates of feature point origin Ocorner (u 0 , ν 0 , 1), the end point P of the reference vector last (u last , v last , 1).

[0095] That is, the vectors of each feature point are:

[0096]

[0097] Among them C 1 O represents the reference vector. Ocorner represents the pixel center point of the target area, which is used as the reference point for subsequent correction and marking of valid nodes.

[0098] The amount of information of each feature point is expressed as follows:

[0099]

[0100] in They represent the rotation angles of the reference vector to the first feature point, the second feature point, and the twelfth feature point, respectively. With the Z axis as the rotation axis, they conform to the right-hand screw criterion and obtain the sine value of each feature point. Since the obtained angle cannot accurately obtain the specific rotation angle, a cosine judgment is also required.

[0101]

[0102] After finishing, we get:

[0103]

[0104] Based on the above lower sine, cosine and tangent information, the rotation angle (angle range 0 to 360°) between each vector (12 points to the center point) and the reference vector can be obtained, so that the clockwise rotation angle from the reference vector to each feature point can be accurately known. Figure 2B As shown, the feature points are numbered according to the size of the angle. The smaller the clockwise rotation angle from the reference vector to each feature point is, the larger the number is. That is, the clockwise rotation angle from the reference vector to the feature point is the smallest, and the feature point is numbered 12. The clockwise rotation angle from the reference vector to the feature point is the largest, and the feature point is numbered 1. And so on. After determining the numbers of all feature points, the marking of the feature points is completed.

[0105] In addition, when determining whether the target object meets the above three conditions, it is necessary to determine the position of the feature points and the position relationship of each feature point, specifically:

[0106] Determine whether the feature points in the target image are located within the circular ring; if the feature points in the target image are located within the circular ring, determine whether the feature points in the target image coincide with the corner points of the three rectangles within the circular ring; if the feature points in the target image coincide with the corner points of the three rectangles, determine whether the relative position relationship between the feature points meets the preset requirements.

[0107] Determine the actual position of the target area according to the target area; specifically, the actual position can be the above Figure 2A Chinese 2 The position of the plane,

[0108] The posture of the electronic device when landing is determined according to the target area of ​​the target image, the imaging plane of the target image and the actual position of the target area.

[0109] The target area of ​​the target image is the target area that appears in the image. Figure 2B The area shown in the figure, and the imaging plane of the target image is as above Figure 2A Chinese 1 The plane where the actual position is located can be the above Figure 2A Chinese 2 The position of the plane on which it is located. The above three factors are used to determine the posture of the electronic device when it lands.

[0110] In one embodiment, the above step S13 can be implemented as the following steps A1-A2:

[0111] In step A1, it is determined whether there is a target object matching a preset shape template in the target image;

[0112] In step A2, when there is a target object matching a preset shape template in the target image, if the number of feature points in the target object reaches a specific number and the relative position relationship between the feature points meets preset requirements, the target object is determined to be a target area in the target image used to characterize the landing position of the electronic device.

[0113] In this embodiment, when determining that the target object is a target area in the target image used to represent the landing position of the electronic device, the following three conditions need to be met at the same time:

[0114] Condition 1: There is a target object in the target image that matches the preset shape template; for example, the preset shape template can be a ring, or a ring and three equally spaced rectangles contained in the ring; Condition 2: The number of feature points in the target object reaches a specific number. For example, assuming that the target area is a ring and three equally spaced rectangles contained in the ring, then the specific number of feature points in the target object is 12; Condition 3: The relative position relationship between the feature points meets the preset requirements.

[0115] When the target object satisfies the above three conditions at the same time, the target object is determined to be a target area in the target image used to represent the landing position of the electronic device.

[0116] In one embodiment, the method can also be implemented as the following steps B1-B2:

[0117] In step B1, if the target image does not meet any target condition, the target image is deleted;

[0118] In step B2, an instruction for re-determining the target image is generated;

[0119] Among them, the target conditions include: there is no target object matching the preset shape template in the target image; the number of feature points in the target object does not reach a specific number; the relative position relationship between the feature points does not meet the preset requirements.

[0120] In this embodiment, when the target image does not satisfy any of the above-mentioned conditions (condition one, condition two and condition three), the target image is deleted; and an instruction to redefine the target image is generated.

[0121] In one embodiment, the target area is composed of a ring and three rectangles in the ring; the three rectangles are arranged at equal intervals, and the center point of the middle rectangle coincides with the center of the ring.

[0122] In one embodiment, the method can also be implemented as follows:

[0123] When the number of feature points exceeds a specific number, the feature points are eliminated based on a preset method until the number of feature points reaches the specific number.

[0124] In this embodiment, when the geometric shape of the target area is composed of a ring and three rectangles in the ring, the points with larger translation grayscale changes are the points corresponding to the four corners of the rectangles, and the number of feature points is 12. When the number of feature points exceeds a specific number, the feature points are removed based on a preset method until the number of feature points reaches a specific number (i.e., 12). When removing, two situations are considered: one is adjacent feature points, and the other is isolated feature points.

[0125] In one embodiment, the preset method is performed as follows:

[0126] In step C1, feature points are selected one by one as feature points to be removed;

[0127] In step C2, it is determined whether there is a target feature point in the target image whose distance from the feature point to be removed is less than a preset distance;

[0128] In step C3, when there is no target feature point in the target image whose distance from the feature point to be removed is less than a preset distance, the feature point to be removed is deleted.

[0129] This embodiment is used to eliminate isolated feature points. This feature point may be caused by a pixel interference source in the target area. This feature point is not near the theoretical target feature point. Therefore, the isolated feature point can be eliminated based on whether there are other feature points near the specific point.

[0130] In one embodiment, when there is a target feature point in the target image whose distance from the feature point to be removed is less than a preset distance, the preset method is performed as follows D1-D2:

[0131] In step D1, grayscale change parameter values ​​of the target feature point and the feature point to be removed are obtained;

[0132] In step D2, when the grayscale change parameter value of the target feature point is greater than the grayscale change parameter value of the feature point to be removed, the feature point to be removed is removed, otherwise the target feature point is removed.

[0133] This embodiment is used to eliminate adjacent feature points. Feature points may be estimated to be near the theoretical target feature points due to problems with the light source or the camera itself. Therefore, the grayscale change parameter values ​​of two adjacent points (such as the square difference of grayscale changes between two adjacent points and their surroundings) can be compared. Those with larger change parameter values ​​are retained, while those with smaller change parameter values ​​are eliminated.

[0134] In one embodiment, Figure 2C As shown, the method can also be implemented as the following steps S21-S23:

[0135] In step S21, it is determined whether the feature point in the target image is located within the ring;

[0136] In step S22, when the feature point in the target image is located within the circular ring, it is determined whether the feature point in the target image coincides with each corner point of the three rectangles within the circular ring;

[0137] In step S23, when the feature points in the target image coincide with the corner points of the three rectangles, it is determined that the relative positional relationship between the feature points meets the preset requirements.

[0138] In one embodiment, Figure 3 As shown, the above step S15 can be implemented as the following steps S31-S34:

[0139] In step S31, an imaging coordinate system of the target image is determined according to the imaging plane of the target image;

[0140] In step S32, a world coordinate system is established based on the plane where the actual position of the target area is located;

[0141] In step S33, the attitude angle information and relative position information of the world coordinate system relative to the imaging coordinate system are determined according to the coordinates of the feature points in the world coordinate system and the coordinates of the feature points projected onto the imaging plane of the target image;

[0142] In step S34, the target posture of the electronic device is determined according to the posture angle information and the relative position information.

[0143] In this embodiment, the target area of ​​the target image is the target area that appears in the image. Figure 2B The area shown in the figure, and the imaging plane of the target image is as above Figure 2A Chinese 1 The plane where the actual position is located can be the above Figure 2A Chinese 2 The position of the plane on which it is located. The above three factors are used to determine the posture of the electronic device when it lands.

[0144] Figure 4 For a landing scene, the drone needs to land on a ship's landmark. Then, we need to construct Figure 2A The coordinate system shown, that is, according to the imaging plane of the target image (π 1 The imaging coordinate system of the target image is determined based on the plane where the actual position of the target area is located (π 2 A world coordinate system is established according to the coordinates of the feature points in the world coordinate system and the coordinates of the feature points projected onto the imaging plane of the target image; and the target posture of the electronic device is determined according to the attitude angle information and the relative position information.

[0145] The details are as follows: Establish a relative posture 3*3 matrix model and establish a relative position information model between the actual coordinate points and the feature points:

[0146]

[0147] This solution provides 12 sets of feature information matching, among which the leftmost matrix (including X lpw , X 2pw The matrix with the same elements as X is the matrix of the feature points in the world coordinate system, and the matrix on the far right (including X 1P , X 2P The matrix with equal elements) is the matrix composed of the integer points in the imaging coordinate system of the target image, and the middle matrix (including h 11 、h 12The matrix with the same elements as above) is a homography matrix, which is a matrix used to characterize the correspondence between each element in the world coordinate system and each element in the imaging coordinate system.

[0148] Among them, when the elements corresponding to the world coordinate system and the imaging coordinate system are known, what needs to be solved is the intermediate homography matrix (including h 11 、h 12 The purpose of this matrix is ​​to solve the parameter values ​​from h11 to h32.

[0149] After obtaining the parameter values ​​from h11 to h32, in theory, the imaging plane is parallel to the horizontal plane, while the plane where the actual landing position is located usually has a certain angle with the imaging plane, and the relationship between the imaging plane and the actual landing position needs to be calculated. Specifically, it is necessary to calculate the angle relationship and position relationship of the three coordinate axes between the imaging coordinate system and the world coordinate system to determine how much the device to be landed needs to be adjusted on the three coordinate axes to correspond to the angle of the actual position corresponding to the target area, and how much distance each of the three coordinate axes needs to be offset to accurately land at the actual position corresponding to the target area. The details are as follows:

[0150] First: To simplify the description, the imaging plane is called π 1 plane, and call the plane where the actual position is located π 2 Plane, such as Figure 5 As shown, π 1 If the x-axis of the plane is extended, it will be aligned with the plane that falls on π 2 A straight line L1 of the plane intersects, and the relative angle is According to the above relative position information model of actual coordinate points and feature points, it can be determined that:

[0151]

[0152] Among them, Xw is the X axis of the world coordinate system, Yw is the Y axis of the world coordinate system, and the Z axis of the world coordinate system is set to 0, x p is the X-axis of the imaging coordinate system, and the matrix in the middle is the inverse matrix of the above homography matrix. Assuming f is the focal length of the camera, we can get:

[0153]

[0154] The above formula can be used to calculate φ, which is the angle at which the device to be landed (such as a drone, helicopter, etc.) needs to be deflected on the X-axis.

[0155] Similarly, if Figure 6 As shown, π 1 If the x-axis of the plane is extended, it will be aligned with the plane that falls on π 2The plane intersects with a straight line L2, and the relative angle is θ. According to the relative position information model of the actual coordinate point and the feature point, it can be determined that:

[0156]

[0157] Among them, Xw is the X axis of the world coordinate system, Yw is the Y axis of the world coordinate system, the Z axis of the world coordinate system is set to 0, y p is the Y axis of the imaging coordinate system, and the matrix in the middle is the inverse matrix of the above homography matrix. Assuming f is the focal length of the camera, we can get:

[0158]

[0159] Since all parameters except the relative angle θ are known, the relative angle θ can be calculated, that is, the angle that the landing device needs to rotate on the Y axis.

[0160] It is not difficult to understand that Figure 7 The relative angle ψ shown is the angle that the drone to be landed needs to rotate on the Z axis. The relative angle ψ is solved as follows:

[0161]

[0162] L w =(h 11 ,h 12 ,h 13 ) T

[0163] Finally, using L w The slope of the homogeneous coordinates is L w The same plane Y w , which is also the relative yaw angle ψ.

[0164] After obtaining the angles that need to be adjusted on the three coordinate axes of the device to be landed, it is also necessary to calculate the distances that the device to be landed needs to be offset on the three coordinate axes. The specific method is as follows:

[0165] Figure 8 is the imaging plane (π of the image coordinate system 1 plane) and the plane where the actual position is located (π of the world coordinate system 2 Schematic diagram of the relative position of the plane, π of the world coordinate system 2 PlaneX w π of the axis projection to the image coordinate system 1 plane l straight line, optical axis and O w The line connecting the two intersects at π 1 Plane at O′ w point, extend the straight line l from the light source point Oc The line connecting the two intersects at point p, when Op is parallel to X w The axis p is transmitted to π 2 The plane is infinite. Draw a parallel line through the light source point l and intersect at X W The extension line of the line is at point q, because the straight line l and X W The axes are coplanar, so only when the line l and X W When the axes are parallel, q is the infinite origin. Then, the corresponding relationship between the imaging coordinate system and the world coordinate system is:

[0166]

[0167] By O w The coordinates in the world coordinate system are (0, 0, 1) T , we can see that the corresponding image coordinate system O′ w The coordinates are as follows:

[0168]

[0169]

[0170] Light source point O c To O' w The distances are as follows:

[0171]

[0172] Light source point O c The distance to p is as follows:

[0173]

[0174] Let the coordinates of point q be And projected to π through point q 1 At infinity on the plane, we can get the following equation based on the homography:

[0175]

[0176]

[0177] Select the distance parameter calculated above, so we can get the following equation:

[0178]

[0179]

[0180] like Fig. 9 As shown, w Do it perpendicular to Z c The straight lines of the axis intersect at point O″, then O cO″ is the origin O in the world coordinate system w In the camera coordinate system, along Z c Directional position information, that is, depth information.

[0181]

[0182] Then the conversion relationship between the previously calculated image coordinate system and the camera coordinate system is shown in the following formula:

[0183]

[0184] Its position information along the other two axes in the camera coordinate system can be solved:

[0185]

[0186] Will Bring in:

[0187]

[0188] According to the internal parameters of the calibration camera, the coordinates of the 12 target feature points in the world coordinate system and their projection to the image coordinate system can be used to solve the three attitude angle information and position distance information of the world coordinate system relative to the camera coordinate system. Xc and Yc are the distances that the landing device needs to be offset on the X axis and Y axis respectively, and the depth information Zc is the distance that the landing device needs to be offset on the Z axis, that is, the landing height.

[0189] Fig.10 A block diagram of an electronic device according to an embodiment of the present application, such as Fig.10 As shown, the electronic device includes the following modules:

[0190] A first acquisition module 101 is used to acquire a target image and an imaging plane of the target image;

[0191] A second acquisition module 102 is used to acquire feature information in a target image, wherein the feature information in the target image includes feature points in the target image and a shape of a target object in the target image;

[0192] A first determining module 103, configured to determine a target area in the target image for representing a landing position of the electronic device according to feature information in the target image;

[0193] A second determination module 104, configured to determine an actual position of the target area according to the target area;

[0194] The third determination module 105 is used to determine the posture of the electronic device when it lands according to the target area of ​​the target image, the imaging plane of the target image and the actual position of the target area.

[0195] In one embodiment, the first determining module 103 includes:

[0196] A first determination submodule 111 is used to determine whether there is a target object matching a preset shape template in the target image;

[0197] The second determination submodule 112 is used to determine that the target object is a target area in the target image used to characterize the landing position of the electronic device if there is a target object matching the preset shape template in the target image and the number of feature points in the target object reaches a specific number and the relative position relationship between the feature points meets the preset requirements.

[0198] In one embodiment, it further includes:

[0199] A deletion module, used for deleting a target image when the target image does not meet any target condition;

[0200] A generating module, used for generating an instruction for re-determining a target image;

[0201] Among them, the target conditions include: there is no target object matching the preset shape template in the target image; the number of feature points in the target object does not reach a specific number; the relative position relationship between the feature points does not meet the preset requirements.

[0202] In one embodiment, the target area is composed of a ring and three rectangles in the ring; the three rectangles are arranged at equal intervals, and the center point of the middle rectangle coincides with the center of the ring.

[0203] In one embodiment, it further includes:

[0204] The elimination module is used to eliminate the feature points based on a preset method when the number of feature points exceeds a specific number until the number of feature points reaches the specific number.

[0205] In one embodiment, the default method is performed as follows:

[0206] Select feature points one by one as feature points to be removed;

[0207] Determine whether there is a target feature point in the target image whose distance from the feature point to be removed is less than a preset distance;

[0208] When there is no target feature point in the target image whose distance from the feature point to be removed is less than a preset distance, the feature point to be removed is deleted.

[0209] In one embodiment, when there is a target feature point in the target image whose distance from the feature point to be removed is less than a preset distance, the preset method is performed as follows:

[0210] Obtain the grayscale change parameter values ​​of the target feature points and the feature points to be removed;

[0211] When the grayscale change parameter value of the target feature point is greater than the grayscale change parameter value of the feature point to be removed, the feature point to be removed is deleted, otherwise the target feature point is deleted.

[0212] In one embodiment, it further includes:

[0213] A fourth determination module is used to determine whether the feature point in the target image is located within the ring;

[0214] a fifth determination module, for determining, when the feature point in the target image is located within the circular ring, whether the feature point in the target image coincides with each corner point of three rectangles within the circular ring;

[0215] The sixth determination module is used to determine whether the relative position relationship between the feature points meets the preset requirements when the feature points in the target image coincide with the corner points of the three rectangles.

[0216] In one embodiment, the third determination module includes:

[0217] A third determination submodule is used to determine an imaging coordinate system of the target image according to an imaging plane of the target image;

[0218] Establishing a submodule for establishing a world coordinate system based on the plane where the actual position of the target area is located;

[0219] A fourth determination submodule is used to determine the attitude angle information and relative position information of the world coordinate system relative to the imaging coordinate system according to the coordinates of the feature points in the world coordinate system and the coordinates of the feature points projected onto the imaging plane of the target image;

[0220] The fifth determination submodule is used to determine the target posture of the electronic device according to the posture angle information and the relative position information.

[0221] The present application also provides a drone, comprising:

[0222] processor;

[0223] A memory for storing executable instructions in the processor;

[0224] Wherein, the processor is configured to:

[0225] Execute the method corresponding to any one of the above embodiments.

[0226] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.

Claims

1. A method for determining landing posture, include: Acquire a target image and an imaging plane of the target image; Acquiring feature information in the target image, wherein the feature information in the target image includes feature points in the target image and a shape of a target object in the target image; Determining a target area in the target image for representing a landing position of the electronic device according to feature information in the target image; determining the actual position of the target area according to the target area; Determining the posture of the electronic device when it lands according to the target area of ​​the target image, the imaging plane of the target image, and the actual position of the target area; determining the target area in the target image for characterizing the landing position of the electronic device according to the feature information in the target image includes: Determine whether there is a target object matching the preset shape template in the target image; When there is a target object matching a preset shape template in the target image, if the number of feature points in the target object reaches a specific number and the relative position relationship between the feature points meets preset requirements, the target object is determined to be a target area in the target image used to characterize the landing position of the electronic device.

2. The method according to claim 1, further comprising: include: If the target image does not satisfy any target condition, deleting the target image; generating instructions for re-determining the target image; Among them, the target conditions include: there is no target object matching the preset shape template in the target image; the number of feature points in the target object does not reach a specific number; the relative position relationship between the feature points does not meet the preset requirements.

3. The method according to claim 1, wherein the target area is composed of a circular ring and three rectangles within the circular ring; in, The three rectangles are arranged at equal intervals, and the center point of the middle rectangle coincides with the center point of the circular ring.

4. The method according to claim 1, further comprising: include: When the number of feature points exceeds a specific number, the feature points are eliminated based on a preset method until the number of feature points reaches the specific number.

5. The method according to claim 4, wherein the preset mode is performed by the following steps: Selecting the feature points one by one as feature points to be removed; Determine whether there is a target feature point in the target image whose distance from the feature point to be removed is less than a preset distance; When there is no target feature point in the target image whose distance to the feature point to be removed is less than a preset distance, the feature point to be removed is deleted.

6. The method according to claim 5, when there is a target feature point in the target image whose distance from the feature point to be removed is less than a preset distance, the preset method is performed as follows: Obtaining grayscale change parameter values ​​of the target feature point and the feature point to be removed; When the grayscale change parameter value of the target feature point is greater than the grayscale change parameter value of the feature point to be removed, the feature point to be removed is deleted, otherwise the target feature point is deleted.

7. The method according to claim 3, further comprising: include: Determining whether a feature point in the target image is located within the annulus; In the case where the feature point in the target image is located within the circular ring, determining whether the feature point in the target image coincides with each corner point of three rectangles within the circular ring; In the case where the feature points in the target image coincide with the corner points of the three rectangles, it is determined that the relative positional relationship between the feature points meets the preset requirements.

8. The method according to any one of claims 2 to 7, wherein the posture of the electronic device when landing is determined according to the target area of ​​the target image, the imaging plane of the target image, and the actual position of the target area. include: Determining an imaging coordinate system of the target image according to the imaging plane of the target image; Establishing a world coordinate system based on the plane where the actual position of the target area is located; Determine the attitude angle information and relative position information of the world coordinate system relative to the imaging coordinate system according to the coordinates of the feature points in the world coordinate system and the coordinates of the feature points projected onto the imaging plane of the target image; The target posture of the electronic device is determined according to the posture angle information and the relative position information.

9. An electronic device, include: A first acquisition module, used to acquire a target image and an imaging plane of the target image; A second acquisition module is used to acquire feature information in the target image, wherein the feature information in the target image includes feature points in the target image and a shape of a target object in the target image; A first determining module, configured to determine a target area in the target image for representing a landing position of the electronic device according to feature information in the target image; A second determining module, used to determine the actual position of the target area according to the target area; A third determination module is used to determine the posture of the electronic device when it lands according to the target area of ​​the target image, the imaging plane of the target image and the actual position of the target area; The first determination module is further used to determine whether there is a target object matching the preset shape template in the target image; When there is a target object matching a preset shape template in the target image, if the number of feature points in the target object reaches a specific number and the relative position relationship between the feature points meets preset requirements, the target object is determined to be a target area in the target image used to characterize the landing position of the electronic device.