Tracking Algorithm with Adaptive Bandwidth of Kernel Function for UAV Autonomous Aerial Refueling

The use of machine vision to track the receiver aircraft’s receptacle is one of the key steps in automated aerial refueling. Traditional Meanshift tracking algorithm’s kernel bandwidth is fixed, when the target size changes, it will produce with the bias even with the loss of the situation. Aiming at this problem, this paper proposes a kernel bandwidth adaptive algorithm based on corner matching. First, use backward tracking method to amend the core window center. Then according to the Harris algorithm to detect the corner, use small-scale approach for the two points between frames to match and regression analysis, namely determine the update parameters of nuclear window width. Experiments show that the algorithm can track the target accurately when the size of tracking target change, and the kernel window width can be better suited to the target size.


Introduction
UAV (unmanned aerial vehicles) play an increasingly important role in the field of civilian and military fields because of its small size, low cost, easy to use, etc. However, weak load capacity, short life time and other issues limit the use of UAV. UAV with independent air refueling capabilities has a large flight distance and a long blank time, expanding the use of UAV.
One of the key technologies of autonomous air refueling is real-time access to the location of the receiver aircraft's receptacle. Traditional UAV navigation system is generally based on GPS, INS and integrated navigation system, which does not meet the location accuracy requirements. In recent years, the development of machine vision provides an effective support for the UAV autonomous air refueling. Introduce the machine vision into the autonomous air refueling process can get more accurate location information. In many machine vision tracking methods, many scholars have studied Meanshift because it is an efficient pattern matching algorithm with the advantages of high robustness, realtime and easy realization. Document [3] use RGB linear fusion and add Kalman Filter algorithm to estimate the location of moving conditions, which can track the target accurately when the size of target is constant. When the tanker closes to receiver aircraft's receptacle, target will gradually become larger in the tracking video. Then the tracking is not accurate because the method kernel function bandwidth is fixed. Document [4] uses the method of comparing Bhattacharyya coefficients to change the bandwidth of kernel function. However, this method needs to do multiple times of Meanshift algorithm with different kernel bandwidth. The calculation is large, and the search box is proportional change, which cannot adapt to the target changes. Document [5] uses positive and negative 10% increments to change the kernel function bandwidth. It needs three times of Meanshift tracking based on three kernel bandwidth in the tracking of each frame. It will get a good tracking effect when the target is smaller, not suitable for autonomous air refueling process by the receiver aircraft's receptacle tracking. Document [6] changes the kernel bandwidth by the backtracking method based on the corner feature, but the tracking is not accurate enough only when the target feature is described.
Aiming at this problem, this paper proposes a kernel bandwidth adaptive algorithm based on corner matching. Use backward tracking method to amend the core window center and make the tracking window aim at the target heart. According to the Harris algorithm to detect the corner, use small-scale approach for the two points between frames to match, which reduce the complexity of corner matching. Obtain the affine parameters based on the result of corner matching and modify the kernel function. In addition, when using the Meanshift tracking algorithm, add spatial information and color information to describe the target model comprehensively, and ensure the tracking effect is more accurate.

Meanshift Algorithm Theory
Figures and tables, as originals of good quality and well contrasted, are to be in their final form, ready for reproduction, pasted in the appropriate place in the text. Try to ensure that the size of the text in your figures is approximately the same size as the main text (10 point). Try to ensure that lines are no thinner than 0.25 point.
Given n number sample points i x in a d-dimensional Meanshift vector at the point of x is defined as: Where, k represents k number points in n number sample points fall in the selection area. i x is the pixel, x is the initial position, h S is a high-dimensional ball with the radius h , which is the set point of y satisfying the relationship.
It can be seen ( ) i x x  is the shift vector of sample x respect to the initial position. Figure 1 is Meanshift iteration process. The average offset vector ( ) h M x will point to most sample distribution area, that is, the gradient direction of the probability density function. Meanshift algorithm will eventually converge to the actual location of the target through constant iteration.

Target model and similarity measure
Add the spatial location information of the pixel, and synthesize the color feature and the spatial feature to describe the target template. According to the distance between each pixel and the reference point, the kernel function is used to assign different weights to different pixels, and the weighted color histogram is constructed.
The weight of each pixel is calculated by the following kernel function: Where, mid x 、 mid y are the x-axis and y-axis center coordinate of the selected graphic template. , i i x y , respectively, are horizontal and vertical coordinates of The probability density of the target template is estimated as: Where, u q is the probability density of the target template histogram, h is kernel function bandwidth, x is any pixel in the template, C is normalization coefficient.
Similarly, the probability density of the sample template with center point j x is estimated as: Introduce BH coefficients to describe the similarity between the target template and the sample template: Where u q is the probability density histogram of the target template, j x is the j th particle of the particle set, is the probability density histogram of the sample template centered on j x , and m is the number of color histograms u . The higher the value of BH , the higher the similarity between the target template and the sample template is, and vice versa.

Affine model
Affine transformation is a basic transformation in affine geometry, and the affine transformation of twodimensional continental space can be expressed as: Where   Then the kernel function bandwidth can be modified according to Eq. (9): Where, i h and 1 i h  are the kernel function bandwidth of the i frame and 1 i  frame respectively.

Kernel window centre registration
Set the frame i of the tracking window (namely kernel window) as i T , the center of the window is i C , the target heart is i O . It is known from the literature [6] that when the target becomes smaller, can obtain the best match window through the Meanshift iteration, as long as the expansion and contraction of target in the frame 1 i  are in the i T range. That is, the center 1 i C  of the tracking window will always lock the target's centroid. In most cases, Meanshift tracking algorithm can lock the target centroid as long as most of the region of the target is within the range of i T . When the target gradually increases, it will produce positioning bias, and then need to register the center of the window registration.
When the target is gradually increased, if the 1 i  frame target is larger than the tracking window range, the tracking window Since the interval between two adjacent frames is very short, so use ' d to make up the offset d , the 1 i  frame track window after the registration is estimated as follows:

Corner detection and matching
Corner detection of the target template, match the corner points between the two frames by a small range of fringes, and the affine model parameters are estimated according to the corner matching results.
Use Harris algorithm to detect corner [8][9], judge whether a point is a corner point by analyzing the autocorrelation function characteristic matrix of the surrounding area of the pixel, the autocorrelation function is: Where u v 、 are small offset in the x y 、 direction,

 
, I x y is the gray value at   , x y pixel,   , w x y is filter, the autocorrelation function for Taylor expansion can be obtained from the correlation matrix: x y x y y x y Corner response function is:

Tracking Algorithm
Use backward tracking method to amend the core window center. According to the Harris algorithm to detect the corner, use small-scale approach for the two points between frames to match. The affine parameters are obtained based on the result of corner matching and the kernel function is modified. The algorithm is as follows: Step 1: Initialization: manually select the target area and determine the target template histogram.
Step 2: Based on the backward tracking method, according to the formula (11) to calculate the error compensation value ' d , according to formula (12) to calculate the window centre Step 3: According to formula (15) to calculate the corner points in the tracking window of the i frame and the 1 i  frame respectively, and match the corresponding corner points by the small range adjacent method.
Step 4: regression analysis of the matching corners to determine the affine parameters x y a a 、 , amend the kernel bandwidth.
Step 5: track and correct the next frame, go to step (2).

Experiment Results
The effectiveness of the algorithm is verified by the semi-physical simulation platform. We use F-16 model as tracking target. In the x, y-axis direction, it is headed by a stepper motor driving a ball screw. The movement holder is shown in  As shown in Fig. 3 (a) (b), when the target is slightly larger, the tracking window (kernel window) has a small deviation, the tracking result is still possible, in Fig. 3 (c) target continues to become larger, tracking error becomes larger, and the tracking window is slightly smaller with the target. As shown in Fig. 3 (d), as the target becomes larger, the tracking window is significantly smaller than the target and has a significant deviation.
Kernel bandwidth adaptive algorithm based on corner matching tracking results is shown in Figure 4: As shown in Fig.4, with the change of the target size, the algorithm mentioned in this paper can accurately track the target, the tracking window can also adapt to the target size changes. This paper proposes a kernel bandwidth adaptive algorithm based on corner matching. Use backward tracking method to amend the core window centre and make the tracking window aim at the target heart. According to the Harris algorithm to detect the corner, use small-scale approach for the two points between frames to match. The affine parameters are obtained based on the result of corner matching and the kernel function is modified. In addition, when using the Meanshift tracking algorithm, add spatial information and colour information to describe the target model comprehensively, and ensure the tracking effect is more accurate. Experiments show that the algorithm proposed in this paper can adapt the core window centre to the target centroid according to the change of the target size, and correct the kernel bandwidth according to the size of the target.