A method and system for positioning and attitude determination of flapping-wing aircraft

By using a feature point coordinate system connection method based on an off-body monocular camera, the load and aerodynamic performance problems caused by sensor installation in the positioning and attitude determination of flapping-wing aircraft are solved, and fast and stable attitude information acquisition is achieved.

CN119579687BActive Publication Date: 2025-12-02NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411424244.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2025-12-02
Estimated Expiration
2044-10-12

AI Technical Summary

Technical Problem

Existing technologies for positioning and attitude determination of flapping-wing aircraft face challenges in sensor data acquisition, increased load, and impact on aerodynamic performance. Traditional methods are inconvenient to apply to flapping-wing aircraft.

Method used

Images of flapping-wing aircraft are captured using an off-body monocular camera. The coordinate systems of the aircraft and the camera are connected by a feature point coordinate system to calculate the position and attitude of the target, thus avoiding the need to install sensors on the aircraft.

Benefits of technology

It enables the rapid and stable acquisition of continuous attitude information of flapping-wing aircraft without increasing the load on the aircraft, thereby improving the accuracy and efficiency of positioning and attitude determination.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119579687B_ABST
    Figure CN119579687B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for positioning and attitude determination of a flapping-wing aircraft, relating to the field of aircraft attitude monitoring. It utilizes images captured by an detached monocular camera to obtain continuous attitude information of the flapping-wing aircraft. By capturing video streams of the flapping-wing aircraft across multiple flapping cycles using an detached monocular camera, the image coordinates of moving feature points are obtained from a single frame in the video stream. The relationship between the feature point coordinate system and the camera coordinate system, as well as the relationship between the feature point coordinate system and the aircraft coordinate system, is determined, ultimately yielding the target's position and attitude in that frame. For a single video stream, multiple specific positions within a flapping cycle are selected to establish a feature point coordinate system, obtaining multiple sets of attitude information for that flapping cycle. The same processing is applied to other flapping cycles in the video stream, obtaining multiple sets of attitude information for multiple cycles. Then, polynomial interpolation is used to obtain more discrete attitude information. Finally, fitting the discrete attitude information yields the continuous attitude information of the flapping-wing aircraft. This method can conveniently obtain the position and attitude of a flapping-wing aircraft and has good application results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of attitude monitoring of flapping-wing aircraft, and in particular to a method and system for locating and determining the attitude of feature points. Background Technology

[0002] Currently, with the widespread application of drones and other aircraft in commercial, scientific research, and military fields, aircraft positioning and attitude determination technology has become a key factor in ensuring successful mission execution and improving operational safety. Rapid and stable positioning and attitude determination is particularly important, and traditional methods mainly consist of two parts:

[0003] I. Active Measurement: This method achieves positioning and attitude determination by mounting sensors such as inertial measurement units (IMUs), gyroscopes, accelerometers, and magnetometers on the target body; or by mounting image sensors on the target body and identifying artificially set landmarks in the surrounding environment.

[0004] 2. Passive measurement: By setting artificial markers or patterns (LEDs, QR codes, etc.) on the target, feature points are acquired on the ground by image sensors to determine the target's position and orientation.

[0005] For example, the patent "A Quasi-Dynamic Micro Air Vehicle Attitude Measurement Method and System" (publication number CN115200580A) is a patent for measuring the attitude of a flapping-wing aircraft using a gyroscope. In 2023, Yang Runmin of Shanghai Jiao Tong University introduced an attitude measurement algorithm for flapping-wing aircraft based on the fusion of airborne accelerometer and gyroscope data in his paper "AttitudeEstimation Algorithm of Flapping-Wing Micro Air Vehicle Based on Extended Kalman Filter," which achieved the purpose of filtering out flapping-wing platform jitter and estimating the true attitude. In 2020, Francesca Baldini of Caltech introduced a positioning and attitude determination technology that combines airborne image sensors and IMUs in her paper "Learning Pose Estimation for UAV Autonomous Navigation and Landing Using Visual-Inertial Sensor Data." Through testing on publicly available datasets, it was found that the attitude accuracy exceeded the average by 25%.

[0006] The two methods mentioned above are commonly used in fixed-wing and multi-rotor positioning and attitude determination. However, in the field of flapping-wing aircraft, the measurement methods are greatly limited. Specifically, firstly, due to the special flight mode of flapping-wing aircraft, their flapping mechanism generates much more severe instantaneous oscillations than traditional flight platforms, posing a great challenge to the data acquisition of airborne sensors; secondly, in active measurement methods, the need to mount sensors on the fuselage adds extra weight to the flapping-wing aircraft, which reduces its load capacity and motion stability; and in passive measurement methods, manually set markers such as LEDs require additional wiring, and pasting QR codes affects the aerodynamic performance of the flapping-wing aircraft. Moreover, both of these methods are very cumbersome in practical applications. Summary of the Invention

[0007] To address the above problems, this invention proposes a method and system for positioning and attitude determination of flapping-wing aircraft, which obtains continuous attitude information of the flapping-wing aircraft based on images captured by an off-body monocular camera.

[0008] The technical solution of this invention is as follows: Continuous pose information of a flapping-wing aircraft is obtained by capturing images of the aircraft using a detached monocular camera. The invention involves capturing video streams of the flapping-wing aircraft across multiple flapping cycles using a detached monocular camera. Image coordinates of moving feature points are obtained from a single frame in the video stream. After obtaining the feature points, a feature point coordinate system is established. The relationship between the feature point coordinate system and the camera coordinate system, as well as the relationship between the feature point coordinate system and the aircraft coordinate system, is determined. The feature point coordinate system is used as an intermediate coordinate system to connect the aircraft coordinate system and the camera coordinate system, ultimately obtaining the position and attitude of the target in a given frame. For a single video stream, multiple specific positions within one flapping cycle are selected to establish feature point coordinate systems, yielding multiple sets of pose information. The same processing is applied to other flapping cycles in the video stream to obtain multiple sets of pose information across multiple cycles. Polynomial interpolation is then used to obtain more discrete pose information. Finally, the continuous pose information of the flapping-wing aircraft is obtained by fitting the discrete pose information.

[0009] In a first aspect, the present invention provides a method for locating flapping-wing aircraft based on monocular vision, such as... Figure 7 As shown, proceed with the following steps:

[0010] Step 1: Determine the coordinates of the feature points in the body coordinate system at three special locations;

[0011] Step 2: Establish the corresponding feature point coordinate system and calculate the position and attitude information of the body coordinate system in the feature point coordinate system;

[0012] Step 3: Acquire target images using a monocular camera and perform preprocessing;

[0013] Step 4: Obtain the feature points and their corresponding pixel coordinates;

[0014] Step 5: Calculate the position and orientation information of the feature points in the camera coordinate system;

[0015] Step 6: Calculate the position and attitude information of the flapping-wing aircraft relative to the world coordinate system under the flapping cycle of the current position to achieve positioning and attitude determination;

[0016] Step 7: The camera follows the target's movement and updates the camera's pose relative to the world coordinate system. Steps 3 to 6 are repeated to obtain continuous pose information.

[0017] Secondly, the present invention provides an attitude determination and positioning system for flapping-wing aircraft based on monocular vision, comprising:

[0018] The camera calibration module is configured to calculate camera intrinsic parameters using the acquired calibration images;

[0019] The preprocessing module is configured to process the acquired image to obtain image blocks that can be used for pose calculation.

[0020] The feature extraction module is configured to perform linear feature traversal on the target image patch to obtain the target region;

[0021] The feature point localization module is configured to locate feature points, determine the feature points used for pose solving, and obtain the pixel coordinates of the feature points.

[0022] The feature point coordinate transformation module is configured to convert the coordinates in the feature point coordinate system to the coordinates in the camera coordinate system based on the transformation relationship between the pixel coordinates of the feature point and the coordinates of the feature point coordinate system.

[0023] The pose calculation module is configured to obtain the target's coordinates in the world coordinate system based on the coordinates of feature points in the camera coordinate system, thereby completing the target's pose determination and localization.

[0024] The preprocessing module is connected to the image acquisition device, and sequentially passes through the feature extraction module, the feature point localization module, and the feature point coordinate transformation module before connecting to the pose calculation module, which outputs the pose information.

[0025] The camera calibration module is connected to the feature point localization module, and a target tracking system is also provided between the preprocessing module and the pose calculation module.

[0026] Thirdly, the present invention provides a target tracking system, comprising:

[0027] The target detection module is configured to detect the target's location and status.

[0028] The target tracking module is configured to track the target's trajectory and predict its future location.

[0029] The control module is configured to adjust the movement of the camera platform according to the position of the target;

[0030] The target detection module, target tracking module, and control module are sequentially connected between the preprocessing module and the pose calculation module.

[0031] Fourthly, the present invention provides an image acquisition device, including at least one monocular camera, for acquiring a target image.

[0032] Fifthly, the present invention provides an electronic device including a memory and a processor, and computer instructions stored in the memory and running on the processor, wherein the computer instructions, when executed by the processor, perform the method described in the first aspect.

[0033] In a sixth aspect, the present invention provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, perform the method described in the first aspect.

[0034] This invention takes into account that solving the rotation and translation relationships between coordinate systems using a number of feature points is a mature technology. The innovation of this invention lies in the fact that it eliminates the need to install any information exchange device on the aircraft. Considering that the feature points of an ornithopter are not fixed during flight, three feature points at special locations are selected. At the moment the image is acquired, the relationship between the aircraft coordinate system and the camera coordinate system is constructed through an intermediate coordinate system (feature point coordinate system). The position and attitude of the target are then calculated. This invention can conveniently obtain the position and attitude of an ornithopter and has good application effects. Attached Figure Description

[0035] Figure 1 This is a schematic diagram illustrating the working principle of this case;

[0036] Figure 2 It is a temporary indication of flapping wings in a special position. Figure 1 ;

[0037] Figure 3 It is a temporary indication of flapping wings in a special position. Figure 2 ;

[0038] Figure 4 This is a schematic diagram of flapping wings in special position two;

[0039] Figure 5 This is a diagram showing the flapping wings in a special position three;

[0040] Figure 6 It is a schematic diagram of a camera calibration pattern;

[0041] Figure 7 This is the workflow diagram for this case;

[0042] Figure 8 This is a schematic diagram of the module structure of the positioning and attitude determination system in this case. Detailed Implementation

[0043] To clearly illustrate the technical features of this patent, the following detailed description is provided through specific embodiments and in conjunction with the accompanying drawings.

[0044] The basic principle of this invention is as follows: Given a set of points M with coordinates pi and qi in two different coordinate systems, if a 3×3 matrix R and a 3×1 matrix t can be obtained such that... The relative position and attitude relationship between the two coordinate systems can then be determined, where R contains the attitude relationship between the two coordinate systems and t contains the position relationship between the two coordinate systems.

[0045] Specifically, such as Figure 1 As shown, the long dashed line '——' represents the target's body coordinate system, the short dashed line '--' represents the feature point coordinate system (intermediate coordinate system), the long straight line '——' represents the camera coordinate system, and the dotted line '—·—' represents the world coordinate system. The position and attitude of the flapping-wing aircraft are obtained by finding the R and t matrices between the body coordinate system and the world coordinate system.

[0046] Follow these steps:

[0047] Step 1: Determine the coordinates of the feature points in the body coordinate system at three special locations;

[0048] Step 2: Establish the corresponding feature point coordinate system and calculate the position and attitude information of the body coordinate system in the feature point coordinate system;

[0049] Step 3: Acquire target images using a monocular camera and perform preprocessing;

[0050] Step 4: Obtain the feature points and their corresponding pixel coordinates;

[0051] Step 5: Calculate the position and orientation information of the feature points in the camera coordinate system;

[0052] Step 6: Calculate the position and attitude information of the flapping-wing aircraft relative to the world coordinate system under the flapping cycle of the current position to achieve positioning and attitude determination;

[0053] Step 7: The camera follows the target's movement and updates the camera's pose relative to the world coordinate system. Steps 3 to 6 are repeated to obtain continuous pose information.

[0054] In step 1, the specific location can be found in [reference needed]. Figure 2 , Figure 4 and Figure 5 , Figure 2 , Figure 4 and Figure 5 This is a schematic diagram illustrating the specific positions of three flapping-wing aircraft provided in embodiments of the present invention. Figure 2 For special position one, Figure 4 For special position two, Figure 5 Special position three corresponds to the upper limit position, lower limit position and horizontal position of the flapping-wing aircraft respectively; the coordinates in the body coordinate system are inherent properties of the flapping-wing aircraft, because the feature point is a point on the body, and the coordinates are fixed at each specific position.

[0055] In step 2, the feature point coordinate system is established based on the selected feature points, and the coordinates of the feature points in the feature point coordinate system are also known. The method for establishing the feature point coordinate system depends on the number of selected feature points and their positions in the body coordinate system; please refer to [reference needed]. Figure 2 , Figure 3 , Figure 4 and Figure 5 , Figure 2 and Figure 3 A method for establishing the coordinate system of feature points at a special location. Figure 4 This is a method for establishing the coordinate system of feature points at special location two. Figure 5 This is a method for establishing the coordinate system of feature points at a special location. It is understood that there are many rules for establishing the coordinate system of feature points, and all rules that can achieve the purpose of establishing the coordinate system of this invention are within the protection scope of this invention.

[0056] In step 3, the focal length, pixel width, distortion parameters, etc. of the monocular camera are all determined in advance; the preprocessing includes, but is not limited to: grayscale conversion, filtering, enhancement, and sharpening.

[0057] In actual use, the camera is initially fixed on a platform with a known position and attitude in the world coordinate system or on a controllable platform that can output the position and attitude information of the camera in the world coordinate system. Once the attitude of the camera relative to the world coordinate system is determined, the flapping-wing aircraft can be positioned and its attitude determined.

[0058] In step 4, the feature points and their corresponding pixel coordinates can be selected manually or by relevant algorithms, which is not limited here.

[0059] In step 5, the two-dimensional pixel space of the captured feature points and the camera coordinate system satisfy the inverse perspective mapping relationship; the inverse perspective mapping is related to the three-dimensional translation and rotation of the feature point coordinate system to the monocular camera coordinate system.

[0060] In step 6, the position and attitude information of the flapping-wing aircraft relative to the world coordinate system are obtained from the rotation and translation relationships between the camera coordinate system and the world coordinate system, between the feature point coordinate system and the camera coordinate system, and between the body coordinate system and the feature point coordinate system.

[0061] In step 7, following the target's motion involves using computer vision algorithms (such as YOLO, SSD, Faster R-CNN, etc.) to detect and identify the target's position in the image, using tracking algorithms (such as optical flow tracking, etc.) to maintain continuous tracking of the target, and using a controller (such as a PID controller) to calculate the adjustment angle or position of the camera platform so that the camera center is always aligned with the target. The controller's inputs are the x and y coordinates of the target center in the current frame image and the camera's current viewing angle, and its output is a control signal (such as the adjustment angle, etc.) used to drive the physical adjustment of the camera platform so that the camera's optical axis is aligned with the target, ensuring that the target is always in the center of the image; updating the camera's attitude is achieved by the inertial navigation system of the camera-fixed platform during the target tracking process or other methods and devices that can achieve similar purposes.

[0062] In the positioning and orientation method provided by this invention, the coordinate system is defined as follows:

[0063] The world coordinate system is fixed to the Earth. The origin of the world coordinate system is set according to requirements, X. w The axis is in the horizontal plane, and the direction of forward motion at takeoff is defined as positive. w The axis points vertically upwards towards the sky, Z w The direction of the axis is determined by the right-hand coordinate system;

[0064] Camera coordinate system X c The axis points to the right of the camera, Z c The axis points directly in front of the camera, Y c The axis direction is determined by the right-hand coordinate system;

[0065] The body coordinate system has its origin at the center of mass of the aircraft, X b The axis points in the direction of the aircraft's nose forward, Y b The axis points from the origin to the right side of the aircraft, Z. b The direction of the axis is determined by the right-hand rule;

[0066] The origin of the feature point coordinate system is located at the center of the plane containing the feature point, X f The axis lies in the plane and points towards the front of the fuselage, Y f The axis points to the right side of the fuselage in the plane, Z f The axis is determined by the right-hand rule.

[0067] In steps 3-6 of this invention, a video stream of the flapping-wing aircraft is captured by an off-body monocular camera during multiple flapping cycles. The image coordinates of the moving feature points are obtained from a frame of the video stream. After obtaining the feature points, a feature point coordinate system is established. The relationship between the feature point coordinate system and the camera coordinate system, as well as the relationship between the feature point coordinate system and the aircraft coordinate system, are obtained. The feature point coordinate system is used as an intermediate coordinate system to connect the aircraft coordinate system and the camera coordinate system. Finally, the position and attitude of the target in a certain frame are obtained.

[0068] In step 7 of this invention, for a video stream, multiple special positions within one flapping wing cycle are selected to establish a feature point coordinate system, and multiple sets of pose information are obtained. The same processing is performed on other flapping cycles in the video stream to obtain multiple sets of pose information under multiple cycles. Then, the continuous pose information of the flapping wing aircraft can be obtained through polynomial interpolation and fitting.

[0069] Before proceeding to step 3, perform camera calibration as follows:

[0070] (1) Print the marking pattern (such as a checkerboard pattern or dots) and attach it to the flat surface. Figure 6 It is a schematic diagram of a calibration pattern;

[0071] (2) Capture images from different directions by moving a plane or camera;

[0072] (3) Detect feature points in the image;

[0073] (4) Use Zhang Zhengyou's calibration method to solve for the five intrinsic parameters of the camera.

[0074] An optional step is to estimate camera distortion using the least squares method after step 4 to optimize all parameters.

[0075] The two-dimensional pixel space and camera coordinate system of the feature points captured in step 5 satisfy the inverse perspective mapping relationship;

[0076] The inverse perspective mapping relationship between the two-dimensional pixel space coordinates of a captured feature point M and its coordinates in the three-dimensional feature point coordinate system is as follows:

[0077]

[0078] Where s represents the depth information of point P in the camera coordinate system, i.e., the Z-axis position component; u and v are two-dimensional pixel coordinates; f x f is the focal length on the x-axis. y Let P be the focal length on the y-axis, u0 and v0 be the coordinates of the principal point on the camera imaging plane; R is the three-dimensional rotation matrix from the monocular camera coordinate system to the feature point coordinate system; b Let P be the coordinates of point P in the feature point coordinate system. b' represents the corresponding homogeneous coordinates; t represents the translation vectors ti in the three directions from the camera coordinate system to the feature point coordinate system. x , t y and t z K is the camera's intrinsic parameter matrix; T is the rotation and translation matrix between the world coordinate system and the monocular camera coordinate system.

[0079] In this matrix, the parameter values ​​are obtained through camera calibration (the calibration method is not limited), R and t are the parameters to be determined, s is a non-zero scale factor, which is represented by other known and unknown parameters during the monocular camera solution process and does not need to be obtained separately. u and v are determined after the image is acquired, and P... b This is known information;

[0080] When a certain feature point P is known b =(X f ,Y f Z f The matrix equation described above can be established as follows:

[0081]

[0082] The matrix equation described above is in its general form when there is only one feature point. When the number of feature points is n, where n is a positive integer greater than or equal to 3, n matrix equations about the feature points can be listed. Solving this is equivalent to solving n matrix equations, such as Figure 2 As shown, in this embodiment, n is 4; the solution method is related to the number and selection of feature points, and it is a mature technology, so it will not be described in detail here.

[0083] In step 5, the position and orientation information of the feature point coordinate system in the camera coordinate system are obtained using the following method:

[0084] By obtaining the image coordinates u and v of a moving feature point from a frame in the video stream, establishing a feature point coordinate system, and obtaining the 3D rotation matrix from the camera coordinate system to the feature point coordinate system, as well as the translation vectors in three directions from the camera coordinate system to the feature point coordinate system, the position and orientation of the feature point coordinate system in the camera coordinate system can be obtained.

[0085] In step 6, the target's position and attitude in the world coordinate system are calculated using the following formula, i.e., the matrix.

[0086] Among them, matrix This indicates the position and orientation of the feature point coordinate system within the camera coordinate system;

[0087] matrix This indicates the position and orientation of the target in the feature point coordinate system;

[0088] matrix This indicates the position and orientation of the monocular camera in the world coordinate system;

[0089] Within one flapping cycle There are three sets of values, representing the values ​​within one flapping cycle. There are three sets of values, which contain the attitude of the flapping-wing aircraft at three specific positions within a flapping cycle. By taking N cycles in a video stream to calculate the position and attitude, and then performing polynomial interpolation and fitting, the continuous position and attitude information of the flapping-wing aircraft over a period of time can be obtained.

[0090] In the above:

[0091] In practical applications, cameras are usually mounted on an attitude-controllable platform or fixed in a certain position, hence the transformation matrix between the camera coordinate system and the world coordinate system. It can be determined in advance or provided in real time by a controllable platform.

[0092] The solution to this problem is called the optimal absolute orientation problem. This problem describes the problem of finding the transformation matrix T between two coordinate systems given the coordinates of a set of points in two coordinate systems. The solution to this problem is well-established and will not be elaborated here. In this invention, "a set of points" refers to N selected feature points. These N feature points are inherent feature points on the target body as shown in the attached figure. The number of feature points is 4, but not limited to 4. In this invention, "two coordinate systems" refers to the body coordinate system and the feature point coordinate system. The coordinates of the feature points in the body coordinate system and the feature point coordinate system are known in advance.

[0093] and There are three different sets of values ​​within a flapping cycle, which is related to the selection of feature points. In this invention, three specific positions within the flapping cycle are selected to calculate the corresponding values. The values ​​are special position one, special position two, and special position three.

[0094] The solution to this problem is called the perspective N-point problem. This problem involves finding the position and orientation relationship between coordinate system O and the camera coordinate system, given the coordinates of N points in a coordinate system O and their pixel coordinates on the camera's imaging plane. The solution method varies depending on the number of feature points. This invention uses four feature points as an example, solving the problem given the coordinates of the four feature points in the feature point coordinate system and their pixel coordinates during imaging. However, changing the number of feature points to achieve a similar purpose also falls within the scope of this invention.

[0095] In step 7, the camera pose is updated using the following method. Since the camera only rotates the lens and does not move during tracking, only the rotation amount R is updated, and the translation amount t is not updated.

[0096] Assuming the target pose at time t has been solved, and if t=0 is the initial pose obtained from platform initialization, and the camera subsequently follows the target's movement, then the rotation increment of the camera coordinate system relative to the pose at time t+1 is ΔR. This increment can be obtained in the following way:

[0097] Subsequently, at time t+1, the camera follows the target to a new position, and at that time, the camera platform derives the camera's orbital path around the X-axis. c ,Y c Z c The angles of rotation of the shafts are Δθ x , Δθ y , Δθ z ;

[0098] Based on the relationship between the rotation angle increment around a single axis and the rotation matrix, we can obtain:

[0099]

[0100]

[0101]

[0102] The rotation increment of the camera attitude from time t to time t+1 is:

[0103] ΔR=ΔR z ·ΔR y ·ΔR x ,in,

[0104] After obtaining the rotation increment matrix, the camera pose at time t+1 can be derived from the camera pose R at time t. t Solving for the rotation increment from time t to time t+1: R t+1 =R t ·ΔR.

[0105] There are many specific ways to implement this invention. The above description is only a preferred embodiment of this invention. It should be noted that for those skilled in the art, several improvements can be made without departing from the principle of this invention, and these improvements should also be considered within the scope of protection of this invention.

Claims

1. A method for positioning and attitude determination of a flapping-wing aircraft, characterized in that, Follow these steps: Step 1: Determine the coordinates of the feature points in the body coordinate system at three special locations; Step 2: Establish the corresponding feature point coordinate system and calculate the position and attitude information of the body coordinate system in the feature point coordinate system; Step 3: Acquire target images using a monocular camera and perform preprocessing; Step 4: Obtain the feature points and their corresponding pixel coordinates; Step 5: Calculate the position and orientation information of the feature points in the camera coordinate system; Step 6: Calculate the position and attitude information of the flapping-wing aircraft relative to the world coordinate system under the flapping cycle of the current position to achieve positioning and attitude determination; Step 7: The camera follows the target's movement, while updating the camera's pose relative to the world coordinate system, and repeats steps 3 to 6 to obtain continuous pose information. In step 1, the special positions correspond to the upper limit position, lower limit position, and horizontal position of the flapping-wing aircraft, respectively. In step 5, the two-dimensional pixel space of the captured feature points and the camera coordinate system satisfy the inverse perspective mapping relationship; The inverse perspective mapping relationship between the two-dimensional pixel space coordinates of a captured feature point M and its coordinates in the three-dimensional feature point coordinate system is as follows: Where s represents the depth information of point M in the camera coordinate system, i.e., the Z-axis position component; u and v are two-dimensional pixel coordinates; f x f is the focal length on the x-axis. y Let P be the focal length on the y-axis, u0 and v0 be the coordinates of the principal point on the camera imaging plane; R is the three-dimensional rotation matrix from the monocular camera coordinate system to the feature point coordinate system; b Let P be the coordinates of point M in the feature point coordinate system. b ' represents the corresponding homogeneous coordinates; t represents the translation vectors ti in the three directions from the camera coordinate system to the feature point coordinate system. x , t y and t z K is the intrinsic parameter matrix of the camera; This represents the position and orientation of the feature point coordinate system within the camera coordinate system; In this matrix, the parameter values ​​are obtained through camera calibration (the calibration method is not limited), R and t are parameters to be determined, u and v are determined after image acquisition, and P... b This is known information; When a certain feature point P is known b =(X f ,Y f Z f The matrix equation described above can be established as follows: The matrix equation described above is in its general form when there is only one feature point. When the number of feature points is n, where n is a positive integer greater than or equal to 3, n matrix equations about the feature points can be listed. Solving this is equivalent to solving n matrix equations; By obtaining the image coordinates u and v of a feature point from a frame in the video stream, establishing a feature point coordinate system, and obtaining the 3D rotation matrix from the camera coordinate system to the feature point coordinate system, as well as the translation vectors in three directions from the camera coordinate system to the feature point coordinate system, the position and orientation of the feature point coordinate system in the camera coordinate system can be obtained. In step 6, the position and attitude information of the flapping-wing aircraft relative to the world coordinate system are obtained from the rotation and translation relationship between the camera coordinate system and the world coordinate system, the rotation and translation relationship between the feature point coordinate system and the camera coordinate system, and the rotation and translation relationship between the body coordinate system and the feature point coordinate system.

2. The method for positioning and attitude determination of a flapping-wing aircraft according to claim 1, characterized in that, In step 6, the target's position and attitude in the world coordinate system are calculated using the following formula, i.e., the matrix. Among them, matrix This indicates the position and orientation of the feature point coordinate system within the camera coordinate system; matrix This indicates the position and orientation of the target in the feature point coordinate system; matrix This indicates the position and orientation of the monocular camera in the world coordinate system; Within one flapping cycle There are three sets of values, representing the values ​​within one flapping cycle. There are three sets of values, which contain the attitude of the flapping-wing aircraft at three specific positions within a flapping cycle. By taking N cycles in a video stream to calculate the position and attitude, and then performing polynomial interpolation and fitting, the continuous position and attitude information of the flapping-wing aircraft over a period of time can be obtained.

3. The method for positioning and attitude determination of a flapping-wing aircraft according to claim 1, characterized in that, In step 7, following the target movement involves using computer vision algorithms to detect and identify the target's position in the image, using tracking algorithms to maintain continuous tracking of the target, and having the controller calculate the adjustment angle or position of the camera platform so that the camera center is always aligned with the target.

4. The method for positioning and attitude determination of a flapping-wing aircraft according to claim 3, characterized in that, In step 7, the camera pose is updated using the following method: the transformation matrix between the camera coordinate system and the world coordinate system. Assuming the target pose at time t has been solved, and if t=0 is the initial pose obtained from platform initialization, and the camera subsequently follows the target's movement, then the rotation increment of the camera coordinate system relative to the pose at time t+1 is ΔR. This increment is obtained as follows: Subsequently, at time t+1, the camera follows the target to a new position, and at that time, the camera platform derives the camera's orbital path around the X-axis. c ,Y c Z c The angles of rotation of the shafts are Δθ x , Δθ y , Δθ z ; Based on the relationship between the rotation angle increment around a single axis and the rotation matrix, we can obtain: The rotation increment of the camera attitude from time t to time t+1 is: ΔR=ΔR z ·ΔR y ·ΔR x , among them, After obtaining the rotation increment matrix, the camera pose at time t+1 can be derived from the camera pose R at time t. t Solving for the rotation increment from time t to time t+1: R t+1 =R t ·ΔR.

5. A positioning and attitude determination system for a flapping-wing aircraft to implement the method of claim 1, characterized in that, The positioning and attitude determination system is a monocular vision-based positioning and attitude determination system for flapping-wing aircraft, comprising: The camera calibration module is configured to calculate camera intrinsic parameters using the acquired calibration images; The preprocessing module is configured to process the acquired image to obtain image blocks that can be used for pose calculation. The feature extraction module is configured to perform linear feature traversal on the target image patch to obtain the target region; The feature point localization module is configured to locate feature points, determine the feature points used for pose solving, and obtain the pixel coordinates of the feature points. The feature point coordinate transformation module is configured to convert the coordinates in the feature point coordinate system to the coordinates in the camera coordinate system based on the transformation relationship between the pixel coordinates of the feature point and the coordinates of the feature point coordinate system. The pose calculation module is configured to obtain the target's coordinates in the world coordinate system based on the coordinates of feature points in the camera coordinate system, thereby completing the target's pose determination and localization. The preprocessing module is connected to the image acquisition device, and sequentially passes through the feature extraction module, the feature point localization module, and the feature point coordinate transformation module before connecting to the pose calculation module, which outputs the pose information. The camera calibration module is connected to the feature point localization module, and a target tracking system is also provided between the preprocessing module and the pose calculation module.

6. The positioning and attitude determination system for a flapping-wing aircraft according to claim 5, characterized in that, In step 7, the camera is controlled to follow the target's movement via a target tracking system, which includes: The target detection module is configured to detect the target's location and status. The target tracking module is configured to track the target's trajectory and predict its future location. The control module is configured to adjust the movement of the camera platform according to the position of the target; The target detection module, target tracking module, and control module are sequentially connected between the preprocessing module and the pose calculation module.

Citation Information

Patent Citations

  • Method and system for measuring attitude of quasi-dynamic micro aircraft

    CN115200580A

  • Method and apparatus for controlling unmanned aerial vehicle, and unmanned aerial vehicle

    WO2019183789A1

  • Track switching method and device

    WO2020024134A1