High-speed image acquisition and processing method for adjusting flight attitude of unmanned aerial vehicle
Through high-speed image acquisition and processing methods, combined with Harris corner point algorithm and PID controller, the problems of low accuracy, slow response and large calculations in drone flight attitude adjustment are solved, and more efficient and more stable drone flight control is achieved.
Patent Information
- Application Number
- CN202411857755.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-03-25
AI Technical Summary
There are problems of low accuracy, slow response and high calculation in the flight attitude adjustment of existing drones, resulting in low real-time and efficiency of attitude control.
High-speed image acquisition and processing methods are adopted, feature detection is performed through the Harris corner point algorithm, corner point features are identified in the image, and the position information of the drone relative to the target area is obtained through center of mass calculation and coordinate transformation, control instructions are generated and transmitted through the mavlink protocol, and control response is optimized using the PID controller and the gain controller.
It improves the stability and safety of drone flight, enhances the accuracy of position information, shortens the response time of control instructions, optimizes the use of computing resources, and improves the adaptability and robustness of control.
Smart Images

Figure CN119690127A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicle flight control, and more specifically, to a high-speed image acquisition and processing method for adjusting the flight attitude of an unmanned aerial vehicle. Background Art
[0002] In the process of UAVs performing various tasks, the adjustment of flight attitude is crucial. UAVs need to adjust their flight attitude in real time according to mission requirements and on-site environment to ensure the smooth progress of the mission. High-speed image acquisition and processing methods can provide strong support for the flight attitude adjustment of UAVs. By real-time acquisition and processing of image information, UAVs can accurately obtain their own key parameters such as position, speed, attitude, and make corresponding adjustments based on this information.
[0003] The existing technology has problems of low precision, slow response and large amount of calculation in the flight attitude adjustment of UAV, resulting in low real-time and efficiency of attitude control. Summary of the invention
[0004] In order to overcome the above technical defects of the prior art, the present invention designs a patented technical solution of a high-speed image acquisition and processing method for adjusting the flight posture of a UAV, which can effectively solve the above technical problems.
[0005] In order to solve the above technical problems, the technical solution of the present invention is as follows:
[0006] A high-speed image acquisition and processing method for adjusting the flight attitude of an unmanned aerial vehicle comprises the following steps:
[0007] Starting a high-speed camera to continuously collect image data of the UAV during flight at a fixed frame rate, wherein the image data includes real-time position and attitude information of the UAV relative to a predetermined path;
[0008] Receive the collected image data, and use Harris corner algorithm to perform feature detection on the image data to identify corner features in the image, wherein the feature detection is based on the grayscale gradient and corner response value of the image data;
[0009] Performing centroid calculation on the identified corner features to determine the geometric center of each corner feature, wherein the centroid calculation is based on the coordinate average of the corner features;
[0010] According to the centroid calculation result, the corner point features are classified, and according to the relative position information between the drone and the target area, the amount of calculation of the image data processing is reduced;
[0011] Perform coordinate transformation in the target coordinate system O, the high-speed camera coordinate system C and the drone fuselage coordinate system B to obtain the position information of the drone relative to the target area, wherein the coordinate transformation includes rotation and translation transformation;
[0012] Generate a control instruction based on the obtained posture information, and transmit the control instruction to the flight controller through the MavLink protocol, wherein the control instruction includes the desired attitude angle and the desired angular velocity of the UAV;
[0013] The gain controller is used to classify the attitude angle difference into deviation angle levels, and the gain coefficient is dynamically adjusted according to the deviation angle level to optimize the control response;
[0014] Using a PID controller to perform PID control according to the adjusted gain coefficient, the desired attitude angle and the current attitude angle, and calculate a new desired angular velocity, wherein the PID control includes proportional, integral and differential control;
[0015] The mixer outputs the PWM motor driver control signal to the actuator according to the three-axis torque control signal output by the PID controller and the drone model to control the attitude of the drone.
[0016] Preferably, the feature detection of the image data using the Harris corner algorithm to identify corner features in the image, the feature detection based on the grayscale gradient and corner response value of the image data further includes:
[0017] The performing feature detection on the image data by using the Harris corner algorithm to identify corner features in the image comprises:
[0018] Set the parameters of Harris corner algorithm;
[0019] Applying a corner tracking algorithm to track corner features between consecutive frames of the image data;
[0020] The feature detection based on the grayscale gradient and corner point response value of the image data includes:
[0021] Grayscale gradient calculation of image data;
[0022] Construct the structure tensor matrix;
[0023] Calculate the corner point response value;
[0024] Thresholding and non-maximum suppression.
[0025] Preferably, the calculating the centroid of the identified corner point features further comprises:
[0026] For each corner feature, calculate the average coordinates of all its pixels as the centroid coordinates of the corner feature;
[0027] According to the centroid coordinates, the corner point features are located in the image data, providing a basis for subsequent classification and processing.
[0028] Preferably, the step of classifying corner point features according to the centroid calculation result further comprises:
[0029] According to the centroid coordinates of the corner point features and the relative position information between the drone and the target area, the corner point features are divided into different categories;
[0030] According to the classification results, the corner features of a specific category are selectively processed to reduce the computational complexity of image data processing.
[0031] Preferably, the coordinate transformation in the target coordinate system O, the high-speed camera coordinate system C and the drone body coordinate system B further comprises:
[0032] Determine the relative position and attitude between the target coordinate system O, the high-speed camera coordinate system C and the drone body coordinate system B;
[0033] Using a homogeneous transformation matrix to represent the rotation and translation transformation between the coordinate systems;
[0034] By solving the internal and external parameters of the high-speed camera, the transformation matrix from the high-speed camera coordinate system C to the drone body coordinate system B is obtained;
[0035] Using the position of the corner feature in the target coordinate system O and the imaging position in the high-speed camera coordinate system C, the transformation matrix from the target coordinate system O to the high-speed camera coordinate system C is calculated through triangulation.
[0036] Preferably, the step of classifying the attitude angle difference into deviation angle grades by the gain controller further comprises:
[0037] Calculating the difference between the current attitude angle and the desired attitude angle, i.e., the attitude angle difference;
[0038] According to the size of the attitude angle difference, it is divided into different deviation angle levels;
[0039] According to the deviation angle level, the proportional, integral and differential gain coefficients of the PID controller are dynamically adjusted.
[0040] Preferably, the step of performing PID control using a PID controller according to the adjusted gain coefficient, the desired attitude angle and the current attitude angle to calculate a new desired angular velocity further comprises:
[0041] Calculate the input error of the PID controller based on the adjusted gain coefficient, the desired attitude angle and the current attitude angle;
[0042] According to the proportional, integral and differential gains of the PID controller, the output of the PID controller, i.e. the new desired angular velocity, is calculated;
[0043] The new desired angular velocity is used as the input of the mixer for subsequent control signal generation.
[0044] Preferably, the mixer outputs a PWM motor driver control signal to the actuator according to the three-axis torque control signal output by the PID controller and the drone model, so as to control the attitude of the drone further comprising:
[0045] Calculate the expected speed of each motor based on the three-axis torque control signal output by the PID controller and the drone model information;
[0046] Convert the desired speed into a duty cycle of a PWM signal;
[0047] The PWM signal is output to the actuator through the PWM motor driver to control the attitude adjustment of the drone.
[0048] An electronic device, comprising:
[0049] A memory storing executable program code;
[0050] a processor coupled to the memory;
[0051] The processor calls the executable program code stored in the memory to execute the high-speed image acquisition and processing method for adjusting the flight attitude of the unmanned aerial vehicle as described above.
[0052] A computer storage medium stores computer instructions, which, when called, are used to execute the high-speed image acquisition and processing method for adjusting the flight attitude of a drone as described above.
[0053] Compared with the prior art, the invention has the following beneficial effects: through high-speed image acquisition and processing technology, the flight attitude of the UAV is monitored in real time, and the flight attitude is adjusted quickly, thereby improving the stability and safety of the UAV flight; Harris corner point algorithm is used for feature detection to identify corner point features in the image; based on the grayscale gradient of the image and the corner point response value, the accuracy of the posture information is improved; through coordinate transformation and rapid generation of control instructions, and efficient transmission of the MavLink protocol, the response speed of the control instructions is accelerated; the use of the PID controller performs PID control according to the adjusted gain coefficient, the expected attitude angle and the current attitude angle, calculates the new expected angular velocity, and improves the response speed of the system; the corner point features are calculated by the centroid calculation result; The features are classified and the computational complexity of image data processing is reduced according to the relative position information between the UAV and the target area. This method effectively reduces the computing resources required for processing image data and improves processing efficiency. The gain controller divides the attitude angle difference into deviation angle levels and dynamically adjusts the gain coefficient according to the deviation angle level to optimize the control response. This dynamic adjustment mechanism enables the control system to adapt to different flight conditions and external disturbances, improving the adaptability and robustness of the control. The mixer outputs the PWM motor driver control signal to the actuator based on the three-axis torque control signal output by the PID controller and the UAV model to control the attitude of the UAV. This method improves the accuracy of UAV attitude adjustment through precise torque control. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived based on the provided drawings without paying any creative work.
[0055] Figure 1 The present invention is a step-by-step diagram of a high-speed image acquisition and processing method for adjusting the flight attitude of a UAV. DETAILED DESCRIPTION
[0056] The drawings are for illustrative purposes only and should not be construed as limiting the present patent;
[0057] In order to better illustrate the present embodiment, some parts in the drawings may be omitted, enlarged or reduced, and do not represent the size of the actual product;
[0058] It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.
[0059] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0060] Example
[0061] A high-speed image acquisition and processing method for adjusting the flight attitude of a UAV, such as Figure 1 As shown, the following steps are included:
[0062] Start the high-speed camera to continuously collect image data of the UAV during flight at a fixed frame rate, wherein the image data includes the real-time position and attitude information of the UAV relative to the predetermined path; configure the high-speed camera parameters to adapt to the lighting changes and speed requirements of the UAV flight environment; synchronize the trigger signal of the high-speed camera with the flight controller of the UAV to ensure the consistency of the image data and the flight status.
[0063] Receive the collected image data, and use Harris corner algorithm to perform feature detection on the image data to identify corner features in the image, wherein the feature detection is based on the grayscale gradient and corner response value of the image data;
[0064] Performing centroid calculation on the identified corner features to determine the geometric center of each corner feature, wherein the centroid calculation is based on the coordinate average of the corner features;
[0065] According to the centroid calculation result, the corner point features are classified, and according to the relative position information between the drone and the target area, the amount of calculation of the image data processing is reduced;
[0066] Perform coordinate transformation in the target coordinate system O, the high-speed camera coordinate system C and the drone fuselage coordinate system B to obtain the position information of the drone relative to the target area, wherein the coordinate transformation includes rotation and translation transformation;
[0067] Based on the obtained posture information, a control instruction is generated and transmitted to the flight controller through the MavLink protocol. The control instruction includes the expected attitude angle and expected angular velocity of the UAV. The real-time posture information of the UAV is obtained through sensors carried by the UAV, such as GPS, IMU, etc., including the position latitude, longitude, altitude and attitude pitch angle, roll angle, and yaw angle.
[0068] The gain controller is used to classify the attitude angle difference into deviation angle levels, and the gain coefficient is dynamically adjusted according to the deviation angle level to optimize the control response;
[0069] Using a PID controller to perform PID control according to the adjusted gain coefficient, the desired attitude angle and the current attitude angle, and calculate a new desired angular velocity, wherein the PID control includes proportional, integral and differential control;
[0070] The mixer outputs the PWM motor driver control signal to the actuator according to the three-axis torque control signal output by the PID controller and the drone model to control the attitude of the drone.
[0071] The feature detection of the image data by using the Harris corner algorithm to identify the corner features in the image, wherein the feature detection is based on the grayscale gradient and the corner response value of the image data and further includes:
[0072] The performing feature detection on the image data by using the Harris corner algorithm to identify corner features in the image comprises:
[0073] Set the parameters of the Harris corner algorithm, including the corner response threshold and the scale of non-maximum suppression;
[0074] Applying a corner tracking algorithm to track corner features between consecutive frames;
[0075] The feature detection based on the grayscale gradient and corner point response value of the image data includes:
[0076] Calculation of grayscale gradient of image data; Harris corner detection algorithm is to use a local window to move on the image data to determine whether the grayscale has changed significantly. This process first needs to calculate the gradient of the image data, which is usually implemented using filters such as Sobel. The image data gradient can be represented by differentials or derivatives. For digital images, differences are usually used to approximate derivatives. Commonly used gradient operators include Prewitt operator, Sobel operator, etc.
[0077] Construct a structure tensor matrix; after calculating the gradient of the image data, the Harris algorithm further analyzes the grayscale changes in the local area by constructing a structure tensor matrix M, which includes the gradient amplitude and gradient direction information of each pixel.
[0078] The elements of the structure tensor matrix M are composed of the covariance matrix of the gradient of the image data, including Ix 2 , Iy2 and IxIy, where Ix and Iy represent the gradients in the x and y directions respectively.
[0079] Calculate the corner response value; the response function R of Harris corner detection is calculated based on the eigenvalue of the structure tensor matrix M.
[0080] The calculation formula of the response function R is: R = det(M)-k*(trace(M))2,
[0081] Where k is a constant, det(M) represents the determinant of the matrix M, trace(M) represents the trace of the matrix M (i.e., the sum of the diagonal elements), and k is a constant, usually between 0.04 and 0.06. The response value describes the possibility of each pixel in the image data becoming a corner point. When the response function R value is large, it indicates that the point is a corner point.
[0082] Threshold processing and non-maximum suppression: For the calculated response value R of each pixel, a threshold is set to determine which pixels are corner points. If the R value is greater than this threshold, the point is considered to be a corner point.
[0083] Non-Maximum Suppression (NMS) is a commonly used technique to ensure the accuracy of corner points. It suppresses the responses of non-corner points by comparing the response value of each corner point with the values in the surrounding neighborhood and retaining only the local maximum value.
[0084] The centroid calculation of the identified corner point features further includes:
[0085] For each corner feature, calculate the average coordinates of all its pixels as the centroid coordinates of the corner feature;
[0086] According to the centroid coordinates, the corner features are located in the image, providing a basis for subsequent classification and processing.
[0087] Identify corners, using techniques such as the Harris corner detection algorithm to identify corners in the image.
[0088] Centroid calculation, for each identified corner point, determine the set of pixels in its neighborhood, and calculate the average of the x- and y-coordinates of these pixels. This average, that is, (the average of the x-coordinates, the average of the y-coordinates) is the centroid of the corner point feature, that is, its geometric center.
[0089] Specifically, if the corner feature is represented by a series of pixels (x1, y1), (x2, y2), ..., (xn, yn), then the centroid (Cx, Cy) can be calculated by the following formula:
[0090] Cx=(x1+x2+…+xn) / n; Cy=(y1+y2+…+yn) / n
[0091] Among them, n is the number of pixels in the neighborhood of the corner point. In this way, the centroid of each corner point feature can be obtained, which can be used for subsequent image analysis and drone attitude adjustment.
[0092] The classification of corner point features according to the centroid calculation result further includes:
[0093] According to the centroid coordinates of the corner point features and the relative position information between the drone and the target area, the corner point features are divided into different categories, such as foreground features, background features, etc.
[0094] According to the classification results, the corner features of a specific category are selectively processed to reduce the computational complexity of image data processing.
[0095] The application step of the centroid calculation result is to classify each corner point feature obtained by the centroid calculation according to its centroid position (Cx, Cy). For example, it can be divided into multiple categories according to the position area of the centroid in the image data, such as the near target area, the far target area or other related areas. According to the flight mission and target positioning requirements of the UAV, determine which categories of corner point features are most critical for flight attitude adjustment.
[0096] The computational reduction step prioritizes the corner feature categories that are most directly related to the adjustment of the UAV's flight attitude based on the UAV's current flight attitude and the relative position of the target. For example, if the UAV needs to approach the target, it may prioritize the corner features located in the near-target area, ignoring or reducing the processing priority of corner features that are less relevant to the flight attitude adjustment, or completely excluding these corner features, thereby reducing the computational complexity of image processing. According to the real-time flight status of the UAV and the target dynamics, the processing priority of the corner features is adjusted in real time to optimize the use of computing resources.
[0097] The coordinate transformation in the target coordinate system O, the high-speed camera coordinate system C and the drone fuselage coordinate system B further includes:
[0098] Determine the relative position and attitude between the target coordinate system O, the high-speed camera coordinate system C and the UAV body coordinate system B; use a calibration plate of known size for calibration to determine the relative position and attitude between the high-speed camera coordinate system C and the UAV body coordinate system B; use machine vision technology to determine the relative position and attitude between the target coordinate system O and the high-speed camera coordinate system C by identifying specific marks or feature points in the target area.
[0099] A homogeneous transformation matrix is used to represent the rotation and translation transformation between the coordinate systems; a 4x4 homogeneous transformation matrix is constructed, which includes a rotation matrix and a translation vector; the rotation matrix represents the rotational posture of the drone relative to the target area through Euler angles or quaternions; the translation vector represents the position of the origin of the drone body coordinate system B relative to the origin of the target coordinate system O.
[0100] By solving the internal and external parameters of the high-speed camera, the transformation matrix from the high-speed camera coordinate system C to the UAV body coordinate system B is obtained; the internal parameters include the focal length and principal point coordinates of the high-speed camera; the external parameters include the rotation and translation parameters of the high-speed camera relative to the UAV body coordinate system B; through the calibration process, the internal and external parameters of the high-speed camera are solved using calibration plate images under multiple viewing angles.
[0101] The transformation matrix from the target coordinate system O to the high-speed camera coordinate system C is calculated by triangulation using the position of the feature points in the target coordinate system O and the imaging position in the high-speed camera coordinate system C. The principle of multi-view geometry is adopted to perform triangulation by matching feature points under at least two different viewing angles. The transformation matrix from the target coordinate system O to the high-speed camera coordinate system C is constructed using the solved triangulation results. The internal parameters of the high-speed camera are combined to improve the accuracy of triangulation.
[0102] The generating of the control instruction according to the obtained posture information further comprises:
[0103] Calculate the expected attitude angle and expected angular velocity of the UAV according to the position information of the UAV relative to the target area;
[0104] Encode the desired attitude angle and desired angular velocity into the control instruction format of the MavLink protocol;
[0105] Transmit control commands to the flight controller via wireless communication modules such as Wi-Fi, 4G / 5G, etc., or wired communication interfaces such as FTDI USB to TTL cable.
[0106] The step of performing deviation angle classification on the attitude angle difference by the gain controller further comprises:
[0107] Calculate the difference between the current attitude angle and the expected attitude angle, that is, the attitude angle difference;
[0108] According to the size of the attitude angle difference, it is divided into different deviation angle levels;
[0109] According to the deviation angle level, the proportional (P), integral (I) and differential (D) gain coefficients of the PID controller are dynamically adjusted.
[0110] For example, when the deviation angle is large, the proportional gain is increased to quickly respond to the deviation; when the deviation angle is small, the differential gain is increased to reduce overshoot and improve stability.
[0111] PID controller is a feedback controller widely used in industry and engineering. It calculates the control signal based on the system error, that is, the difference between the expected value and the actual value, to adjust the behavior of the system. PID is the acronym of the three words proportional, integral, and derivative, representing the three basic control functions in the controller.
[0112] The method of using the PID controller to perform PID control according to the adjusted gain coefficient, the desired attitude angle and the current attitude angle to calculate the new desired angular velocity further includes:
[0113] Calculate the input error of the PID controller based on the adjusted gain coefficient, the desired attitude angle and the current attitude angle;
[0114] According to the proportional, integral and differential gains of the PID controller, the output of the PID controller, i.e. the new desired angular velocity, is calculated;
[0115] The new desired angular velocity is used as the input of the mixer for subsequent control signal generation.
[0116] Input parameters: adjusted gain coefficient, desired attitude angle and current attitude angle.
[0117] PID control, proportional (P) control, calculates the difference between the desired attitude angle and the current attitude angle, and then multiplies it by the proportional gain coefficient.
[0118] Integral (I) control calculates the error accumulation over time and then multiplies it by the integral gain factor to eliminate steady-state error.
[0119] Derivative (D) control predicts the changing trend of the error and then multiplies it by the differential gain coefficient to improve the response speed and stability of the system.
[0120] Output,The output of the PID controller is the control error signals of three axes (roll, pitch, and yaw), which reflect the attitude changes that the drone needs to adjust.
[0121] The mixer outputs a PWM motor driver control signal to the actuator according to the three-axis torque control signal output by the PID controller and the drone model, so as to control the attitude of the drone, further comprising:
[0122] Calculate the expected speed of each motor based on the three-axis torque control signal output by the PID controller and the drone model information;
[0123] Convert the desired speed into a duty cycle of a PWM signal;
[0124] The PWM signal is output to the actuator, such as the motor, through the PWM motor driver to control the attitude adjustment of the drone.
[0125] Input parameters, output of PID controller, control error signals of three axes.
[0126] The mixer works. Based on the output of the PID controller and the dynamic model of the drone, the mixer calculates the torque that each motor needs to generate to achieve the required attitude adjustment.
[0127] The mixer converts these torques into PWM control signals for the motors, which determine the speed and direction of the motors. The PWM signals output by the mixer are used to directly control the motors of the drones, achieving precise control of the drone's attitude.
[0128] An electronic device, comprising:
[0129] A memory storing executable program code;
[0130] a processor coupled to the memory;
[0131] The processor calls the executable program code stored in the memory to execute the high-speed image acquisition and processing method for adjusting the flight attitude of the unmanned aerial vehicle as described above.
[0132] A computer storage medium stores computer instructions, which, when called, are used to execute the high-speed image acquisition and processing method for adjusting the flight attitude of a drone as described above.
[0133] The same or similar reference numerals correspond to the same or similar components;
[0134] The terms used in the drawings to describe positional relationships are only used for illustrative purposes and should not be construed as limiting this patent;
[0135] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not limitations on the implementation methods of the present invention. For ordinary technicians in the relevant field, other different forms of changes or modifications can be made on the basis of the above description. It is not necessary and impossible to list all the implementation methods here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. A high-speed image acquisition and processing method for adjusting the flight attitude of an unmanned aerial vehicle, characterized in that: The following steps are involved: Starting a high-speed camera to continuously collect image data of the UAV during flight at a fixed frame rate, wherein the image data includes real-time position and attitude information of the UAV relative to a predetermined path; Receive the collected image data, and use Harris corner algorithm to perform feature detection on the image data to identify corner features in the image, wherein the feature detection is based on the grayscale gradient and corner response value of the image data; Performing centroid calculation on the identified corner features to determine the geometric center of each corner feature, wherein the centroid calculation is based on the coordinate average of the corner features; According to the centroid calculation result, the corner point features are classified, and according to the relative position information between the drone and the target area, the amount of calculation of the image data processing is reduced; Perform coordinate transformation in the target coordinate system O, the high-speed camera coordinate system C and the drone fuselage coordinate system B to obtain the position information of the drone relative to the target area, wherein the coordinate transformation includes rotation and translation transformation; Generate a control instruction based on the obtained posture information, and transmit the control instruction to the flight controller through the MavLink protocol, wherein the control instruction includes the desired attitude angle and the desired angular velocity of the UAV; The gain controller is used to classify the attitude angle difference into deviation angle levels, and the gain coefficient is dynamically adjusted according to the deviation angle level to optimize the control response; Using a PID controller to perform PID control according to the adjusted gain coefficient, the desired attitude angle and the current attitude angle, and calculate a new desired angular velocity, wherein the PID control includes proportional, integral and differential control; The mixer outputs the PWM motor driver control signal to the actuator according to the three-axis torque control signal output by the PID controller and the drone model to control the attitude of the drone.
2. A high-speed image acquisition and processing method for adjusting the flight attitude of an unmanned aerial vehicle according to claim 1, characterized in that: The feature detection of the image data by using the Harris corner algorithm to identify the corner features in the image, wherein the feature detection is based on the grayscale gradient and the corner response value of the image data and further includes: The performing feature detection on the image data by using the Harris corner algorithm to identify corner features in the image comprises: Set the parameters of Harris corner algorithm; Applying a corner tracking algorithm to track corner features between consecutive frames of the image data; The feature detection based on the grayscale gradient and corner point response value of the image data includes: Grayscale gradient calculation of image data; Construct the structure tensor matrix; Calculate the corner point response value; Thresholding and non-maximum suppression.
3. The high-speed image acquisition and processing method for adjusting the flight attitude of an unmanned aerial vehicle according to claim 1, characterized in that: The centroid calculation of the identified corner point features further includes: For each corner feature, calculate the average coordinates of all its pixels as the centroid coordinates of the corner feature; According to the centroid coordinates, the corner point features are located in the image data, providing a basis for subsequent classification and processing.
4. The high-speed image acquisition and processing method for adjusting the flight attitude of an unmanned aerial vehicle according to claim 1, characterized in that: The classification of corner point features according to the centroid calculation result further includes: According to the centroid coordinates of the corner point features and the relative position information between the drone and the target area, the corner point features are divided into different categories; According to the classification results, the corner features of a specific category are selectively processed to reduce the computational complexity of image data processing.
5. The high-speed image acquisition and processing method for adjusting the flight attitude of an unmanned aerial vehicle according to claim 1, characterized in that: The coordinate transformation in the target coordinate system O, the high-speed camera coordinate system C and the drone fuselage coordinate system B further includes: Determine the relative position and attitude between the target coordinate system O, the high-speed camera coordinate system C and the drone body coordinate system B; Using a homogeneous transformation matrix to represent the rotation and translation transformation between the coordinate systems; By solving the internal and external parameters of the high-speed camera, the transformation matrix from the high-speed camera coordinate system C to the drone body coordinate system B is obtained; Using the position of the corner feature in the target coordinate system O and the imaging position in the high-speed camera coordinate system C, the transformation matrix from the target coordinate system O to the high-speed camera coordinate system C is calculated through triangulation.
6. The high-speed image acquisition and processing method for adjusting the flight attitude of an unmanned aerial vehicle according to claim 1, characterized in that: The step of performing deviation angle classification on the attitude angle difference by the gain controller further comprises: Calculating the difference between the current attitude angle and the desired attitude angle, i.e., the attitude angle difference; According to the size of the attitude angle difference, it is divided into different deviation angle levels; According to the deviation angle level, the proportional, integral and differential gain coefficients of the PID controller are dynamically adjusted.
7. The high-speed image acquisition and processing method for adjusting the flight attitude of an unmanned aerial vehicle according to claim 1, characterized in that: The method of using the PID controller to perform PID control according to the adjusted gain coefficient, the desired attitude angle and the current attitude angle to calculate the new desired angular velocity further includes: Calculate the input error of the PID controller based on the adjusted gain coefficient, the desired attitude angle and the current attitude angle; According to the proportional, integral and differential gains of the PID controller, the output of the PID controller, i.e. the new desired angular velocity, is calculated; The new desired angular velocity is used as the input of the mixer for subsequent control signal generation.
8. The high-speed image acquisition and processing method for adjusting the flight attitude of an unmanned aerial vehicle according to claim 1, characterized in that: The mixer outputs a PWM motor driver control signal to the actuator according to the three-axis torque control signal output by the PID controller and the drone model, so as to control the attitude of the drone, further comprising: Calculate the expected speed of each motor based on the three-axis torque control signal output by the PID controller and the drone model information; Convert the desired speed into a duty cycle of a PWM signal; The PWM signal is output to the actuator through the PWM motor driver to control the attitude adjustment of the drone.
9. An electronic device, characterized in that: The electronic device comprises: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute a high-speed image acquisition and processing method for adjusting the flight attitude of a drone as described in any one of claims 1-8.
10. A computer storage medium, characterized in that: The computer storage medium stores computer instructions, which, when called, are used to execute a high-speed image acquisition and processing method for adjusting the flight attitude of a drone as described in any one of claims 1-8.