A Novel Technique for Rejecting Non-Aircraft Artefacts in Above Horizon Vision-Based Aircraft Detection

Unmanned aerial vehicle (UAV) operations are steadily expanding into many important applications. A key technology for better enabling their commercial use is an onboard sense and avoid (SAA) technology which can detect potential mid-air collision threats in the same manner expected from a human pilot. Ideally, aircraft should be detected as early as possible whilst maintaining a low false alarm rate, however, textured clouds and other unstructured terrain make this trade-off a challenge. In this paper we present a new technique for the modelling and detection of aircraft above the horizon that is able to penalise non-aircraft artefacts (such as textured clouds and other unstructured terrain). We evaluate the performance of our proposed system on flight data of a Cessna 172 on a near collision course encounter with a ScanEagle UAV data collection aircraft. By penalising non-aircraft artefacts we are able to demonstrate, for a zero false alarm rate, a mean detection range of 2445m corresponding to an improvement in detection ranges by 9.8% (218m).


I. INTRODUCTION
The unmanned aerial vehicle (UAV) market worldwide is projected to grow by US $47.8 Billion by 2025, with a compounded growth of 18.8%. This growth is driven by the increasing use of UAVs in various commercial applications, such as monitoring, surveying and mapping, precision agriculture, aerial remote sensing, product delivery and many more [1]- [3]. The consistent increase in the global market has propelled efforts to ensure that routine, standard and flexible UAV operations are integrated into the national airspace such that they do not compromise the existing safety levels [4]. The risk of mid-air collision is an important safety concern that is both faced and posed by UAVs. The capability to avoid mid-air collisions would allow UAVs to more routinely operate in common airspace [5], [6].
In order to reduce the risk of a mid-air collision, the national airspace is strictly regulated with several safety layers [4], [5], [7]. The first few layers involve operational procedures, air traffic management and cooperative collision avoidance systems. The final layer is for potential mid-air collision threats that are not caught by the other layers e.g. aircraft that are not communicating their presence. In these situations non-cooperative collision avoidance is necessary. For a manned aircraft this final safety layer involves a pilot visually seeing and then avoiding a collision threat. For UAVs this final safety layer involves sensing and avoiding Fig. 1. An example of the above horizon conditions and aircraft target size which we are trying to detect. Note the texture in the clouds and the similarities between the aircraft and cloud features potential non-cooperative, mid-air collision threats with a proficiency matching or exceeding that of human pilots. A general guideline for how well human pilots detect potential collision threats is given in [8] where pilots, who were alerted to the presence of potential collision threat, were able to detect them with an 86% success rate at a median range of 2593m.
For sense and avoid (SAA), in small to medium sized UAVs, machine vision has been established as a potential technology as vision sensors have power, cost, size and weight benefits over other sensing approaches [9]. To meet the approximate human guidelines (as well as providing sufficient time for avoidance manoeuvres) it is desirable to detect aircraft as early as possible in an image sequence. At these ranges aircraft appear in vision sensors as a very small number (approx 1-10) of locally dim pixels that poorly contrast with the background (see Figure 1 for an example of aircraft size). In this paper we will focus on the "sense" aspect of SAA, specifically vision-based aircraft detection. There have been a variety of collision avoidance strategies to address the "avoid" aspect suitable for use with vision-based aircraft detection approaches (see [9], [10] and references therein), however that is out of scope for this paper.
The most promising approaches for vision-based aircraft detection that have been presented in the literature exploit the use of a multi-stage detection pipeline [7], [11]- [15]. The first stage typically exploits image pre-processing where spatial and visual aircraft features are highlighted and background clutter is suppressed. Popular approaches that Fig. 2. Overview of our multi-stage detection system. An image sensor captures an image which is then stabilised. Morphology is used for the image pre-processing stage and hidden Markov model (HMM) filtering for the temporal filtering. For the detection logic stage we propose our new system which exploits the visual appearance of aircraft emergence and common false alarms.
have been proposed in the literature to achieve this include morphology [7], [11], [12], and image frame differencing [7], [13]. Various machine learning [16] and deep learning [17], [18] approaches have been investigated to exploit the visual appearance of aircraft. Recently [15] used a deep CNN fused with morphological processing in the image preprocessing stage to detect aircraft above the horizon with a mean detection range of 2527m and no false alarms. However there are several drawbacks in using learnt approaches in this application as data is expensive and challenging to collect.
Finally the detection logic stage aims to utilise the information available from the image pre-processing and temporal filtering stages in order to declare whether an aircraft is present or not. Some more simple approaches include looking for a detection in a 5 × 5 neighbourhood in the previous frame [20] and checking if the aircraft is increasing in area [21]. In [14] they proposed a new way of modelling aircraft emergence and were able to obtain a theoretically optimal detection logic. In this paper we aim to build off the theoretically optimal detection logic presented in [14] however we also aim to exploit the visual appearance of aircraft emergence and common false alarms.
The key contributions of this paper are casting the visionbased aircraft detection problem as an optimal stopping problem where we are able to introduce a penalty on detecting non-aircraft artefacts such as cloud features. We are able to establish that the optimal solution occurs on first entry of the change posterior into a stopping region characterised by the union of convex sets. Using these properties we propose a new detection logic stage that is able to improve detection ranges and false alarm rates.
The rest of this paper is structured as follows. In Section II we set up our model of aircraft dynamics and observations, this lets us cast our problem as an optimal stopping problem and propose two candidate rules for aircraft detection. In Section III we evaluate the performance of our proposed rules on flight data of near collision course encounters. We provide concluding remarks in IV.

II. PROPOSED SYSTEM
In this section we describe our proposed vision-based aircraft detection system. Similar to several state of the art approaches we exploit a multi-stage detection pipeline as seen in Figure 2. An image sensor captures an image which is then stabilised (the data we will test on was stabilised by a GPS-INS sensor see [22] for full details). We will now describe the other stages of our proposed detection system.

A. Image Pre-Processing
As noted in the introduction morphological processing is commonly exploited in the image pre-processing stage. For a greyscale image I, the dilation by a morphological structuring element S is denoted by I ⊕ S and erosion is denoted by I S. Similar to several state of the art approaches [12], [14] we use bottom hat [I ⊕ S] S − I morphological processing which emphasises dark targets In [23] they observed that targets are generally darker than the background (supporting the notion that bottom hat filters are appropriate).

B. Proposed Temporal filtering
For our temporal filtering stage we use a HMM approach. Let us consider an aircraft in an image sequence which we are trying to detect as soon as possible. The aircraft emerges over time and is (potentially) first visually apparent in an image frame from a single pixel in size.
For k ≥ 0, we introduce a Markov chain with a state to represent each of an aircraft's possible N pixel locations in an image. Following [14] we also introduce an extra state to denote when the aircraft is not visually apparent anywhere in the image frame (that is, it has not visually emerged yet, or there is no collision threat). Let us denote this Markov chain as X k ∈ {e 1 , e 2 , . . . , e N , e N +1 } where e i ∈ R N +1 are indicator vectors with 1 as the ith element and 0 elsewhere. For i ∈ {1, . . . , N }, e i corresponds to the aircraft being visually apparent at the ith pixel and e N +1 corresponds to the aircraft not being visually apparent. We denote this the out of image state.
The following are the three key parameters of a HMM description of target image motion for 1 ≤ i, j ≤ N + 1 1) State transition probabilities: gives the probability of moving between different states. This can either be from the out of image state to a pixel in the image, or moving between different pixels. An aircraft not current located in the image is able to transition from the out of image state to any pixel in the image allowing for the possibility that an aircraft can visually emerge anywhere as it approaches from a distance. Possible aircraft inter-frame motion can be modelled by a transition patch (see [12] for detailed explanation of patches). In this paper we will use the patch that allows transitions to side and above pixels as seen in Figure 3. 2) Initial probabilities: π i = P (X 0 = e i ) denotes the probability that the target is initially located in state e i . We initialise our filter with an equal probability of specify the probability of obtaining the observed image measurement y k given that the target is actually in pixel location e i . At each time k > 0 we obtain a noise corrupted, greyscale image y k that has been morphologically processed using bottom hat. We denote the measurement of the ith pixel at time k as y i k and following [12], [14] for i, j ∈ {1, . . . , N + 1} our diagonal matrix of (unnormalised) output densities is then given by the approximation . . , N } and b N +1 (y k ) = 1 (see [14] for justification). Essentially, the likelihood of an aircraft is proportional to the strength of the morphology output.
For k > 0 we can now calculateX k ∈ R N +1 via the HMM filter [24], which can be regarded as an indicator of likely target locationŝ With the initial condition π and where N k are scalar normalisation factors defined by Here, · denotes an inner product.

C. Proposed Detection Logic
We now present our proposed detection logic. We first cast our problem as an optimal stopping rule and establish an optimal policy. We then propose a general pragmatic greedy decision rule for use as our detection logic.
1) Problem Formulation: Our desired detection logic can be characterised by the following continuing and stopping costs, . . , N }) denotes the delay penalty (when an aircraft is present but a detection has not been declared), c 2 > 0 denotes the false alarm penalty (where an aircraft is not present but a detection has been declared) andc i ∈ R N +1 for i ∈ {1, . . . , N } denotes a penalty for incorrectly declaring a detection on a non-aircraft artefact. Given the location decision i such that S(X) min i∈{1,...,N } S i (X τ ), we seek to design a stopping time τ ≥ 0 that minimises the following cost criterion Where E · X denotes the expectation operation corresponding to the probability measure where the initial state has distributionX, 2) Optimal Policy: Let us consider a stopping action u k ∈ {1 (continue), 2 (stop)}. Then, there is an optimal policy µ * (X k ) to minimise our cost criterion (5) given by the value function V (X k ) min τ {J(τ,X k )}. This value function can be described by the following recursion (similar to [25, pg. 258 whereX + (X, y) = 1, B(y)AX −1 B(y)AX, and B(y) = diag(b 1 (y), . . . , b N +1 (y)). If we let Q(X) C(X) + E[V (X + (X, y))|X] denote the total cost incurred if continuing, then the optimal policy is given by In general, the value recursion (6) is difficult to compute making it unsuitable for use in the vision-based aircraft detection application. We can however establish some properties of the optimal solution that allow us to propose some practical rules.
3) Structure of the Optimal Policy: We now establish that our optimal stopping problem can be solved by finding N convex stopping sets (rather than solving the dynamic programming recursion equations directly). We define the stopping region for state e i as follows R i S {X : S i (X) ≤ Q(X)}. Theorem 1. Consider the value recursion (6) and let R S ∪ i∈{1,...,N } R i S be the union of the N regions R i S . Then, the optimal stopping time given by τ * inf{k :X k ∈ R S } Furthermore, the regions R i S forming the optimal stopping region R S are convex and contain e i .
Proof. See Appendix for proof. Theorem 1 establishes that the solution to our optimal stopping problem can be solved by finding the N convex stopping sets R i S . Given the parallels with our problem setup and quickest change detection and identification, we expect the stopping region R S to not be a connected region in general [26].

4) A Greedy Decision Rule:
We now propose a practical greedy rule which can be applied in our application and establish some performance bounds.
Let us define R i g {X : S i (X) ≤ C(X)} and the union of sets R g = ∪ i∈{1,...,N } R i g . We also define the probability of a false alarm (PFA) as PFA P (X τ = e N +1 ).
Lemma 1. For i ∈ {1, . . . , N }, we consider the union of sets R i g ⊂ R i S and the value recursion (6). Then, the greedy decision rule given by where the maximum delay constant c m max ic i 1 .

Proof. See Appendix for proof
Lemma 1 suggests that a pragmatic solution to our optimal stopping problem is the greedy (sub-optimal) stopping rule τ g . Moreover, if this rule is used then the cost function parameters can be related to a false alarm performance tradeoff. The lemma also provides some insight into the role of cost parameters and false alarm performance. Now, rather than solving the dynamic programming recursion equations (6) directly or trying to calculate the convex stopping sets R i S (both of which are computationally expensive), we are able to just run the HMM filter (1). We highlight that you do not need to know the value of the costs constantsc 1 , c 2 ,c i to run the filter.

5) Proposed Greedy Detection Logic:
We now present two proposed greedy rules for use in the detection logic stage in our multi stage detection pipeline. Due to Lemma 1 we know that these stopping rules are a greedy (sub-optimal) solution to our cost criterion (5). Greedy Rule 1: We first consider a a simple stopping rule of the form whereX i k is the ith element ofX k . Intuitively, this rule declares a detection when the probability of being in one of the first N states is higher than a threshold.
Greedy Rule 2: We introduce a mapping M(·) which reshapes the pixel elements of the vectorX k to an image matrix and also introduce the inverse mapping M −1 (·). Our second stopping rule is of the form where ζ i (·) is the ith element of ζ(·) and ζ(·) M −1 (M(·) * ω) and * denotes the convolution operation with the kernel Intuitively we know that aircraft emerge in an image at approximately 1 pixel in size and hence only occupy one state. As our aim is to detect this aircraft emergence, we propose a kernel that penalizes the states around the aircraft as a type of penalty. Additionally, we found that this kernel was an effective way to reject cloud artifacts that are generally larger in size (more pixels) than an aircaft emerging in an image sequence.

III. RESULTS
In this section we examine the performance of our two proposed detection logic stages in the vision-based aircraft detection application. As a baseline we compare to the theoretically optimal intermittent signal detection (ISD) rule presented in [14], we denote this the baseline ISD rule.
We compare the performance of our proposed detection systems on 15 near mid-air collision course encounters between two fixed wing aircraft; the data collection aircraft was a ScanEagle UAV and the other aircraft was a Cessna 172. An example of the flight path of a head on near collision course encounter is presented in Figure 5, and Figure 1 is an example of the size of aircraft we are detecting. For full details of the flight experiments see [22].

A. Illustrative Example
For i ∈ {1, . . . , N } Figure 4 shows an illustrative example for Case 10 of the Greedy rule 1 test statistic (max iX i k ) the Greedy rule 2 test statistic (max i ζ i ) and the baseline ISD rule test statistic (1 −X N +1 k ). The aircraft is visually present from image frame k = 680 to k = 800. All 3 test statistics effectively increase at a similar time corresponding to them detecting aircraft presence. Greedy rule 1 and Greedy rule 2 both correctly declare at k = 698 (corresponding to aircraft at range 2542.4m) and the baseline ISD rule correctly declares slightly later at k = 705 (corresponding to aircraft at range 2479.8m).
We highlight the peak in the Greedy rule 1 and ISD rule test statistics just after k = 100. This corresponds to the rules mistaking small cloud features for aircraft. Importantly, Greedy rule 2 effectively rejects this false alarm.
We also note the choice of thresholds for the 3 rules. Greedy rule 1 has a higher threshold than Greedy rule 2 so that it does not declare false alarms. We also note that the scale of the baseline ISD rule corresponds to a significantly higher threshold, and to a higher number of significant figures than the two greedy rules, which can be set between 0 and 1.

B. Detection Range Performance
We now investigate the detection range performance across all 15 cases from our test data. We highlight that the detection range and false alarm rates vary with the choice of the threshold parameters. Hence, to ensure fair comparison, we will compare these rules on the basis of the lowest thresholds  Fig. 6. A comparison of the proposed Greedy rules compared to the baseline ISD rule for all 15 cases presented in [22]. The mean detection distance and standard error was 2295m and 22m for Greedy rule 1, 2445m and 61m for Greedy rule 2 and 2227m and 52m for the baseline ISD rule.
for each rule that achieve zero false alarms (ZFAs) in this data set. In practice, detection thresholds could be adaptively selected on the basis of scene difficulty such as proposed in [27].
The resulting ZFA detection ranges are presented in Figure  6. The mean detection distance and standard error was 2295m and 22m for Greedy rule 1, 2445m and 61m for Greedy rule 2 and 2227m and 52m for the baseline ISD rule. Both our Greedy rules improved performance relative to the baseline ISD rule but importantly Greedy rule 2 improved detection ranges by a mean distance of 218m (9.8%).
Intuitively, the performance benefits from Greedy rule 2 are from penalising the non-aircraft artefacts and as a result more effectively rejecting false alarms. This allows for a lower ZFA threshold to be set and therefore an earlier detection can be declared.

IV. CONCLUSION
In this paper we presented a new technique for the modelling and detection of aircraft above the horizon that is able to penalise non-aircraft artefacts (such as textured clouds and other unstructured terrain). We first posed the vision-based aircraft detection problem in a Bayesian setting and established some optimal properties. We then proposed a practical greedy rule and developed some bounds for characterising its performance. Finally, we investigated the performance of two greedy rules on real flight data where we were able to improve detection ranges by a mean distance of 218m (9.8%) relative to a current state of the art vision-based aircraft detection technique.

APPENDIX
A. Proof of Theorem 1 For i ∈ {1, . . . , N }, we define the cost for the location decision i as and consider the value function V i (X k ) min τ {J i (τ,X k )} for the stopping time recursion described by Noting that the cost is linear here, then according to [25,Theorem 7.4.2], V i (X k ) are concave inX. Moreover, our location decisionS(X) min i∈{1,...,N } S i (X τ ) gives that at eachX k , J(τ,X) = min i J i (τ,X), and hence V (X k ) = min i V i (X k ) (swapping the order of the minimisation operations) implies that V (X k ) is concave inX (concavity is preserved under minimum operations). The V (X k ) concavity gives that R i S are convex sets (see similar proof steps in [25, Theorem 12.2.1]).
We proceed by considering the N location decisions as individual optimal stopping problems. For i ∈ {1, . . . , N } if S i (e i ) = 0 then e i ∈ R i S . WhenX ∈ R i S for any i implies S i (X) ≤ Q(X) and under optimal rule (7) implies that the optimal action is to stop. Contrarily,X / ∈ R i S for any i implies S i (X) > Q(X) and under optimal rule (7) implies the optimal action is to continue. Hence the union of the R i S regions defines the optimal stop region as given in the theorem statement.

B. Proof of Lemma 1
For i ∈ {1, . . . , N }, C(X k ) ≥ S i (X k ) implies that Q(X k ) ≥ S i (X k ) and therefore, according to the optimal policy (7), we should stop whenX k ∈ R i g . Further, if S i (e i ) = 0 then e i ∈ R i g giving our first lemma result. Simple algebra shows that C(X k ) ≥ S i (X k ) implies (c m + c 2 )X N +1 k +c iXk < c m (given that c m (1−X N +1 k ) ≥c 1Xk ). Taking the expectation operation on both sides and using the idempotent property gives our lemma's PFA performance bound result.