Positioning and attitude determination method and system for ornithopter
Through the combination of the ex vivo monocular camera and the characteristic point coordinate system, the rapid stability and system complexity of the positioning and positioning of the flapping aircraft are solved, and efficient posture monitoring is achieved.
Patent Information
- Application Number
- CN202411424244.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-10-12
AI Technical Summary
In the field of flapping aircraft, the traditional positioning and posture method is difficult to achieve fast and stable positioning and posture due to the challenges of airborne sensor data acquisition and the problems of additional load, and the passive measurement method is cumbersome.
An ex vivo monocular camera is used to take images of the flapping aircraft, and the body coordinate system and the camera coordinate system are connected through the feature point coordinate system, and the target position and posture are calculated to achieve the acquisition of continuous position information.
There is no need to install an information exchange device on the fuselage, which simplifies the system design and improves the positioning accuracy and application effect of the flapping aircraft.
Smart Images

Figure CN119579687A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of flapping-wing aircraft posture monitoring, and in particular to a method and system for positioning and determining the posture of a feature point. Background Art
[0002] At present, with the widespread application of drones and other aircraft in commercial, scientific and military fields, the positioning and attitude determination technology of aircraft has become a key factor in ensuring the successful execution of missions and improving operational safety. Fast and stable positioning and attitude determination is particularly important, and the traditional positioning and attitude determination methods are mainly divided into two parts:
[0003] 1. Active measurement: by installing sensors such as inertial measurement unit (IMU), gyroscope, accelerometer and magnetometer on the target body to achieve the purpose of positioning and attitude determination; or by installing image sensor on the target body and identifying the artificially set landmarks in the surrounding environment to achieve the purpose of positioning and attitude determination;
[0004] 2. Passive measurement: By setting artificial marking points or patterns (LED, QR code, etc.) on the target, the feature points are obtained through image sensors on the ground to determine the position and posture.
[0005] For example, "A Quasi-dynamic Micro Air Vehicle Attitude Measurement Method and System" publication number CN115200580A is a patent for measuring the attitude of flapping-wing aircraft through a gyroscope; in 2023, Yang Runmin of Shanghai Jiaotong University introduced a flapping-wing aircraft attitude measurement algorithm based on the fusion of airborne accelerometer and gyroscope data in the paper "Attitude Estimation Algorithm of Flapping-Wing Micro Air Vehicle Based on Extended Kalman Filter", which achieved the purpose of filtering out the jitter of the flapping-wing platform and estimating the true attitude; in 2020, Francesca Baldini of California Institute of Technology introduced the positioning and attitude determination technology that combines airborne image sensors and IMU in the paper "Learning Pose Estimation for UAV Autonomous Navigation and Landing Using Visual-Inertial Sensor Data". Through testing of public data sets, it was found that the attitude accuracy exceeded the average value by 25%.
[0006] The above two methods are usually widely used in the positioning and attitude determination of fixed-wing and multi-rotor aircraft, but in the field of flapping-wing aircraft, the measurement method is greatly restricted. Specifically, first, due to the special flight mode of flapping-wing aircraft, its flapping-wing mechanism will produce violent instantaneous oscillations far greater than those of traditional flight platforms, which brings great challenges to the data collection of airborne sensors; second, in the active measurement method, since the sensor needs to be installed on the fuselage, this will add extra weight to the flapping-wing aircraft, which will lead to a decrease in the load capacity and motion stability of the flapping-wing aircraft; and in the passive measurement method, manually set markers such as LEDs require additional working circuits, and pasting QR codes will affect the aerodynamic performance of the flapping-wing aircraft, and these two methods are very cumbersome in practical applications. Summary of the invention
[0007] In view of the above problems, the present invention proposes a method and system for positioning and determining the attitude of a flapping-wing aircraft, which obtains the continuous position and attitude information of the flapping-wing aircraft based on the image of the flapping-wing aircraft taken by a separate monocular camera.
[0008] The technical solution of the present invention is: based on the image of the flapping-wing aircraft taken by a detached monocular camera, the continuous posture information of the flapping-wing aircraft is obtained. The video stream of the flapping-wing aircraft in multiple flapping cycles is taken by a detached monocular camera, the image coordinates of the dynamic feature points are obtained from a certain frame image in the video stream, and after the feature points are obtained, a feature point coordinate system is established, and the relationship between the feature point coordinate system and the camera coordinate system and the relationship between the feature point coordinate system and the body coordinate system are obtained, so that the body coordinate system and the camera coordinate system are connected by the feature point coordinate system as an intermediate coordinate system, and finally the position and posture of the target in a certain frame are obtained; for a video stream, multiple special positions in a flapping cycle are selected to establish a feature point coordinate system, and multiple groups of posture information are obtained, and the same treatment is performed on other flapping cycles in the video stream to obtain multiple groups of posture information in multiple cycles, and then more discrete posture information is obtained by polynomial interpolation, and finally the discrete posture information is fitted to obtain the continuous posture information of the flapping-wing aircraft.
[0009] In a first aspect, the present invention provides a method for positioning a flapping-wing aircraft based on monocular vision, such as Figure 7 As shown, follow these steps:
[0010] Step 1, determine the coordinates of the feature points at three special positions in the body coordinate system;
[0011] Step 2: Establish the corresponding feature point coordinate system, and calculate the position and posture information of the body coordinate system in the feature point coordinate system;
[0012] Step 3: The monocular camera acquires the target image and performs preprocessing;
[0013] Step 4: Get the feature points and their corresponding pixel coordinates;
[0014] Step 5: Calculate the position and posture information of the feature point coordinate system in the camera coordinate system;
[0015] Step 6, calculating the position and attitude information of the flapping-wing aircraft relative to the world coordinate system in the flapping cycle of the current position, so as to achieve positioning and attitude determination;
[0016] Step 7: The camera follows the target movement, updates the camera's posture relative to the world coordinate system, and loops steps 3 to 6 to obtain continuous posture information.
[0017] In a second aspect, the present invention provides a flapping-wing aircraft attitude positioning system based on monocular vision, comprising:
[0018] A camera calibration module is configured to calculate camera intrinsic parameters through the acquired calibration image;
[0019] A preprocessing module is configured to process the acquired image to obtain an image block that can be processed for posture solution;
[0020] A feature extraction module is configured to perform a straight line feature traversal on the target image block to obtain a target area;
[0021] A feature point positioning module is configured to locate feature points, determine feature points used for pose solving, and obtain pixel coordinates of feature points;
[0022] A feature point coordinate conversion module is configured to convert the coordinates in the feature point coordinate system into the coordinates in the camera coordinate system according to the conversion relationship between the pixel coordinates of the feature point and the coordinates in the feature point coordinate system;
[0023] The pose solving module is configured to obtain the coordinates of the target in the world coordinate system according to the coordinates of the feature points in the camera coordinate system, and complete the pose positioning of the target;
[0024] The preprocessing module is connected to the image acquisition device, and is connected to the posture solving module through the feature extraction module, the feature point positioning module, and the feature point coordinate conversion module in sequence, and the posture solving module outputs the posture information;
[0025] The camera calibration module is connected to the feature point positioning module, and a target tracking system is also provided between the preprocessing module and the posture solving module.
[0026] In a third aspect, the present invention provides a target tracking system, comprising:
[0027] An object detection module configured to detect an object position and state;
[0028] A target tracking module is configured to track the target's motion trajectory and predict its future position;
[0029] a control module configured to adjust the movement of the camera platform according to the location of the target;
[0030] The target detection module, target tracking module and control module are sequentially connected between the preprocessing module and the posture solving module.
[0031] In a fourth aspect, the present invention provides an image acquisition device, comprising at least one monocular camera, for acquiring a target image.
[0032] In a fifth aspect, the present invention provides an electronic device comprising a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the method described in the first aspect is completed.
[0033] In a sixth aspect, the present invention provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, completes the method described in the first aspect.
[0034] The present invention takes into account that solving the rotation and translation relationship between coordinate systems by using different numbers of feature points is a mature technology in itself, and the innovation of the present invention lies in that there is no need to install any information exchange device on the body. In view of the fact that the feature points of flapping-wing aircraft are not fixed during the flight, feature points at three special positions are selected, and the relationship between the body coordinate system and the camera coordinate system is constructed through the intermediate coordinate system (feature point coordinate system) at the moment the image is acquired, so as to calculate the position and attitude of the target. This case can conveniently obtain the position and attitude of the flapping-wing aircraft, and the application effect is good. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 This is the working principle diagram 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 It is a schematic diagram of the flapping wing in special position two;
[0039] Figure 5 It is a schematic diagram of the flapping wing in special position three;
[0040] Figure 6 is a schematic diagram of a camera calibration pattern;
[0041] Figure 7 This is the workflow diagram of this case;
[0042] Figure 8 It is a schematic diagram of the module structure of the positioning and attitude determination system in this case. DETAILED DESCRIPTION
[0043] In order to clearly illustrate the technical features of this patent, this patent is elaborated in detail below through a specific implementation method and in combination with its accompanying drawings.
[0044] The basic principle of the present invention is: if the coordinates of a set of points M in two different coordinate systems are pi and qi, and a 3×3 matrix R and a 3×1 matrix t are obtained so that Then the relative position and posture relationship between the two coordinate systems can be determined, where R contains the posture relationship between the two coordinate systems and t contains the position relationship between the two coordinate systems.
[0045] Specific as Figure 1 As shown, the long dashed line '——' is the target body coordinate system, the short dashed line '--' is the feature point coordinate system (intermediate coordinate system), the long straight line '——' is the camera coordinate system, and the dotted line '—·—' is the world coordinate system. The position and attitude of the flapping-wing aircraft are 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 at three special positions in the body coordinate system;
[0048] Step 2: Establish the corresponding feature point coordinate system, and calculate the position and posture information of the body coordinate system in the feature point coordinate system;
[0049] Step 3: The monocular camera acquires the target image and performs preprocessing;
[0050] Step 4: Get the feature points and their corresponding pixel coordinates;
[0051] Step 5: Calculate the position and posture information of the feature point coordinate system in the camera coordinate system;
[0052] Step 6, calculating the position and attitude information of the flapping-wing aircraft relative to the world coordinate system in the flapping cycle of the current position, so as to achieve positioning and attitude determination;
[0053] Step 7: The camera follows the target movement, updates the camera's posture relative to the world coordinate system, and loops steps 3 to 6 to obtain continuous posture information.
[0054] In step 1, the special location can be found in Figure 2 , Figure 4 and Figure 5 , Figure 2 , Figure 4 and Figure 5 Schematic diagram of three special positions of flapping-wing aircraft provided by embodiments of the present invention, Figure 2 For special position one, Figure 4 For special position 2, Figure 5 It is special position three, which respectively corresponds to the upper limit position, lower limit position and horizontal position of the flapping-wing aircraft; the coordinates in the body coordinate system are inherent properties of the flapping-wing aircraft, because the feature points are points on the body, and the coordinates are certain 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 is related to the number of selected feature points and the positions of the feature points in the body coordinate system. Figure 2 , Figure 3 , Figure 4 and Figure 5 , Figure 2 and Figure 3 The method for establishing the coordinate system of the feature point at special position 1 is: Figure 4 This is the method for establishing the coordinate system of the feature point at special position 2. Figure 5 This is a method for establishing a feature point coordinate system at special position three. It can be understood that there are many rules for establishing a feature point coordinate system, and all of them are within the protection scope of the present invention as long as they can achieve the purpose of establishing the coordinate system of the present invention.
[0056] In step 3, the focal length, pixel width, distortion parameters, etc. of the monocular camera are determined in advance; the preprocessing includes but is not limited to: grayscale, 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. When the attitude of the camera relative to the world coordinate system is determined, the flapping-wing aircraft can be positioned and determined.
[0058] In step 4, the feature points and their corresponding pixel coordinates can be realized by manual selection or related 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 an 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 is obtained by the rotation and translation relationship 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, the following target motion is to use a computer vision algorithm (such as YOLO, SSD, Faster R-CNN, etc.) to detect and identify the position of the target in the image, use a tracking algorithm (such as optical flow tracking, etc.) to maintain continuous tracking of the target, and 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 input of the controller is the x, y coordinates of the target center on the current frame image and the current viewing angle of the camera, and the output is a control signal (such as an adjustment angle, etc.) for driving the physical adjustment of the camera platform so that the optical axis of the camera is aligned with the target, ensuring that the target is always in the center of the image; updating the camera posture is achieved by the inertial navigation system of the platform fixed by the camera during the target tracking process or other methods and devices that can achieve similar purposes.
[0062] In the positioning and attitude determination method provided by the present invention, the coordinate system is defined as follows:
[0063] The world coordinate system is fixed to the earth, and the origin of the world coordinate system is set according to the needs. w The Y axis is in the horizontal plane and is defined as pointing in the direction of travel during takeoff. w The axis points vertically upward toward the sky, Z w The directions of the axes are determined by a right-handed coordinate system;
[0064] Camera coordinate system X c The axis points to the right of the camera, Z c The Y axis points directly in front of the camera. c The axis directions are 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 Y axis points to the direction of the aircraft nose. b The axis points from the origin to the right side of the aircraft, Z b The axis directions are determined by the right-hand rule;
[0066] The origin of the feature point coordinate system is at the center of the plane where the feature point is located, X f The axis is in the plane and points to 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] When the present invention performs step 3 to step 6, a video stream of a flapping-wing aircraft in multiple flapping cycles is captured by an off-body monocular camera, and image coordinates of dynamic feature points are obtained from a certain frame image in the video stream. After the feature points are obtained, a feature point coordinate system is established, and 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 body coordinate system are obtained, so that the body coordinate system and the camera coordinate system are connected by using the feature point coordinate system as an intermediate coordinate system, and finally the position and posture of the target in a certain frame are obtained;
[0068] When the present invention performs step 7, for a video stream, multiple special positions within a flapping cycle are selected to establish a feature point coordinate system, and multiple sets of posture information are obtained. The same processing is performed on other flapping cycles in the video stream to obtain multiple sets of posture information under multiple cycles, and then the continuous posture information of the flapping-wing aircraft can be obtained through polynomial interpolation and fitting.
[0069] Before proceeding to step 3, calibrate the camera as follows:
[0070] (1) Print the calibration pattern (such as a chessboard or dots) and attach it to a flat surface. Figure 6 It is a schematic diagram of a calibration pattern;
[0071] (2) Capture images in different directions by moving the plane or camera;
[0072] (3) Detect feature points in the image;
[0073] (4) Use Zhang Zhengyou calibration method to solve the five intrinsic parameters of the camera.
[0074] An optional step is to estimate the camera distortion by a least squares method after step 4 to optimize all parameters.
[0075] The two-dimensional pixel space of the feature points captured in step 5 and the camera coordinate system 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 the coordinates of its three-dimensional space feature point coordinate system is:
[0077]
[0078] Among them, s is the depth information of point P in the camera coordinate system, that is, the Z-axis position component; u and v are two-dimensional pixel coordinates; f x is the focal length on the x-axis, f y is the focal length on the y-axis, u 0 and v 0 is the coordinate of the principal point of the camera imaging plane; R is the three-dimensional rotation matrix from the monocular camera coordinate system to the feature point coordinate system; P bis the coordinate value of point P in the feature point coordinate system, P b ' is the corresponding homogeneous coordinate; t is the translation vector t in 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; T is the rotation and translation matrix between the world coordinate system and the monocular camera coordinate system;
[0079] Among them, the parameter values in the matrix K 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 in the solution process of the monocular camera and does not need to be obtained separately. u and v are determined after the image is acquired. P b is known information;
[0080] When a feature point P is known b =(X f ,Y f ,Z f ), the above matrix equation is established as:
[0081]
[0082] The above matrix equation is the general form of a 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 is equivalent to solving n matrix equations, such as Figure 2 As shown, in this embodiment, n is 4 for illustration; the solution method is related to the number and selection of feature points, and is already a mature technology, which will not be repeated here.
[0083] In step 5, the position and posture information of the feature point coordinate system in the camera coordinate system are obtained by the following method:
[0084] Get the image coordinates u and v of the dynamic feature point from a certain frame of the video stream, establish the feature point coordinate system, obtain the three-dimensional rotation matrix from the camera coordinate system to the feature point coordinate system, and the translation vectors in three directions from the camera coordinate system to the feature point coordinate system, and then you can get the position and posture of the feature point coordinate system in the camera coordinate system.
[0085] In step 6, the position and posture of the target in the world coordinate system are calculated by the following formula, that is, the matrix
[0086] Among them, the matrix Represents the position and posture of the feature point coordinate system in the camera coordinate system;
[0087] matrix Represents the position and posture of the target in the feature point coordinate system;
[0088] matrix Represents the position and posture of the monocular camera in the world coordinate system;
[0089] Within one flapping cycle There are three sets of values, namely, There are three groups of values, which contain the attitude of the flapping-wing aircraft at three special positions in a flapping cycle. By taking N cycles in a video stream to solve 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, the camera is usually installed on a posture-controllable platform or fixed at a certain position, so the transformation matrix between the camera coordinate system and the world coordinate system is It can be determined in advance or given in real time by the controllable platform.
[0092] The solution is called the optimal absolute orientation problem, which describes the problem of solving the transformation matrix T between a set of points in two coordinate systems when their coordinate values are known. The solution to this problem is very mature and will not be expanded here. The "set of points" in the present invention refers to the selected N feature points, which are the inherent feature points on the target body as shown in the accompanying drawings. The number of feature points is 4, but not limited to 4. The "two coordinate systems" in the present invention refer 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 in a flapping cycle, which is related to the selection of feature points. The present invention selects three special positions in the flapping cycle to calculate the corresponding Values, namely special position one, special position two, and special position three.
[0094] The solution is called the perspective N-point problem. This problem means that the coordinates of N points in a certain coordinate system O and their pixel coordinates in the camera imaging plane are known, and the position and posture relationship between the coordinate system O and the camera coordinate system is solved. Depending on the number of feature points, the solution is different. In this invention, four feature points are taken as an example. The coordinates of the four feature points in the feature point coordinate system and the pixel coordinates when imaging are known are solved. However, changing the number of feature points to achieve similar purposes falls within the scope of the present invention.
[0095] In step 7, the camera posture is updated by 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 that the target pose at time t has been solved, if t = 0 is the initial pose initialized by the platform, and then the camera follows the target, then the rotation increment of the camera coordinate system at time t + 1 relative to the pose at time t is ΔR, which can be obtained by the following method:
[0097] Then, at time t+1, the camera follows the target to move to a new position, at which time the camera platform derives the camera's rotation around X. c ,Y c ,Z c The angles of rotation of the axis are Δθ x , Δθ y , Δθ z ;
[0098] According to the relationship between the rotation angle increment around a single axis and the rotation matrix, we can get:
[0099]
[0100]
[0101]
[0102] Then the rotation increment of the camera posture 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 posture at time t+1 can be obtained from the camera posture R at time t t And the rotation increment from time t to time t+1 is solved: R t+1 =R t ·ΔR.
[0105] There are many specific implementation ways of the present invention. The above is only the preferred implementation mode of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements can be made without departing from the principle of the present invention. These improvements should also be regarded as the protection scope of the present invention.
Claims
1. A method for positioning and determining the attitude of a flapping-wing aircraft, characterized in that: Follow these steps: Step 1, determine the coordinates of the feature points at three special positions in the body coordinate system; Step 2: Establish the corresponding feature point coordinate system, and calculate the position and posture information of the body coordinate system in the feature point coordinate system; Step 3: The monocular camera acquires the target image and performs preprocessing; Step 4: Get the feature points and their corresponding pixel coordinates; Step 5: Calculate the position and posture information of the feature point coordinate system in the camera coordinate system; Step 6, calculating the position and attitude information of the flapping-wing aircraft relative to the world coordinate system in the flapping cycle of the current position, so as to achieve positioning and attitude determination; Step 7: The camera follows the target movement, updates the camera's posture relative to the world coordinate system, and loops steps 3 to 6 to obtain continuous posture information.
2. A method for positioning and determining the attitude of a flapping-wing aircraft according to claim 1, characterized in that: In step 1, the special positions correspond to the upper limit position, the lower limit position and the horizontal position of the flapping-wing aircraft respectively.
3. A method for positioning and determining the attitude of a flapping-wing aircraft according to claim 1, characterized in that: 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 the coordinates of its three-dimensional space feature point coordinate system is: Among them, s is the depth information of point P in the camera coordinate system, that is, the Z-axis position component; u and v are two-dimensional pixel coordinates; f x is the focal length on the x-axis, f y is the focal length on the y-axis, u0 and v0 are the coordinates of the principal point of the camera imaging plane; R is the three-dimensional rotation matrix from the monocular camera coordinate system to the feature point coordinate system; P b is the coordinate value of point P in the feature point coordinate system, P b ' is the corresponding homogeneous coordinate; t is the translation vector t in 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; T is the rotation and translation matrix between the world coordinate system and the monocular camera coordinate system; Among them, the parameter values in the matrix K 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 in the solution process of the monocular camera and does not need to be obtained separately. u and v are determined after the image is acquired. P b is known information; When a feature point P is known b =(X f ,Y f ,Z f ), the above matrix equation is established as: The above matrix equation is the general form of a 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. The solution of is equivalent to solving n matrix equations; Get the image coordinates u and v of the dynamic feature point from a certain frame of the video stream, establish the feature point coordinate system, obtain the three-dimensional rotation matrix from the camera coordinate system to the feature point coordinate system, and the translation vectors in three directions from the camera coordinate system to the feature point coordinate system, and then you can get the position and posture of the feature point coordinate system in the camera coordinate system.
4. A method for positioning and determining the attitude of a flapping-wing aircraft according to claim 1, characterized in that: In step 6, the position and attitude information of the flapping-wing aircraft relative to the world coordinate system is obtained by the rotation and translation relationship 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.
5. A method for positioning and determining the attitude of a flapping-wing aircraft according to claim 4, characterized in that: In step 6, the position and posture of the target in the world coordinate system are calculated by the following formula, that is, the matrix Among them, the matrix Represents the position and posture of the feature point coordinate system in the camera coordinate system; matrix Represents the position and posture of the target in the feature point coordinate system; matrix Represents the position and posture of the monocular camera in the world coordinate system; Within one flapping cycle There are three sets of values, namely, There are three groups of values, which contain the attitude of the flapping-wing aircraft at three special positions in a flapping cycle. By taking N cycles in a video stream to solve 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.
6. A method for positioning and determining the attitude of a flapping-wing aircraft according to claim 1, characterized in that: In step 7, the following target movement is to use a computer vision algorithm to detect and identify the position of the target in the image, use a tracking algorithm to maintain continuous tracking of the target, and use a controller to calculate the adjustment angle or position of the camera platform so that the center of the camera is always aligned with the target.
7. A method for positioning and determining the attitude of a flapping-wing aircraft according to claim 6, characterized in that: In step 7, the camera pose is updated by the following method, that is, the transformation matrix between the camera coordinate system and the world coordinate system Assuming that the target pose at time t has been solved, if t = 0 is the initial pose initialized by the platform, and then the camera follows the target, then the rotation increment of the camera coordinate system at time t + 1 relative to the pose at time t is ΔR, which can be obtained by the following method: Then, at time t+1, the camera follows the target to move to a new position, at which time the camera platform derives the camera's rotation around X. c ,Y c ,Z c The angles of rotation of the shaft are Δθ x , Δθ y , Δθ z ; According to the relationship between the rotation angle increment around a single axis and the rotation matrix, we can get: Then the rotation increment of the camera posture 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 posture at time t+1 can be obtained from the camera posture R at time t t And the rotation increment from time t to time t+1 is solved: R t+1 =R t ·ΔR.
8. A flapping-wing aircraft positioning and attitude determination system for implementing the method described in claim 1, characterized in that: The attitude positioning system is a flapping-wing aircraft attitude positioning system based on monocular vision, comprising: A camera calibration module is configured to calculate camera intrinsic parameters through the acquired calibration image; A preprocessing module is configured to process the acquired image to obtain an image block that can be processed for posture solution; A feature extraction module is configured to perform a straight line feature traversal on the target image block to obtain a target area; A feature point positioning module is configured to locate feature points, determine feature points used for pose solving, and obtain pixel coordinates of feature points; A feature point coordinate conversion module is configured to convert the coordinates in the feature point coordinate system into the coordinates in the camera coordinate system according to the conversion relationship between the pixel coordinates of the feature point and the coordinates in the feature point coordinate system; The pose solving module is configured to obtain the coordinates of the target in the world coordinate system according to the coordinates of the feature points in the camera coordinate system, and complete the pose positioning of the target; The preprocessing module is connected to the image acquisition device, and is connected to the posture solving module through the feature extraction module, the feature point positioning module, and the feature point coordinate conversion module in sequence, and the posture solving module outputs the posture information; The camera calibration module is connected to the feature point positioning module, and a target tracking system is also provided between the preprocessing module and the posture solving module.
9. A flapping-wing aircraft positioning and attitude determination system according to claim 8, characterized in that: In step 7, the camera is controlled to follow the target movement by a target tracking system, and the target tracking system includes: An object detection module configured to detect an object position and state; A target tracking module is configured to track the target's motion trajectory and predict its future position; a control module configured to adjust the movement of the camera platform according to the location of the target; The target detection module, target tracking module and control module are sequentially connected between the preprocessing module and the posture solving module.
Citation Information
Patent Citations
Method and system for measuring attitude of quasi-dynamic micro aircraft
CN115200580A
Extension target tracking method based on geometric proportion relation
CN103839274A
Method and equipment for estimating pose on line based on time delay
CN111308415A
Robot visual servo operation method based on finite time control
CN116872216A
Information processing device, information processing method, and program
US20230254588A1