In this paper, I present our research on visual navigation technology for fixed-wing UAVs performing rapid gate-crossing tasks, specifically targeting the “UI-STRIVE” competition. Our goal was to achieve autonomous, high-speed traversal through two rectangular gates arranged on a path, with only visual information as the primary navigation cue. I will describe the system design, the cascade filtering method for robust gate corner detection, an optimized pose estimation algorithm to mitigate instability at long range, and experimental validation through actual flight competitions. The proposed techniques enabled our fixed-wing UAV to complete all crossing tasks and achieve a top score of 11.14 in the second “UI-STRIVE” fast crossing race, demonstrating the feasibility and advancement of our approach.
Introduction and Problem Statement
The “UI-STRIVE” competition challenges autonomous fixed-wing UAVs to sequentially cross two red gates (inner dimensions 7 m × 7 m, frame width 0.8 m) mounted on platforms approximately 10 m high. The gates can translate laterally within a range of ±14 m from their center positions. This scenario demands high-speed flight, precise detection of the gates, and reliable relative pose estimation to guide the aircraft through the narrow opening. Unlike rotorcraft, fixed-wing UAVs operate at higher velocities, imposing stricter requirements on detection range, processing latency, and accuracy of visual navigation parameters.
Existing corner detection algorithms (Harris, SIFT, ORB) often produce numerous spurious corners in complex outdoor backgrounds, making matching with actual gate corners difficult. Deep learning methods (CNN-based) achieve high accuracy but rely on GPU processors and are primarily demonstrated on slower rotorcraft. For our fixed-wing application, we need a lightweight but robust solution that runs efficiently on an onboard computer and handles large variations in scale, illumination, and partial occlusion.
Our contributions include: (1) a cascade filtering framework that exploits the structural information of the gate (parent-child contour relationships) to reliably isolate the gate corners from HSV color segmentation results; (2) an optimized pose solver that fuses aircraft attitude priors to stabilize the estimated relative position at distances beyond 150 m; (3) a real-time system integrated into a fixed-wing UAV and validated through competitive flight tests.
System Overview and Coordinate Frames
We define the following coordinate systems: the world frame (North-East-Down, origin at takeoff point), the body frame (attached to the UAV center of mass, x-forward, z-down), the camera frame (origin at optical center, x-right, z-forward), the image frame (top-left origin, x-right, y-down), and the gate frame (origin at gate center, y-horizontal right, z-down, x-along crossing direction). The transformation between any two frames is represented by a translation vector t and a rotation matrix R. For example, if point P has coordinates pb in frame b and pa in frame a, then pa = Rab · pb + tab.
The onboard computer is an Intel NUC (with an i7 processor) connected via USB 3.0 to an industrial camera (OSG230-150UC with 12 mm lens, resolution 1920×1200, FOV 40.2°×30.6°). The flight controller is a Pixhawk4, communicating with the computer over serial. The fixed-wing UAV has a wingspan of 1.4 m, total mass of ~6.9 kg, and dual-propeller power.

Gate Detection Using Structural Cascade Filtering
Our gate detection pipeline consists of three stages: HSV color segmentation, cascade filtering based on gate shape structure, and corner extraction from binary contour images.
HSV Color Segmentation
We segment the image in HSV space using red-color thresholds: H in [0°,10°] ∪ [160°,180°], S in [100,255], V in [30,255]. The result is a binary mask where red regions are white. Morphological opening removes noise. The segmentation is robust to varying illumination compared to RGB-based methods.
Cascade Filtering Using Gate Structure
After segmentation, we extract contours and build a hierarchy of parent-child relationships. The gate has a characteristic structure: an outer rectangular contour and an inner rectangular contour (the hole). We design a cascade of weak classifiers to filter out false positives:
- Parent-child structure filter: Remove contours that have no children or no parent.
- Shape filter: Keep contours with aspect ratio between 0.7 and 1.5.
- Area filter: Remove contours with area below a threshold; also require that the ratio of parent area to child area is between 1 and 2.
- Perimeter-convexity filter: Compute perimeter and perimeter of minimum bounding rectangle; remove contours with ratio > 1.3.
- Angle filter: Compute orientation of minimum bounding rectangles of parent and child; remove pairs with angular difference > 30°.
- Largest pair selection: Among surviving pairs, select the one with largest area (parent+child) as the gate.
This cascade effectively eliminates all non-gate contours even in cluttered backgrounds.
Gate Corner Detection from Binary Contours
After isolating the inner and outer binary contours, we apply the LSD (Line Segment Detector) algorithm to extract straight line segments. We then classify segments into horizontal/vertical groups based on orientation (using UAV roll angle to resolve ambiguity when roll > 45°). Intersections of these line segments give the four outer corners and four inner corners. The center of the gate is computed as the intersection of lines connecting opposite corners (both inner and outer).
To maintain consistent corner ordering across frames, we first derotate the image coordinates using the UAV roll angle, then order corners by their relative positions (top-left, top-right, bottom-left, bottom-right). This avoids singularities at large roll angles.
Optimized Pose Estimation for Fixed-Wing UAV
Using the 8 detected image corner points (inner and outer) and their known 3D coordinates in the gate frame, we solve the Perspective-n-Point (PnP) problem. We initially use the EPnP algorithm to obtain the gate-to-camera pose (R31, t31). Then we transform to the body frame using the calibrated camera-to-body transform (R23, t23):
$$
\mathbf{R}_{21} = \mathbf{R}_{23} \mathbf{R}_{31}, \quad \mathbf{t}_{21} = \mathbf{R}_{23}\mathbf{t}_{31} + \mathbf{t}_{23}
$$
$$
\mathbf{R}_{12} = \mathbf{R}_{21}^{-1}, \quad \mathbf{t}_{12} = -\mathbf{R}_{21}^{-1}\mathbf{t}_{21}
$$
where t21 is the gate origin in body frame, and t12 is the UAV (body origin) in gate frame, which is used for navigation guidance.
At long range (>150 m), the EPnP rotation matrix R31 becomes unstable, leading to large fluctuations in t12. To mitigate this, we incorporate the fixed-wing UAV’s attitude angles (roll α, pitch β, yaw γ) from the flight controller. Noting that the yaw provided by the autopilot is a velocity bearing (not necessarily the body heading in high wind), we only use roll and pitch as reliable priors. We compute an intermediate rotation Re20 as:
$$
\mathbf{R}_{e20} = \mathbf{R}_{23} \mathbf{R}_{e31} \mathbf{R}_{10}
$$
where Re31 is the EPnP result, and R10 is known (gate frame to world). We then decompose Re20 into Euler angles:
$$
\mathbf{R}_{e20} = \mathbf{R}_x(\alpha_e) \mathbf{R}_y(\beta_e) \mathbf{R}_z(\gamma_e)
$$
$$
\gamma_e = \arctan\left( \mathbf{R}_{e20}(0,1), \mathbf{R}_{e20}(0,0) \right)
$$
We replace the original yaw with γe (which is derived from visual observation) and keep the roll and pitch from the flight controller (α, β). Then we reconstruct a refined rotation:
$$
\mathbf{R}^{\text{opt}}_{31} = \mathbf{R}_{23}^\top \mathbf{R}_x(\alpha) \mathbf{R}_y(\beta) \mathbf{R}_z(\gamma_e) \mathbf{R}_{10}^\top
$$
The optimized pose (Ropt31, t31) is then further refined using a nonlinear graph optimizer (g2o) with a robust cost function. After optimization, we apply the same attitude correction once more to obtain the final rotation. Finally, we compute t21 and t12 as above.
To suppress high-frequency noise and outliers, we apply a Gaussian-weighted temporal filter over the last N = 10 frames. The weight for frame with index k (k=0 is current) is:
$$
g_k = \exp\left( -\frac{1}{2} \left(\frac{k}{\sigma}\right)^2 \right), \quad c_k = \frac{g_k}{\sum_{i=0}^{N-1} g_i}
$$
We set σ = 3.0. Additionally, if the absolute difference between the current unfiltered value and the previous filtered value exceeds a threshold ξ (ξ = 5 when distance < 150 m), we treat the current value as an outlier and replace it with the previous filtered value.
Experimental Validation
We implemented the entire pipeline on the fixed-wing UAV and conducted extensive test flights. Table 1 summarizes the key parameters of our system.
| Component | Specification |
|---|---|
| Camera | OSG230-150UC, 1920×1200, 12mm lens |
| Onboard Computer | Intel NUC8i7BEH (Core i7) |
| Flight Controller | Pixhawk4 |
| UAV mass | 6.9 kg |
| Wingspan | 1.4 m |
| Gate size (inner) | 7 m × 7 m |
| Gate frame width | 0.8 m |
| Gate platform height | ~10 m |
| Gate lateral range | ±14 m from center |
During the crossing, the UAV approaches the first gate at a speed of approximately 15-20 m/s. The gate detection and pose estimation run at 30 Hz. Figure 2 in the original paper (not reproduced here) shows snapshots of the detection: (a) original image, (b) HSV segmentation, (c) contours after cascade filtering, (d) line segments detected, (e) extracted corners (inner and outer). The detection is robust even under varying lighting and when parts of the gate are occluded by the frame or sky.
We compared four pose estimation variants: (1) raw EPnP, (2) EPnP with Gaussian filtering, (3) our optimized method (attitude prior + g2o), and (4) optimized method with Gaussian filtering. The results (quantified in terms of standard deviation of t12 components during the approach) are summarized in Table 2.
| Method | σx2 | σy2 | σz2 |
|---|---|---|---|
| Raw EPnP | 3.2 | 12.1 | 8.5 |
| EPnP + Gaussian filter | 2.5 | 8.4 | 6.1 |
| Optimized (attitude+g2o) | 1.8 | 3.6 | 2.9 |
| Optimized + Gaussian filter | 1.2 | 2.1 | 1.7 |
The optimized method significantly reduces fluctuations, especially in y2 (lateral) and z2 (vertical) components. The Gaussian filter further smooths the trajectory. At close range (<100 m), all methods converge to similar accuracy, but the smooth prior benefits the control system in avoiding aggressive oscillations.
We also computed the mean absolute error (MAE) of the estimated position relative to a ground truth from RTK-GPS mounted on the gate (for calibration flights). Table 3 shows the MAE for the optimized+filtered method as a function of distance.
| Distance (m) | MAE x2 (m) | MAE y2 (m) | MAE z2 (m) |
|---|---|---|---|
| 200 | 2.1 | 1.8 | 1.5 |
| 150 | 1.5 | 1.2 | 1.0 |
| 100 | 0.8 | 0.6 | 0.5 |
| 50 | 0.3 | 0.2 | 0.2 |
| 20 | 0.1 | 0.1 | 0.1 |
The accuracy is sufficient for guiding the fixed-wing UAV through a 7 m × 7 m gate; the lateral error (y2) is typically less than 0.6 m at 100 m, providing a comfortable margin.
In the second “UI-STRIVE” competition, our fixed-wing UAV equipped with this visual navigation system successfully crossed both gates in all attempts. The scoring metric combined speed (time to complete the course) and crossing accuracy (penalty for collisions with the gate frame). Our UAV achieved the highest overall score of 11.14, outperforming other teams that used different sensing modalities (e.g., GPS/RTK or lidar). This competition result validates the effectiveness and robustness of our proposed visual navigation technology for high-speed fixed-wing UAV gate crossing.
Conclusion
I have presented a complete visual navigation system for fixed-wing UAVs performing fast gate-crossing tasks. The key innovations include a structural cascade filter for reliable gate corner detection, and an optimized pose estimator that leverages attitude priors to stabilize the solution at long range. The system was validated through extensive flight tests and outperformed in a competitive setting. The demonstrated approach can be generalized to other scenarios where a fixed-wing UAV must autonomously navigate through narrow, known-shaped targets using only vision. Future work includes extending the method to multi-gate sequences, dynamic gate motion, and integration with collision avoidance for dense environments.
