Unmanned aerial vehicle autonomous direction adjustment method based on landmark identification
By using a landmark recognition-based autonomous heading adjustment method for UAVs, and leveraging image gradient analysis and inter-frame comparison, heading adjustment commands are generated. This solves the problem of unstable heading adjustment for UAVs in complex environments, achieving higher navigation stability and real-time response capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-06
- Publication Date
- 2026-04-07
AI Technical Summary
Existing autonomous orientation adjustment methods for UAVs struggle to cope with obstructed landmarks or changes in perspective in complex environments, resulting in limitations on positioning system accuracy and response speed, which in turn affects navigation stability and mission completion efficiency.
By using a landmark recognition-based UAV autonomous heading adjustment method, the forward-facing camera component is used to analyze the image gradient direction, identify the landmark main axis direction, compare the main axis changes frame by frame, filter out unstable frames, generate heading adjustment commands, and transmit control signals to the flight control module to monitor heading stability and ensure the accuracy and stability of heading adjustment.
In situations of changing visual environment or landmark obstruction, it can accurately determine the direction of the landmark's main axis, reduce the impact of environmental interference, improve the stability of navigation adjustments and real-time response capabilities, and is suitable for dynamic and complex flight missions.
Smart Images

Figure CN121806952A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of environmental positioning technology, and in particular to a method for autonomous orientation adjustment of unmanned aerial vehicles (UAVs) based on landmark recognition. Background Technology
[0002] The field of environmental positioning technology involves methods and systems for spatial location identification and positioning of devices or individuals using observable elements in the environment. These include geographic information acquisition, image processing, sensor data fusion, location calculation, and recognition model construction, and are widely applied in intelligent transportation, autonomous driving, robot navigation, UAV path planning, and indoor / outdoor hybrid scene positioning. Among these, traditional UAV autonomous direction adjustment methods refer to the process by which a UAV adjusts its flight direction during flight based on a preset route or real-time acquired positioning data, using a heading control algorithm to adapt to the mission path.
[0003] Existing technologies for autonomous heading adjustment in UAVs rely on preset flight paths or real-time positioning data, using heading control algorithms for adjustments. However, navigation systems have limitations when dealing with complex environments, especially when landmarks are obscured or the viewing angle changes. The heading adjustment capability becomes unstable, and traditional heading control methods fail to fully consider the impact of environmental changes on landmark recognition. This results in an inability to respond to dynamic changes in a timely manner in practical applications, thereby increasing flight errors. In particular, under conditions of significant visual interference, the accuracy and response speed of the positioning system are limited, affecting the navigation stability and mission completion efficiency of the UAV. Summary of the Invention
[0004] To address the technical problems existing in the prior art, embodiments of the present invention provide a method for autonomous orientation adjustment of unmanned aerial vehicles (UAVs) based on landmark recognition. The technical solution is as follows:
[0005] On the one hand, a method for autonomous orientation adjustment of drones based on landmark recognition is provided, including the following steps:
[0006] S1: Based on the forward-facing camera component of the drone, analyze the landmark outline region in the image, determine the pixel gradient direction within the region, identify landmarks with the same direction, adjust the main axis direction criterion, lock the main axis direction, and obtain the main axis direction recognition information;
[0007] S2: Based on the main axis direction recognition information, determine the change of the main axis direction of the landmark in multiple consecutive frames, compare the differences before and after the main axis frame by frame, analyze the direction continuity, identify feature frames with similar angle change amplitudes, exclude frames with direction changes, and obtain the number of stable angle sequences.
[0008] S3: Based on the stable angle sequence number, compare the difference between the main axis direction in consecutive frames and the previous frame, analyze the angle change trend between the current frame and the reference frame, determine whether direction adjustment is needed, identify the main axis direction that meets the correction standard, and obtain the heading adjustment command.
[0009] S4: Based on the heading adjustment command, the direction and amplitude information are converted into control signals, the signal format is analyzed to see if it is consistent with the flight control port protocol, and the control signal is sent to the flight control module through the communication module to obtain the direction control signal;
[0010] S5: Based on the direction control signal, determine the response of the flight control module, monitor the attitude change during the UAV's heading adjustment, monitor the rate of direction change, screen stable periods, and obtain the heading stability assessment result.
[0011] On the other hand, the main axis direction identification information includes image gradient direction, main axis direction of landmark area and pixel gradient intensity; the stable angle sequence number includes inter-frame angle consistency and angle change amplitude; the heading adjustment command includes adjustment direction, adjustment amplitude and heading correction method; the heading control signal includes flight control command format, command transmission protocol and signal transmission delay; and the heading stability evaluation result includes heading change rate, stabilization time period and adjustment end indicator.
[0012] On the other hand, the steps for obtaining the spindle direction identification information are as follows:
[0013] S101: Based on the forward-facing camera component of the UAV, analyze the real-time image frames collected, calculate the brightness gradient of each pixel in the image, determine the change trend of pixels in the horizontal and vertical directions in the edge area, compare the directional changes of adjacent pixels, identify pixel groups with the same direction, and obtain the directional trend distribution characteristics.
[0014] S102: Based on the directional trend distribution characteristics, filter the set of pixels with coherent spatial distribution, determine whether the pixels form a region with continuous boundary characteristics, analyze the arrangement order of pixels in each region, calculate their respective dominant arrangement direction, and remove pixel blocks that fail to form a directional structure to obtain a linear arrangement attribute set.
[0015] S103: Based on the linearly arranged attribute set, screen the direction items, analyze the overall arrangement pattern of the pixels associated with the direction items in the image space, determine the coherence and consistency of the direction items, designate them as the main direction of the current image frame, and obtain the main axis direction recognition information.
[0016] On the other hand, the steps for obtaining the number of stable angle sequences are as follows:
[0017] S201: Based on the main axis direction recognition information, compare the orientation difference of the main axis direction in each frame of a continuous image frame, determine the trend of change of the main axis direction between adjacent frames, identify the frame group that can maintain connection in the trend of change, and obtain the direction continuation sequence.
[0018] S202: Based on the direction continuation sequence, determine whether the direction change trends of adjacent frames are consistent, analyze the trend coherence between frame groups, remove frame groups that do not meet the coherence standard, and arrange the retained frames in an orderly manner to obtain a trend coherence set.
[0019] S203: Based on the trend coherence set, count the number of consecutive frames, determine the arrangement structure of each consecutive frame segment, compare the arrangement order of different consecutive frame segments, select the frame group with continuous arrangement characteristics, and obtain the number of stable angle sequences.
[0020] On the other hand, the specific steps for obtaining the heading adjustment command are as follows:
[0021] S301: Based on the number of stable angle sequences, compare the orientation difference between the main axis direction of the current frame landmark and the main axis direction of the previous stable frame, determine the direction of the difference change in the continuous frame sequence, identify whether the main axis direction shows a continuous unidirectional change, record the continuity of the change trend, and obtain the angle trend parameters.
[0022] S302: Based on the angle trend parameters, filter the frame groups that continuously show directional change features, analyze the spatial offset structure of the main axis direction of the frame group relative to the reference frame, determine the coherence of the directional features of each frame, remove frames that do not maintain directional consistency, and obtain the directional matching index.
[0023] S303: Based on the direction matching index, determine the rotational relationship of the main axis direction in spatial distribution, analyze the rotational parameter characteristics between the main axis direction and the reference frame, compare the changes in rotational direction and angle amplitude, determine the direction adjustment elements that meet the conditions, and obtain the heading adjustment command.
[0024] On the other hand, the specific steps for obtaining the direction control signal are as follows:
[0025] S401: Based on the heading adjustment command, analyze the direction parameters and amplitude parameters, determine the control characteristics after the combination of each parameter, optimize the logical expression of the direction parameters, adjust the numerical representation of the amplitude parameters, perform unified structure processing on all parameters, and obtain a formatted control command set.
[0026] S402: Based on the formatted control instruction set, compare it with the communication protocol format of the flight control module, filter the instruction content that is compatible with the protocol, determine the compatibility of each instruction parameter with the flight control port, match the fields required by the protocol, establish the mapping relationship between parameters and ports, and obtain instruction mapping information;
[0027] S403: Based on the instruction mapping information, determine the channel allocation status of each control field, transmit the data structure to the flight control module in sequence through the communication module, monitor the response signal content fed back by the flight control module, compare the response consistency with the input instruction, and obtain the direction control signal.
[0028] On the other hand, the specific steps for obtaining the heading stability assessment results are as follows:
[0029] S501: Based on the direction control signal, determine the response content returned by the flight control module, analyze the correspondence between the response content and the input signal, monitor the execution steps of the flight control module to the command, collect the attitude information of the UAV during the heading adjustment, and obtain response status discrimination data;
[0030] S502: Based on the response state discrimination data, analyze the attitude changes of the UAV at each moment during the heading adjustment, calculate the direction change rate during the adjustment process, screen the attitude change amplitude at each time period after the adjustment action, determine whether the attitude data shows a stable trend, and obtain the heading stability data segment.
[0031] S503: Based on the heading stability data segment, compare the attitude change range, analyze the change trend of the attitude data after input freezing, determine the continuity of heading data before and after the adjustment process, determine the criterion node for the completion of the heading adjustment action, and obtain the heading stability assessment result.
[0032] On the other hand, the landmark outline region refers to the area of an object with a geometric shape identified in the image captured by the drone camera through edge detection or outline recognition, and the internal pixels refer to the pixel information of each region in the image.
[0033] On the other hand, the landmark main axis refers to the main direction determined in the landmark object or region, the difference before and after the main axis refers to the amount of change in the main axis direction of the landmark object in consecutive image frames, and the angle change range refers to the change range of the main axis direction in multiple image frames, to determine the degree of change in the object's orientation.
[0034] On the other hand, the angle change trend refers to the change trend of the main axis direction in consecutive image frames, and the heading adjustment period refers to the time period after the UAV receives the heading adjustment command and begins to execute the adjustment operation.
[0035] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:
[0036] By combining the geometric features and spatial distribution of landmarks, the stability and accuracy of navigation adjustments are improved. By evaluating the stability of the landmark's main axis direction in multiple consecutive image frames, misidentification and incorrect adjustments in a short period of time are avoided. Relying on image processing, the main axis direction of landmarks can be accurately determined even when the visual environment changes or landmarks are partially occluded, and unstable frames are effectively filtered out. Heading adjustments are only performed when the landmark orientation is stable, ensuring the UAV's autonomous adjustment capability in complex environments, reducing the impact of environmental interference on heading stability, and making heading adjustments more precise and responsive in real time, making it more suitable for dynamic and complex flight missions. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is a flowchart of the main steps of the present invention;
[0039] Figure 2 This is a flowchart of steps S1 of the present invention;
[0040] Figure 3 This is a flowchart of steps S2 of the present invention;
[0041] Figure 4 This is a flowchart of steps S3 of the present invention;
[0042] Figure 5 This is a flowchart of step S4 of the present invention;
[0043] Figure 6 This is a flowchart of steps S5 of the present invention. Detailed Implementation
[0044] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0045] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.
[0046] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.
[0047] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.
[0048] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0049] This invention provides a method for autonomous orientation adjustment of unmanned aerial vehicles (UAVs) based on landmark recognition, such as... Figure 1 As shown, it includes the following steps:
[0050] S1: Based on the forward-facing camera component of the drone, analyze the landmark outline area appearing in the real-time image, determine the gradient distribution of pixels in each area in each direction, identify landmark areas with consistent directional attributes by judging the gradient concentration area, adjust the main axis direction criterion by combining the spatial continuity of pixel distribution, lock the main axis direction, and obtain the main axis direction recognition information.
[0051] S2: Based on the main axis direction recognition information, determine the change of the main axis direction of the landmark in multiple consecutive frames. By comparing the differences in the main axis direction frame by frame, analyze the continuity of the main axis direction in the sequence, identify feature frames with similar angle change amplitudes, exclude frames with direction changes, and count the number of consecutive frames in the sequence to obtain the number of stable angle sequences.
[0052] S3: Based on the number of stable angle sequences, compare the difference between the main axis direction of the landmark in consecutive frames and the previous stable frame, analyze the angle change trend between the current frame and the reference frame, determine whether the direction adjustment is necessary, identify the main axis direction that meets the correction standard, determine the direction attribute and amplitude parameter of the adjustment action, and obtain the heading adjustment command.
[0053] S4: Based on the heading adjustment command, the adjustment direction and magnitude information are summarized and converted into a hardware-recognizable control signal. The consistency between the control signal format and the protocol of the flight control port is analyzed. The control signal is sent to the flight control module through the communication module. After waiting for the flight control module to respond, the command is confirmed to be valid and the directional control signal is obtained.
[0054] S5: Based on the directional control signal, determine the response of the flight control module, monitor the attitude change of the UAV during the heading adjustment, continuously monitor the rate of directional change during the adjustment process, screen the stable period after the adjustment action, adjust the command channel to freeze the input, and determine whether the adjustment is completed, and obtain the heading stability assessment result.
[0055] The main axis direction identification information includes the image gradient direction, the main axis direction of the landmark area, and the pixel gradient intensity. The stable angle sequence number includes the inter-frame angle consistency and the angle change amplitude. The heading adjustment command includes the adjustment direction, adjustment amplitude, and heading correction method. The heading control signal includes the flight control command format, command transmission protocol, and signal transmission delay. The heading stability evaluation result includes the heading change rate, the stabilization time period, and the adjustment end indicator.
[0056] In S1, the landmark outline region refers to the geometrically shaped object region identified in the image captured by the drone camera through image processing techniques (such as edge detection and contour recognition). These are typically landmark objects used for navigation or positioning. Pixels within each region refer to the pixel information of each region in the image, used to analyze and calculate the features of each region. Pixels usually have different brightness, color, or gradient direction information. Gradient distribution refers to the magnitude or direction of brightness changes of pixels within a certain region of the image. Gradients are used to represent the edges and contours of the image, helping to identify the shape of objects. Gradient concentration regions refer to areas in the image where gradient changes are more dramatic, usually edges or contours, and these regions are particularly important in landmark recognition. Consistent direction attribute refers to regions in the image having the same or similar principal direction, usually determined by analyzing pixel gradient directions, helping to identify stable landmark directions. Spatial continuity refers to the spatial interconnection and consistent distribution between regions or pixels in the image, usually reflected in object features such as contours and lines. Principal axis direction criterion refers to the standard for determining the principal direction of landmark objects or regions in the image, usually determined by analyzing pixel gradient distribution or other geometric features.
[0057] In S2, the landmark principal axis refers to the main direction (e.g., the longest axis or the most representative direction) determined in a landmark object or region, and is usually used for orientation alignment and heading correction; the difference in principal axis direction refers to the amount of change in the principal axis direction of a landmark object in consecutive image frames, and is usually used to determine whether there is a significant change in orientation; the continuity of principal axis direction refers to whether the principal axis direction of a landmark object remains consistent or changes little in multiple consecutive image frames, and high continuity indicates that the principal axis direction is relatively stable; the magnitude of angle change refers to the magnitude of change in principal axis direction in multiple image frames, and is usually used to determine the degree of change in object orientation and help to select stable frames; feature frames refer to those frames that are characteristic in the image sequence, have small magnitudes of angle change, and meet the stability conditions, and are usually used to construct stable references.
[0058] In S3, the angle change trend refers to the trend of the principal axis direction in consecutive image frames. It is usually analyzed by the changing pattern of angle differences. If the angle change gradually increases or decreases, it indicates that the direction has been adjusted. The correction standard refers to the standard used to determine whether a heading adjustment is needed. It is usually the magnitude, continuity or other geometric standard of the angle change, used to determine whether there is a need for a heading adjustment. The direction attribute refers to the characteristics of the object's orientation, such as the angle of orientation, the direction of rotation, etc., which is usually used to represent the object's current orientation. The amplitude parameter refers to the amplitude information related to the heading adjustment, which is usually used to determine the magnitude of the heading correction, indicating how much angle needs to be changed to achieve the expected heading.
[0059] In S4, "adjusting direction" refers to the target direction or target heading of an object determined by the heading adjustment command, which is usually determined by the landmark recognition results and the direction correction requirements; "control signal" refers to the command signal used by the flight control system, which is usually transmitted through the communication interface to control the flight control system to perform the heading adjustment task; "flight control port" refers to the interface in the flight control system that receives control signals, which is usually a hardware interface used to receive UAV control signals and perform corresponding operations; "protocol consistency" means ensuring that the generated control signal is compatible with the communication protocol of the flight control system, and ensuring that the signal can be correctly parsed and transmitted to the flight control system; "determining command validity" means judging whether the generated control signal has been correctly transmitted and accepted by the flight control system. After confirming that the signal is valid, the command can be executed.
[0060] In S5, the flight control module response refers to the flight control system's reaction to received control signals, including whether a heading adjustment command is executed, the speed of the response, and whether a malfunction occurs. The heading adjustment period refers to the time period after the UAV receives the heading adjustment command and begins to execute the adjustment operation, including dynamic changes during the heading correction process. The rate of change of direction refers to the speed at which the UAV's orientation changes during the heading adjustment process, usually measured in degrees per second, reflecting the speed of the heading adjustment. The stabilization period refers to the time period during the heading adjustment process when the UAV's orientation change tends to stabilize, usually the stable heading maintenance phase after the adjustment is completed. The frozen input refers to the control command channel ceasing new inputs once the UAV's attitude change stabilizes during the heading adjustment process, ensuring that the UAV continues to fly stably and avoiding additional adjustment commands.
[0061] like Figure 2 As shown, the specific steps for obtaining the spindle direction identification information are as follows:
[0062] S101: Based on the forward-facing camera component of the UAV, analyze the real-time image frames collected, calculate the brightness gradient of each pixel in the image, determine the change trend of pixels in the horizontal and vertical directions in the edge area, compare the directional changes of adjacent pixels, identify pixel groups with the same direction, and obtain the directional trend distribution characteristics.
[0063] Video frames are acquired using an image acquisition module mounted on the front of the drone. For example, a 1080P resolution camera module at 30 frames per second can capture images covering a ground area approximately 2 meters wide at a flight speed of 5 meters per second. First, the color image is converted to grayscale to process the brightness of each pixel. Then, the brightness difference between each pixel and its adjacent pixels to the right and below is calculated. The absolute value of the difference is used to determine which locations in the image have significant brightness changes. A starting threshold for brightness change is set, for example, 20, as the starting point for edge detection. Only pixels with differences greater than this value are retained as edge candidates. Among these candidate points, the direction angle is further calculated to identify each pixel. In an image, the direction of a pixel is determined by factors such as its horizontal orientation. For example, if the horizontal change of a pixel is greater than its vertical change, it can be identified as a horizontal edge, and vice versa. The orientation angles of all candidate edge points are statistically divided, for example, by constructing orientation intervals in 10-degree units. The number of pixels in each interval is counted to obtain the orientation distribution of the entire image. Then, by sliding a local window, the degree of orientation change in each small region is counted. If the orientation fluctuation is small, the pixels are considered to belong to a region with consistent orientation. For example, regions with orientation fluctuations within 25 degrees are identified as a consistent orientation group. Multiple small regions with consistent orientations are merged to form a larger orientation block. Each orientation block contains the number of pixels in the region, the average orientation value, and the spatial position, forming the orientation trend distribution characteristics of the current frame of the image.
[0064] S102: Based on the directional trend distribution characteristics, filter the set of pixels with coherent spatial distribution, determine whether the pixels form a region with continuous boundary characteristics, analyze the arrangement order of pixels in each region, calculate their respective dominant arrangement direction, remove pixel blocks that fail to form a directional structure, and obtain a linear arrangement attribute set.
[0065] After obtaining the directional trend distribution features, multiple regions with consistent directions are extracted. The distance between these regions is determined based on their position coordinates in the image. If the distance between two regions is less than a certain pixel interval, such as 15 pixels, they are considered spatially connected. These spatially adjacent regions are then merged. Further analysis of the merged regions' boundary connectivity is performed, determining whether their boundaries consist of continuous pixels. A point-by-point scanning method is used to trace the boundaries. If the boundaries are unbroken and form a closed shape, the region is considered to have continuous boundary properties. Subsequently, the pixel arrangement within the region is processed, projecting all pixels onto their main direction. On the corresponding straight line, the spatial distribution of the projection points is calculated. If the points are evenly or densely distributed along the direction, the arrangement is considered to have linear characteristics. Otherwise, the disorderly arranged areas are removed. Then, for the pixels retained in each area, the overall direction value is calculated, and weights are assigned according to the pixel intensity. The direction of all pixels is averaged to obtain the most representative dominant direction of the area. Then, based on whether the arrangement density meets the minimum linearity requirement, such as requiring the density of the linear arrangement area to be above 0.7 and the direction consistency to be kept within 40 degrees, the areas that do not meet the standard are deleted, forming a set of pixels with obvious linear arrangement characteristics, which constitutes the linear arrangement attribute set.
[0066] S103: Based on the linearly arranged attribute set, screen the direction terms, analyze the overall arrangement pattern of the pixels associated with the direction terms in the image space, determine the coherence and consistency of the direction terms, designate them as the main direction of the current image frame, and obtain the main axis direction recognition information.
[0067] The dominant direction values of all retained regions are collected as candidate direction terms. The distribution of direction terms in the image space is then statistically analyzed, and the spatial position of the pixel blocks associated with each direction term is analyzed to determine whether they exhibit a consistent arrangement direction. For example, if most direction terms are concentrated on one side of the image and their direction values are not significantly different, it can be preliminarily considered that the direction terms are consistent. The direction difference between direction terms is further calculated, and the proportion of differences within a certain range is statistically analyzed. For example, when the difference between more than 80% of direction terms is less than 20 degrees, the overall direction can be considered consistent. On this basis, a weighted average is then applied to the direction terms, where the weights are allocated according to the number of pixels contained in each region, with the larger region dominating the determination of the main direction of the entire image, thereby obtaining the most representative main axis direction of the current image frame. This main axis direction is then assigned to the structural data of the image frame as the basis for subsequent image matching and heading adjustment, thus obtaining the main axis direction recognition information.
[0068] like Figure 3 As shown, the specific steps for obtaining the number of stable angle sequences are as follows:
[0069] S201: Based on the main axis direction recognition information, compare the orientation difference of the main axis direction in each frame of a continuous image frame, determine the trend of change of the main axis direction between adjacent frames, identify the frame group that can maintain continuity in the trend of change, and obtain the direction continuity sequence.
[0070] This process utilizes the principal axis angle data extracted for each frame in the previous stage. This data represents the dominant direction of the main landmarks or structures in that image frame. The principal axis angle value of each frame is read sequentially, with the frame numbers increasing. The difference between the principal axis angles of any two adjacent frames is calculated by subtracting the principal axis angle values of adjacent frames numbered n and n+1. A direction difference sequence is constructed according to the image acquisition time sequence. Each item in this sequence is checked to see if the direction difference is within a set angle change threshold. For example, if the direction difference threshold is set to 15 degrees, when the difference between two frames does not exceed this threshold, it is determined that the direction change trend of the two frames remains stable. This process is repeated for all frames. The direction difference determination involves constructing a frame group composed of multiple consecutive frame pairs that meet the difference condition. For each frame group, the direction change trend of all frames within the frame group is further analyzed, and the increasing or decreasing trend of adjacent direction changes in the frame group is calculated. For example, it is determined whether the angle change continues to rise, fall, or remain unchanged. When the trend within the frame group is the same and the fluctuation amplitude is less than the trend benchmark threshold, the frame group is determined to have directional continuity. It is recommended to set the trend benchmark threshold within 10 degrees. The frame group index range that meets the condition is marked by the direction trend judgment result. The frame groups are then grouped together, and frame sequence segments with consecutive frame indices and satisfying trend consistency are merged to form a direction continuity sequence with spatial and temporal continuity of direction change.
[0071] S202: Based on the direction continuity sequence, determine whether the direction change trend of adjacent frames is consistent, analyze the trend coherence between frame groups, remove frame groups that do not meet the coherence standard, and arrange the retained frames in order to obtain a trend coherence set.
[0072] Each frame segment in the direction continuity sequence is extracted and processed segment by segment in ascending order of frame index. In each frame segment, the main axis direction angle value of the preceding and following frames is read and their change trends are compared to determine whether the direction angle is continuously changing or remains relatively stable. When multiple frame segments show consistent change trends, such as both increasing or decreasing in direction and the change amplitude is within a set range, the frame segment trend consistency is determined to be valid. The trend continuity judgment threshold is set as the average direction change not exceeding 10 degrees and the direction change direction not obviously flipping. Further comparison is made between each frame group to determine whether there are frame segments with reversed direction change or drastic jumps. If a frame segment is found to change in the opposite direction to the previous segment or the angle change exceeds 25 degrees, the frame segment is removed and not retained. Among the retained frame segments, they are rearranged in order according to the frame number to ensure that the frame segments are arranged continuously in the acquisition order. Through this process, a set of image frame segments with consistent change trends and orderly arrangement is selected to form a trend continuity set.
[0073] S203: Based on the trend coherence set, count the number of consecutive frames, determine the arrangement structure of each consecutive frame segment, compare the arrangement order of the different consecutive frame segments, select the frame group with continuous arrangement characteristics, and obtain the number of stable angle sequences.
[0074] Extract all retained frame segments and count the number of consecutive image frames in each segment according to frame number order. If the number of consecutive frames in a segment is greater than or equal to a specified threshold (e.g., a minimum of 5 consecutive frames), the segment is retained. Otherwise, segments with fewer than 5 frames are deleted as short-term fluctuations. Further structural analysis is performed on each retained consecutive frame segment. The principal axis direction value of each frame is read, and a direction sequence within the segment is constructed. The sorting structure of the direction values is judged, such as whether it is approximately arithmetic progression, slightly increasing or decreasing, or maintaining a constant state. If the overall sorting order of the direction values in a segment is found to be stable, the segment is marked as a continuously arranged structure segment. The sorting order of multiple different frame segments is compared and analyzed. If the direction sorting of a segment is drastically disturbed or the sorting order is no longer continuous, the segment is excluded. Only frame segments with coherent structure and stable direction sorting are retained. A set of frame segments with sufficient continuity and direction consistency is selected. The number of all frame segments that meet the conditions in the set is counted, and their frame lengths are marked, thus obtaining the number of stable angle sequences.
[0075] like Figure 4 As shown, the specific steps for obtaining a heading adjustment command are as follows:
[0076] S301: Based on the number of stable angle sequences, compare the orientation difference between the main axis direction of the current frame landmark and the main axis direction of the previous stable frame, determine the direction of the difference change in the continuous frame sequence, identify whether the main axis direction shows a continuous unidirectional change, record the continuity of the change trend, and obtain the angle trend parameters.
[0077] The method involves obtaining the directional angle difference between the main axis direction of the current frame and the main axis direction of the previous stable frame. This is achieved by directly subtracting the directional angle values from the current and previous frames and comparing the difference to a directional change recognition threshold (e.g., 5 degrees). If the difference falls within this threshold, the current frame is considered to have no significant directional change. If the difference exceeds this value, it is recorded as a valid directional change. This directional difference calculation is then performed on multiple consecutive frames, forming a sequence of inter-frame directional difference values. The trend of this sequence is then analyzed, and each directional difference value is compared with... The preceding values are compared. If the direction of change remains consistent and the angle change maintains an increasing or decreasing trend for more than 3 frames, it can be judged as a continuous direction change trend. If the trend direction reverses at least once within 3 frames, it is considered a discontinuous trend. In the continuous trend frame group, the starting frame number, ending frame number, number of consecutive frames, and cumulative angle change of each direction change trend are recorded to form the angle trend parameter. This parameter includes the trend direction of the direction change, the frame length of the stable change interval, and the total angle change value. The index is used to determine whether the heading needs to be corrected in the subsequent process to obtain the angle trend parameter.
[0078] S302: Based on the angle trend parameter, filter the frame group that continuously shows the direction change feature, analyze the spatial offset structure of the main axis direction of the frame group relative to the reference frame, judge the coherence of the direction features of each frame, remove the frames that do not maintain the direction consistency, and obtain the direction matching index.
[0079] Based on the consistency criteria for trend direction, frames are eliminated. If a frame sequence has repeated directional fluctuations or a cumulative change angle of less than 10 degrees, the frame segment is excluded. Frame groups with a cumulative angle change of more than 10 degrees and a continuous directional change for more than 3 frames are retained. Further, a spatial offset structure analysis is performed on the main axis direction of each frame and the direction of a reference frame. The angle difference between the main axis direction of each frame and the direction of the reference frame is calculated and converted into a direction vector offset. By comparing the offset directions of adjacent frames, it is identified whether the main axis direction within the frame group has moved along the same spatial direction. If the offset direction of any frame within the frame group is reversed by 180 degrees relative to the previous frame or fluctuates significantly by more than 20 degrees, it is considered that it has not maintained directional consistency and is removed from the current frame group. The remaining frames are rearranged according to their frame number order to form a valid direction sequence within the frame group. The set of frame index numbers is extracted as a direction matching index for subsequent matching of reference directions for heading adjustment determination.
[0080] S303: Based on the direction matching index, determine the rotational relationship of the main axis direction in the spatial distribution, analyze the rotational parameter characteristics between the main axis direction and the reference frame, compare the changes in rotational direction and angle amplitude, determine the direction adjustment elements that meet the conditions, and obtain the heading adjustment command;
[0081] The orientation matching index-based approach uses a sequence of frames that meet the orientation consistency requirements after filtering. It reads the main axis orientation angle value frame by frame and compares it with the main axis orientation of a specified reference frame to determine the spatial rotation relationship between the main axis orientation and the reference orientation of each frame. Specifically, it calculates the angle difference between the orientation value and the reference orientation of each frame and records the sign of the difference to determine whether the rotation direction is clockwise or counterclockwise. When the rotation directions of multiple frames are consistent, it is considered a stable rotation trend. The approach continues to statistically analyze the orientation difference for each frame, examining its fluctuation range, such as calculating the maximum, minimum, and average values of the orientation angle difference. If the average rotation amplitude is between 10 and 25 degrees and the orientation remains consistent, it is considered a valid rotation state. Further, orientation adjustment elements are constructed based on the frame's rotation direction, angle change range, and trend consistency, including rotation direction attributes, amplitude range, and duration of change. This set of adjustment elements is then compared with the current flight state. If the current flight heading is opposite to the orientation adjustment trend and the orientation difference is greater than the set adjustment reference angle of 20 degrees, an adjustment command is issued, generating a heading adjustment command.
[0082] like Figure 5 As shown, the specific steps for obtaining the direction control signal are as follows:
[0083] S401: Based on the heading adjustment command, analyze the direction parameters and amplitude parameters, determine the control characteristics after the combination of each parameter, optimize the logical expression of the direction parameters, adjust the numerical representation of the amplitude parameters, and perform unified structure processing on all parameters to obtain a formatted control command set;
[0084] The system reads the raw numerical pairs of the direction and amplitude parameters, determines whether the direction is positive (clockwise) or negative (counterclockwise), and converts the direction parameter into a logical Boolean value or a binary identifier (e.g., clockwise is marked as 1, counterclockwise as 0). Next, the amplitude parameter is normalized, limiting the angle value to between 0 and 180 degrees. Based on the input resolution of the control command, for example, if the flight controller receiver supports 1 degree resolution, it is directly represented as an integer; if it supports 0.5 degree resolution, it is multiplied and represented as an integer value. Finally, the direction and amplitude parameters are combined into a two-field structure, and the order of the fields is uniformly defined, for example... The direction field occupies the high-order byte, and the amplitude field occupies the low-order byte. At the same time, it is checked whether the field width meets the requirements of the control data frame format. For example, the direction field is set to 1 byte and the amplitude field is set to 2 bytes. It is determined whether the combination exceeds the maximum transmission width of the data packet. If it does, the field precision is reduced or the field is split and recombined. Finally, all parameters are uniformly encapsulated in a structured format. For example, a structure named "CTRL_STRUCT" is constructed, which contains the field name, field type, field width, and field value content. This ensures that each control parameter appears in a fixed order in the structure, which is convenient for subsequent communication encapsulation processing to form a formatted control instruction set.
[0085] S402: Based on the formatted control instruction set, it compares the communication protocol format with the flight control module, filters the protocol-compatible instruction content, judges the compatibility of each instruction parameter with the flight control port, matches the fields required by the protocol, establishes the mapping relationship between parameters and ports, and obtains instruction mapping information.
[0086] The flight control module interface protocol parameter table is called, and each field in the control command structure is compared to the fields required by the flight control protocol in terms of field type, length, and arrangement. For example, the flight control requires the direction control field to be one byte and named "DIR", and the amplitude control field to be two bytes and named "ANG". If there are field naming conflicts or length discrepancies in the structure, the fields are renamed or compressed and repackaged. The set of fields that meet the protocol requirements in terms of field name, bit width, order, and data type is selected as the compatible field set. Then, it is determined whether the parameter value range in the control command is within the range that the flight control can recognize. For example, if the minimum unit for the angle amplitude field on the flight controller is 0.5 degrees and the maximum value must not exceed 90 degrees, then amplitude fields exceeding 90 degrees need to be split into two commands and sent separately. The value of each field needs to be checked for range, and the fields that pass the check and their values are marked. Then, according to the field mapping definition table of the flight controller communication protocol format, a one-to-one correspondence between the control structure fields and the physical channels of the flight controller port is established. For example, the DIR field is mapped to flight controller channel 3, and the ANG field is mapped to channel 4. The mapping relationship index number is marked, and the mapping relationship structure is organized into a unified form and output as command mapping information.
[0087] S403: Based on the command mapping information, determine the channel allocation status of each control field, transmit the data structure to the flight control module in sequence through the communication module, monitor the response signal content fed back by the flight control module, compare the response consistency with the input command, and obtain the directional control signal;
[0088] The system reads the channel number of the currently mapped channel for each field, checks whether the channel is occupied or in conflict. For example, if channel number 3 is performing an attitude adjustment task, it is marked as currently unavailable. The next available channel number is selected for replacement mapping, the mapping table content is updated, and the channel allocation status is recorded. After confirming the channel allocation, the system assembles the numerical content corresponding to each control field into a communication data frame according to the field order, including elements such as start character, field body, and checksum tail. The data frame is then passed to the communication module for encoding and transmission. The communication module performs data packetization and CRC verification according to the flight control module's acceptance protocol, and then sends the data frame byte by byte to the flight control module port through the physical interface. After transmission, the system starts the listening mechanism to receive the response signal returned by the flight control module, parses the response frame structure, and compares the flight control feedback content with the sent control field content field by field. For example, if the sent value is clockwise angle with an amplitude of 30 degrees, if the flight control returns the same direction and value, it is recorded as a successful response; otherwise, the command frame is resent. The system calculates the success rate and records the control field transmission results, and generates a directional control signal that corresponds to the flight control command.
[0089] like Figure 6 As shown, the specific steps for obtaining the heading stability assessment results are as follows:
[0090] S501: Based on the directional control signal, determine the response content returned by the flight control module, analyze the correspondence between the response content and the input signal, monitor the execution steps of the flight control module to the command, collect the attitude information of the UAV during heading adjustment, and obtain response status discrimination data;
[0091] The system reads the response frame from the flight control module, decodes the frame content to extract field information, and sequentially extracts data items such as command number, execution status code, feedback direction angle, and execution timestamp. It then compares each response field with the original input control signal fields, determining if they match in the command number, direction angle value, and amplitude fields. If the direction angle feedback value in the response frame differs from the original input by less than 2 degrees, it is considered consistent; otherwise, it is recorded as an inconsistent command response. Further analysis is then performed on the feedback sequence of the flight control module's command execution steps. For example, if the flight control module returns feedback content at different stages at different times, it is necessary to determine the nature of the feedback content. The system checks whether the status codes include "received," "adjustment started," "adjustment in progress," and "adjustment completed." It compares the completeness of the command status feedback along the timeline. If "adjustment completed" feedback is missing, the system is marked as in progress and does not proceed to the next judgment stage. Simultaneously, during the adjustment period, the system collects data on the UAV's roll, pitch, and yaw angles using attitude sensor components. The collection period is set to once every 0.2 seconds, recording the timestamp and attitude angle value each time. At least 30 consecutive sets of data are recorded for analysis. The comparison results, status feedback, and attitude angle data are integrated into a structured status information set, and the output is response status discrimination data.
[0092] S502: Based on response state discrimination data, analyze the attitude changes of the UAV at each moment during the heading adjustment, calculate the rate of change of direction during the adjustment process, screen the attitude change amplitude at each time period after the adjustment action, determine whether the attitude data shows a stable trend, and obtain the heading stability data segment.
[0093] The attitude data sequence from the start to the completion of the heading adjustment is extracted. The yaw angle value at each moment is read and arranged chronologically to construct a complete time-angle sequence. The time difference and angle difference between any two adjacent data points are read and the angle change per unit time is calculated, i.e., the rate of change of direction is calculated. The rate sequence is analyzed to see if there are any abrupt changes during the adjustment process. For example, if the rate of a certain frame exceeds 5 degrees per second and the rate difference with the previous frame exceeds 2 degrees per second, the point is marked as a rate anomaly. If the number of consecutive anomalies exceeds 3, it is marked as a dynamic disturbance segment. In the attitude data after the adjustment action is completed, the attitude angle change is evaluated every 1 second. If the yaw angle change does not exceed 1 degree within 3 consecutive seconds, and the pitch and roll angles fluctuate within 0.5 degrees, it is judged to have entered a stable state. The continuous data after the adjustment is completed is further segmented, and the change amplitude of each segment is analyzed in 3-second units. If at least two segments meet the condition that the fluctuation amplitude is less than the above threshold, the segment is marked as a candidate segment for heading stability. The start and end time, number of data groups, and average angle value of the segment are retained and organized into heading stability data segments.
[0094] The rate of change of direction during the adjustment process is calculated using the following formula:
[0095] ;
[0096] Calculate the rate of change of direction index The attitude change amplitude at different time periods after the screening and adjustment actions is used to determine whether the attitude data shows a stable trend, thus obtaining the heading stability data segment. This represents the number of frames in the pose data segment analyzed after the adjustment action is completed. Representing the Frame landmark principal axis direction angle, Representing the Frame landmark principal axis direction angle, Representing the Frame timestamps Representing the Frame timestamps This represents the average angle of the principal axis direction during the stable period. This represents the standard deviation of the principal axis angle during the stable period. This represents a dimensionless perturbation constant used to prevent the denominator from being zero. Represents the currently calculated frame index value;
[0097] The direction change rate index is a quantitative indicator that reflects the speed of attitude change and attitude stability of the UAV within a period of time after the UAV adjusts its heading. It is calculated by weighting the change rate (i.e., angular velocity) of the principal axis direction angle of each frame. It reflects the degree of change of UAV attitude (mainly orientation or heading) per unit time. The larger the value, the more violent the heading fluctuation during that period. The smaller the value, the more stable the UAV heading tends to be.
[0098] Select the pose data segment after the adjustment action is completed, and extract the timestamp sequence of three consecutive frames in that segment. Angle sequence corresponding to the principal axis direction The rate of change of the orientation angle is obtained by calculating the ratio of the inter-frame orientation angle difference to the time difference. and Then, the mean of the principal axis direction angle sequence is calculated. And further calculate the standard deviation of the orientation angle. Using the standard deviation plus a disturbance term The weighted correction coefficient for the corresponding frame is constructed by using the denominator of the deviation normalization coefficient to amplify the weighted influence of frames that deviate from the average orientation angle. Then, the orientation change rate of each frame is multiplied by its corresponding weight coefficient to form a weighted orientation change rate set. Finally, the arithmetic mean of this set is taken to obtain the orientation change rate index. As a basis for determining whether the heading and attitude changes are stable after the adjustment maneuver, the specific calculation process is as follows:
[0099] Suppose the sampled data consists of three frames, and the timestamp sequence is as follows:
[0100] ;
[0101] The sequence of angles along the principal axis is as follows:
[0102] ;
[0103] Calculate the original value of the directional angular difference rate using the formula:
[0104] ;
[0105] ;
[0106] The direction change rate array is: 30, 15;
[0107] Calculate the average value of the principal axis direction angle:
[0108] ;
[0109] Calculate the standard deviation:
[0110] ;
[0111] ;
[0112] Set disturbance term Calculate the weighting coefficients:
[0113] For frame 1 (used to calculate the first set of rates):
[0114] ;
[0115] Weighting coefficient = ;
[0116] For frame 2 (used to calculate the second set of rates):
[0117] ;
[0118] ;
[0119] Calculate the weighted rate value:
[0120] Group 1: ;
[0121] Group 2: ;
[0122] Directional change rate index:
[0123] ;
[0124] The result To adjust the weighted average of the attitude change rate after the action is completed, if a judgment threshold is set... Then there is This indicates that the current posture has not reached a stable state, and the final judgment depends on... and Comparing the values, if If the data segment is stable, it can be identified as a stable data segment; otherwise, it is an unstable data segment.
[0125] The following interval criteria are defined:
[0126] when At this point, the attitude change is in an extremely stable state, with very weak fluctuations in the rate of directional change and its weighted correction across frames, thus classifying it as a "completely stable interval".
[0127] when At that time, the degree of attitude change was within an acceptable range, and the overall fluctuation was limited by the standard deviation, thus it was determined to be in the "stable range".
[0128] when At this time, the frequency of attitude changes between frames increased, and some frames showed significant angle deviations, but overall they still exhibited a certain regularity, which was identified as a "transition interval".
[0129] when At this point, the rate of change in direction already indicates a drastic change in attitude, with significant inter-frame angle fluctuations, classifying it as an "unstable region."
[0130] The current actual calculation result is The conditions are met. Therefore, it should be classified as an "unstable interval", indicating that the heading axis angle of the analysis frame segment after the adjustment action is completed shows a drastic change. The angular velocity of some frames increases and deviates from the mean angle. Under the control of standard deviation, it still produces a large weighted value. After comprehensive weighted averaging, it forms a significantly high index value, indicating that this attitude data segment cannot be included in the subsequent processing as a heading stability feature segment and needs to be excluded or processed separately.
[0131] S503: Based on the heading stability data segment, compare the attitude change range, analyze the change trend of the attitude data after the input freeze, judge the continuity of the heading data before and after the adjustment process, determine the criterion node for the completion of the heading adjustment action, and obtain the heading stability assessment result.
[0132] First, the average yaw angle of each stable segment is read and compared with the target yaw angle marked in the last input command before the adjustment action. If the difference is less than or equal to 1.5 degrees, it is marked as reaching the target heading. Then, the attitude fluctuation trend within each stable segment is analyzed to determine whether there is a slow drift or short-term jump in the yaw angle under the frozen input state. If the yaw angle fluctuates continuously within ±1 degree within 10 seconds after freezing and there are no abnormal rate points, the attitude data is considered to be stable. Then, the yaw angle change before the adjustment starts and at the beginning of the stable segment is compared. If the change amplitude between the two is consistent with the original adjustment amplitude and the direction is consistent, it is determined that the adjustment result matches the command. Criterion nodes are established according to the judgment conditions. For example, "reaching the target yaw angle and remaining stable for more than 5 seconds" is set as the heading adjustment completion mark. The first time point that meets this standard is marked in the stability data segment, which is the adjustment completion criterion node, forming the heading stability assessment result.
[0133] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for autonomous orientation adjustment of unmanned aerial vehicles (UAVs) based on landmark recognition, characterized in that, The method includes: S1: Based on the forward-facing camera component of the drone, analyze the landmark outline region in the image, determine the pixel gradient direction within the region, identify landmarks with the same direction, adjust the main axis direction criterion, lock the main axis direction, and obtain the main axis direction recognition information; S2: Based on the main axis direction recognition information, determine the change of the main axis direction of the landmark in multiple consecutive frames, compare the differences before and after the main axis frame by frame, analyze the direction continuity, identify feature frames with similar angle change amplitudes, exclude frames with direction changes, and obtain the number of stable angle sequences. S3: Based on the stable angle sequence number, compare the difference between the main axis direction in consecutive frames and the previous frame, analyze the angle change trend between the current frame and the reference frame, determine whether direction adjustment is needed, identify the main axis direction that meets the correction standard, and obtain the heading adjustment command. S4: Based on the heading adjustment command, the direction and amplitude information are converted into control signals, the signal format is analyzed to see if it is consistent with the flight control port protocol, and the control signal is sent to the flight control module through the communication module to obtain the direction control signal; S5: Based on the direction control signal, determine the response of the flight control module, monitor the attitude change during the UAV's heading adjustment, monitor the rate of direction change, screen stable periods, and obtain the heading stability assessment result.
2. The method for autonomous orientation adjustment of unmanned aerial vehicles based on landmark recognition according to claim 1, characterized in that, The main axis direction identification information includes image gradient direction, main axis direction of landmark area and pixel gradient intensity; the stable angle sequence number includes inter-frame angle consistency and angle change amplitude; the heading adjustment command includes adjustment direction, adjustment amplitude and heading correction method; the heading control signal includes flight control command format, command transmission protocol and signal transmission delay; and the heading stability evaluation result includes heading change rate, stabilization time period and adjustment end indicator.
3. The method for autonomous orientation adjustment of unmanned aerial vehicles based on landmark recognition according to claim 1, characterized in that, The specific steps for obtaining the spindle direction identification information are as follows: S101: Based on the forward-facing camera component of the UAV, analyze the real-time image frames collected, calculate the brightness gradient of each pixel in the image, determine the change trend of pixels in the horizontal and vertical directions in the edge area, compare the directional changes of adjacent pixels, identify pixel groups with the same direction, and obtain the directional trend distribution characteristics. S102: Based on the directional trend distribution characteristics, filter the set of pixels with coherent spatial distribution, determine whether the pixels form a region with continuous boundary characteristics, analyze the arrangement order of pixels in each region, calculate their respective dominant arrangement direction, and remove pixel blocks that fail to form a directional structure to obtain a linear arrangement attribute set. S103: Based on the linearly arranged attribute set, screen the direction terms, analyze the overall arrangement pattern of the pixels associated with the direction terms in the image space, determine the coherence and consistency of the direction terms, designate them as the main direction of the current image frame, and obtain the main axis direction recognition information.
4. The method for autonomous orientation adjustment of unmanned aerial vehicles based on landmark recognition according to claim 1, characterized in that, The specific steps for obtaining the number of stable angle sequences are as follows: S201: Based on the main axis direction recognition information, compare the orientation difference of the main axis direction in each frame of a continuous image frame, determine the trend of change of the main axis direction between adjacent frames, identify the frame group that can maintain connection in the trend of change, and obtain the direction continuation sequence. S202: Based on the direction continuation sequence, determine whether the direction change trends of adjacent frames are consistent, analyze the trend coherence between frame groups, remove frame groups that do not meet the coherence standard, and arrange the retained frames in an orderly manner to obtain a trend coherence set. S203: Based on the trend coherence set, count the number of consecutive frames, determine the arrangement structure of each consecutive frame segment, compare the arrangement order of different consecutive frame segments, select the frame group with continuous arrangement characteristics, and obtain the number of stable angle sequences.
5. The method for autonomous orientation adjustment of unmanned aerial vehicles based on landmark recognition according to claim 1, characterized in that, The specific steps for obtaining the heading adjustment command are as follows: S301: Based on the number of stable angle sequences, compare the orientation difference between the main axis direction of the current frame landmark and the main axis direction of the previous stable frame, determine the direction of the difference change in the continuous frame sequence, identify whether the main axis direction shows a continuous unidirectional change, record the continuity of the change trend, and obtain the angle trend parameters. S302: Based on the angle trend parameters, filter the frame groups that continuously show directional change features, analyze the spatial offset structure of the main axis direction of the frame group relative to the reference frame, determine the coherence of the directional features of each frame, remove frames that do not maintain directional consistency, and obtain the directional matching index. S303: Based on the direction matching index, determine the rotational relationship of the main axis direction in spatial distribution, analyze the rotational parameter characteristics between the main axis direction and the reference frame, compare the changes in rotational direction and angle amplitude, determine the direction adjustment elements that meet the conditions, and obtain the heading adjustment command.
6. The method for autonomous orientation adjustment of unmanned aerial vehicles based on landmark recognition according to claim 1, characterized in that, The specific steps for obtaining the direction control signal are as follows: S401: Based on the heading adjustment command, analyze the direction parameters and amplitude parameters, determine the control characteristics after the combination of each parameter, optimize the logical expression of the direction parameters, adjust the numerical representation of the amplitude parameters, perform unified structure processing on all parameters, and obtain a formatted control command set. S402: Based on the formatted control instruction set, compare it with the communication protocol format of the flight control module, filter the instruction content that is compatible with the protocol, determine the compatibility of each instruction parameter with the flight control port, match the fields required by the protocol, establish the mapping relationship between parameters and ports, and obtain instruction mapping information; S403: Based on the instruction mapping information, determine the channel allocation status of each control field, transmit the data structure to the flight control module in sequence through the communication module, monitor the response signal content fed back by the flight control module, compare the response consistency with the input instruction, and obtain the direction control signal.
7. The method for autonomous orientation adjustment of unmanned aerial vehicles based on landmark recognition according to claim 1, characterized in that, The specific steps for obtaining the heading stability assessment results are as follows: S501: Based on the direction control signal, determine the response content returned by the flight control module, analyze the correspondence between the response content and the input signal, monitor the execution steps of the flight control module to the command, collect the attitude information of the UAV during the heading adjustment, and obtain response status discrimination data; S502: Based on the response state discrimination data, analyze the attitude changes of the UAV at each moment during the heading adjustment, calculate the direction change rate during the adjustment process, screen the attitude change amplitude at each time period after the adjustment action, determine whether the attitude data shows a stable trend, and obtain the heading stability data segment. S503: Based on the heading stability data segment, compare the attitude change range, analyze the change trend of the attitude data after input freezing, determine the continuity of heading data before and after the adjustment process, determine the criterion node for the completion of the heading adjustment action, and obtain the heading stability assessment result.
8. The method for autonomous orientation adjustment of unmanned aerial vehicles based on landmark recognition according to claim 1, characterized in that, The landmark outline region refers to the area of an object with a geometric shape identified in the image captured by the drone camera through edge detection or outline recognition, and the internal pixels refer to the pixel information of each region in the image.
9. The method for autonomous orientation adjustment of unmanned aerial vehicles based on landmark recognition according to claim 1, characterized in that, The landmark axis refers to the main direction determined in the landmark object or region. The difference before and after the axis refers to the amount of change in the main axis direction of the landmark object in consecutive image frames. The angle change range refers to the change range of the main axis direction in multiple image frames, and the degree of change in the object's orientation is determined.
10. The method for autonomous orientation adjustment of unmanned aerial vehicles based on landmark recognition according to claim 1, characterized in that, The angle change trend refers to the change trend of the main axis direction in consecutive image frames, and the heading adjustment period refers to the time period after the UAV receives the heading adjustment command and begins to execute the adjustment operation.