A drone tracking a moving vehicle, person, or vessel must continuously estimate where the target is and how it is moving. This becomes challenging when the drone itself is also in motion. Changes in camera angle, image noise, motion blur, and temporary occlusion can all cause the detected position of a target to fluctuate between video frames.

Object detection algorithms such as YOLO can identify objects and locate them within individual frames. However, a detection result represents an observation at a particular moment. It does not, by itself, describe the target's complete motion over time.

This is where the Kalman Filter becomes useful.

A Kalman Filter estimates the state of a moving target by combining previous estimates with new sensor observations. Using a motion model, it predicts the target's next position and corrects that prediction when new visual measurements become available. In drone-based tracking systems, this process helps maintain more consistent target trajectories, handle short periods without detections, and support continuous object tracking.

Understanding how this algorithm works requires examining its mathematical model, its interaction with object detection, and the additional challenges introduced by a moving aerial platform.

31310684697?profile=RESIZE_710x

Why Is Motion Prediction Important in Drone Tracking?

A typical drone vision system processes a continuous sequence of video frames. In each frame, an object detection model identifies visible targets and returns information such as object class, confidence score, and bounding box coordinates.

For example, when a drone tracks a moving vehicle, the detection model may return the following horizontal positions across five consecutive frames:

FrameDetected horizontal position
1320 px
2326 px
3334 px
4331 px
5346 px

The vehicle is moving to the right, but the measured positions do not necessarily change at a perfectly consistent rate. The variation may result from changes in the detection box, image noise, partial occlusion, or camera movement.

A detection model processes each frame independently unless it is specifically designed with temporal tracking capabilities. Without an additional tracking mechanism, the system has limited information about how the target moved between observations.

This creates several practical problems:

  • Detection jitter: Bounding box coordinates fluctuate between consecutive frames, even when the target follows a relatively smooth path.
  • Temporary occlusion: Buildings, trees, other vehicles, or environmental obstacles may briefly hide the target.
  • Fast target movement: A target can move significantly between detection updates, making frame-to-frame matching more difficult.
  • Changing camera perspective: Drone movement changes the apparent position of objects in the image.
  • Missed detections: Low image quality, motion blur, or partial visibility may prevent the detector from identifying a target in a particular frame.

A tracking system therefore needs more than individual object detections. It needs a mechanism for estimating the target's motion over time.

The Kalman Filter addresses this problem by maintaining an estimated motion state and predicting where the target is likely to appear in the next frame.

For a broader introduction to this application, see https://skylarksystem.com/blog/kalman-filtering-for-drone-ai-object-tracking/.

What Is a Kalman Filter in Object Tracking?

The Kalman Filter is a recursive state estimation algorithm originally introduced by Rudolf E. Kalman in 1960. It estimates the internal state of a dynamic system using a mathematical model and noisy observations.

In object tracking, the system state can describe the position and velocity of a target. These variables are estimated over time rather than measured directly in their entirety.

The classical linear Kalman Filter assumes that the system dynamics and measurement relationships can be represented by linear models, with appropriately characterized noise.

Its operation consists of two repeated stages: prediction and measurement update.

State Estimation

A state vector represents the variables required to describe the target's motion.

For a simple two-dimensional image-space tracking system, the state can be defined as:

x ⁢ k = [ u k v k u ˙ k v ˙ k ]

Where:

  • uk: Horizontal position of the target in the image.
  • vk: Vertical position of the target in the image.
  • u˙k: Horizontal image velocity.
  • v˙k: Vertical image velocity.

The position variables describe the target's location in pixels, while the velocity variables describe how quickly that location changes over time.

The distinction is important. A camera can directly provide image measurements, but the target's velocity must be estimated from observations collected across multiple frames.

The state vector can also be expanded to include bounding box dimensions, acceleration, or other variables when the tracking application requires them.

Prediction and Measurement Update

The Kalman Filter repeatedly performs two operations.

Prediction

The algorithm uses the previous estimated state and a motion model to predict the target's current state.

For example, if a vehicle has been moving horizontally at an estimated velocity of 6 pixels per frame, the filter predicts that its position will advance by approximately 6 pixels in the next frame, assuming the motion remains consistent.

Measurement Update

When a new video frame becomes available, the object detector provides a new position measurement.

The filter compares this observation with its predicted position and calculates a corrected state estimate.

The correction depends on the uncertainty associated with the motion prediction and the reliability of the new measurement.

This recursive process allows the tracking system to combine historical motion information with current visual observations.

31310684665?profile=RESIZE_710x

How Does a Kalman Filter Predict Target Movement?

The mathematical foundation of a Kalman Filter is a state-space model. For drone object tracking, a constant velocity model provides a useful starting point.

It assumes that the target maintains approximately constant velocity over a short time interval. Although real-world targets do not always move this way, the model is computationally efficient and suitable for many short-term tracking applications.

Defining the State Vector

Consider a vehicle moving across the camera's field of view.

Its state at time step k is:

x ⁢ k = [ u k v k u ˙ k v ˙ k ]

The state contains four variables: horizontal position, vertical position, horizontal velocity, and vertical velocity.

The detector typically measures the position of the bounding box center. Velocity is estimated by the filter using the relationship between consecutive observations.

Building the Motion Model

The constant velocity model predicts the next state using:

x ⁢ k + 1 = F x ⁢ k + w k

Where:

  • F is the state transition matrix.
  • wk represents process noise.
  • Δt is the elapsed time between consecutive updates.

For a two-dimensional constant velocity model, the transition matrix is:

F = [ 1 0 Δt 0 0 1 0 Δt 0 0 1 0 0 0 0 1 ]

This matrix describes how the target's position changes according to its estimated velocity.

For example, if the horizontal position is 320 pixels and the estimated horizontal velocity is 6 pixels per frame, the predicted position one frame later is:

u k + 1 = 320 + 6 ( 1 ) = 326

If the next detection reports a position of 329 pixels, the filter can use this observation to correct its prediction.

The model assumes approximately constant velocity during the interval. Sudden acceleration, braking, or changes in direction introduce model error, which must be accounted for through process noise or a more suitable motion model.

The Prediction Step

The predicted state is calculated using:

x ^ ⁢ k | k − 1 = F x ^ ⁢ k − 1 | k − 1

The notation indicates that the state at time k is predicted using information available up to time k−1.

The filter also predicts the uncertainty of its estimate:

P k | k − 1 = F P k − 1 | k − 1 F T + Q

Where:

  • P is the state estimation error covariance matrix.
  • Q is the process noise covariance matrix.

The superscript T represents matrix transposition.

The covariance matrix describes how uncertain the estimated position and velocity are.

Process noise accounts for differences between the assumed motion model and actual target movement. For example, a vehicle may accelerate or turn even though the filter assumes constant velocity.

As prediction continues without new measurements, uncertainty generally increases. This is particularly important when a target becomes temporarily invisible.

The Measurement Update Step

When a new frame arrives, the object detector provides an observation:

z k = [ u k d e t v k d e t ]

The measurement model is:

z k = H x ⁢ k + r k

Where H maps the internal state to the variables measured by the detector, and rk represents measurement noise.

For the four-variable state model:

H = [ 1 0 0 0 0 1 0 0 ]

The detector measures position, while the filter estimates both position and velocity.

The Kalman Gain determines how strongly the new measurement influences the predicted state.

First, the innovation covariance is calculated:

S k = H P k | k − 1 H T + R

Then:

K k = P k | k − 1 H T S k − 1

Where R is the measurement noise covariance matrix.

The corrected state becomes:

x ^ ⁢ k | k = x ^ ⁢ k | k − 1 + K k ( z k − H x ^ ⁢ k | k − 1 )

The term inside the parentheses is the innovation: the difference between the actual observation and the predicted observation.

If the new detection is considered reliable, the filter can give it greater influence. If the measurement is uncertain, the prediction can contribute more strongly to the corrected estimate.

This balance is one of the most important characteristics of Kalman filtering.

In practical implementations, the estimation error covariance is also updated. A numerically robust implementation may use the Joseph covariance update form to help preserve symmetry and positive semidefiniteness.

How Kalman Filtering Works with YOLO-Based Drone Tracking

Kalman filtering is commonly used as part of a larger tracking-by-detection architecture.

In this approach, an object detector identifies targets in each frame, while a tracking algorithm maintains their identities and estimates their motion over time.

31310684484?profile=RESIZE_710x

A typical processing pipeline consists of the following stages.

  1. Video Acquisition
    A camera mounted on the drone captures a continuous video stream.
  2. Object Detection
    A model such as YOLO processes each frame and identifies objects of interest, including people, vehicles, and vessels.
  3. Bounding Box Extraction
    The detector returns the coordinates, dimensions, class labels, and confidence scores of detected objects.
  4. Kalman Prediction
    The tracker predicts the expected position of each existing target using its previous estimated state.
  5. Data Association
    The system compares current detections with predicted target positions to determine which observations correspond to existing tracks.
  6. Measurement Update
    Matched detections are used to correct the corresponding Kalman Filter estimates.
  7. Track Management
    The tracking system creates new tracks, maintains existing tracks, and manages unmatched or temporarily lost targets.

The Role of Data Association

An important distinction exists between motion estimation and data association.

The Kalman Filter predicts where an existing target should appear. It does not independently determine whether a newly detected vehicle is the same vehicle observed in previous frames.

Data association handles this problem.

One common method is the Hungarian Algorithm, which solves an assignment problem between existing tracks and new detections. Matching costs can be calculated using bounding box overlap, center-point distance, or other similarity measures.

The SORT algorithm (Simple Online and Realtime Tracking) is a well-known example. It combines Kalman filtering with Hungarian-based data association to create a lightweight online multi-object tracking framework.

This architecture demonstrates how detection, prediction, and association work together:

  • The detector identifies objects.
  • The Kalman Filter estimates their motion.
  • The association algorithm maintains correspondence between detections and tracks.

For drone applications, this separation of responsibilities makes the tracking system easier to understand, evaluate, and improve.

Engineering Challenges of Kalman Filtering on Moving Drones

Applying a Kalman Filter to drone-based object tracking introduces additional difficulties compared with tracking from a stationary camera.

The drone is itself a moving platform. Consequently, the apparent motion of a target in the image depends on both the target's movement and the camera's movement.

Camera Motion and Image Coordinate Changes

Consider a drone tracking a vehicle moving along a road.

If the drone moves forward, changes altitude, or rotates, the vehicle's position in the image may change even if its actual ground velocity remains constant.

The observed image motion can be influenced by:

  • Drone translation.
  • Drone rotation and changes in attitude.
  • Camera orientation and gimbal movement.
  • Changes in viewing angle and distance.
  • Perspective effects and scene geometry.

This creates a fundamental problem for image-space motion estimation.

A basic constant velocity Kalman Filter assumes that the observed target motion can be described by its previous image position and velocity. When camera motion becomes significant, this assumption may no longer hold.

Several techniques can help address this issue.

  • Optical Flow: Optical flow estimates apparent pixel motion between consecutive frames. Background feature motion can be used to estimate global camera movement.
  • Camera Motion Compensation: Feature matching and image registration can estimate transformations between frames. These transformations can then be used to compensate for camera-induced displacement in the tracking process.
  • IMU-Assisted Estimation: Inertial Measurement Unit data provides information about the drone's angular velocity, acceleration, and orientation. When properly synchronized and calibrated, this information can support camera motion estimation.

These methods serve different purposes and may be combined depending on the system architecture.

Research on UAV-based multi-object tracking has demonstrated that camera motion compensation can improve tracking stability when platform movement causes significant changes in the image. See https://www.mdpi.com/2504-446X/8/9/480.

Measurement Noise and Detection Jitter

Object detection results are not perfectly consistent.

Even when a vehicle follows a relatively smooth path, the center and dimensions of its bounding box may fluctuate between frames.

These variations can result from:

  • Image resolution and compression.
  • Motion blur.
  • Lighting changes.
  • Partial occlusion.
  • Changes in the visible shape of the target.
  • Detection model uncertainty.

The measurement noise covariance matrix R describes the uncertainty associated with the observations.

If measurement noise is underestimated, the filter may respond too strongly to inconsistent detections. If it is overestimated, the filter may rely too heavily on its motion model and respond slowly to genuine changes in target movement.

In practice, the measurement uncertainty can be adjusted according to detection quality, although detection confidence should not automatically be treated as a calibrated measurement variance.

Temporary Occlusion and Target Loss

A moving target may temporarily disappear behind an obstacle or leave the camera's field of view.

During a period without a valid detection, the Kalman Filter can continue predicting the target's state using the motion model.

For example:

  • Frames 1–10: The vehicle is detected and its estimated position and velocity are updated.
  • Frames 11–15: The vehicle becomes temporarily occluded. The filter continues predicting its position.
  • Frame 16: The vehicle reappears. The tracking system evaluates whether the new detection corresponds to the existing track.

This approach can help maintain a track through short interruptions in visual observation.

However, prediction is not equivalent to detection. The predicted position becomes increasingly uncertain as the period without measurements grows.

A robust tracking system therefore needs track management logic, such as confidence thresholds, maximum missed-frame limits, and re-association criteria.

Appearance information, object class, size, and spatial consistency may also help determine whether a reappearing detection belongs to the original target.

Non-Linear Target Motion

The constant velocity model works best when a target moves at approximately constant speed and direction over short intervals.

Real-world targets frequently violate this assumption.

A vehicle may turn at an intersection, accelerate, or brake. A vessel may change heading, while a person may suddenly alter walking direction.

Alternative motion models include:

ModelMain AssumptionTypical Application
Constant Velocity (CV)Velocity remains approximately constantShort-term tracking of steady movement
Constant Acceleration (CA)Acceleration remains approximately constantTargets with sustained acceleration or deceleration
Extended Kalman Filter (EKF)Nonlinear dynamics are locally linearizedNonlinear target motion and observation models
Unscented Kalman Filter (UKF)Nonlinear transformations are handled using sigma pointsMore complex nonlinear estimation problems

EKF and UKF are nonlinear filtering approaches rather than motion models themselves. They can be combined with appropriate target motion and measurement models.

The choice depends on target behavior, sensor configuration, computational resources, and the required estimation accuracy.

Image-Space Tracking vs. Real-World Target Tracking

An important engineering distinction is the difference between estimating a target's movement in image coordinates and estimating its actual movement in the physical world.

Image-Space Tracking

A two-dimensional image-space tracker estimates variables such as:

  • Bounding box center coordinates.
  • Pixel displacement.
  • Apparent image velocity.
  • Bounding box dimensions.

These measurements are relatively straightforward to obtain from a camera and object detector.

However, pixel displacement does not directly represent physical distance or ground speed.

For example, a vehicle moving at a constant ground speed may appear to move at different pixel velocities depending on its distance from the camera and the drone's movement.

World-Space Tracking

Estimating a target's actual position and velocity requires additional geometric and sensor information.

Depending on the application, the system may need:

  • Camera intrinsic calibration.
  • Camera-to-body extrinsic calibration.
  • Drone position and attitude.
  • Camera or gimbal orientation.
  • Terrain or ground-plane geometry.
  • Depth measurements or other localization information.

The relationship between image measurements and physical target coordinates is generally nonlinear.

For a ground vehicle observed by a UAV-mounted gimbal camera, the system must account for camera geometry, drone attitude, and the target's motion model.

A 2025 study, https://www.mdpi.com/2226-4310/12/12/1065, examines this problem using nonlinear filtering techniques.

The distinction matters because a Kalman Filter operating on pixel coordinates estimates image-space motion. It does not automatically provide GPS coordinates, physical velocity, or the target's future ground position.

Applying Kalman Filtering to FPV Drone AI Tracking Systems

In an FPV drone system, AI-based object tracking requires several hardware and software components to work together.

A typical configuration may include:

  • An onboard camera for visual data acquisition.
  • An AI processing module for object detection.
  • A tracking algorithm for maintaining target trajectories.
  • A video transmission system for sending visual information to the ground.
  • A flight controller for managing the drone's flight dynamics.

An onboard AI vision module can perform object recognition and tracking-related processing without relying entirely on an external ground computer.

For example, the https://skylarksystem.com/product/ai-visioncube-kit/ from Skylark is an FPV AI vision module designed for applications involving person and vehicle recognition, target locking, and dynamic tracking. Its published product information describes YOLOv7-based processing, time-prediction functionality, and the use of Kalman Filter algorithms in its target-tracking approach.

The product also provides visible-light and thermal imaging configurations, allowing the vision system to be adapted to different observation conditions.

From a system engineering perspective, Kalman filtering can contribute to the tracking process in several ways:

  • Continuous Motion Estimation: Detection results from successive frames can be combined to estimate target position and velocity, reducing the effect of inconsistent bounding box measurements.
  • Short-Term Position Prediction: When a target is temporarily unavailable in the current frame, the motion model can provide an estimated position for subsequent tracking operations.
  • Target Re-Association: Predicted target positions can help constrain the search area and support matching when a previously observed target reappears.
  • Multi-Target Tracking: When several objects are present, separate motion states can be maintained for individual tracks, while a data association algorithm determines which detections belong to which tracks.

The actual tracking performance depends on the complete system, including detection quality, camera configuration, processing latency, motion models, and track management.

It is also important to distinguish target tracking from autonomous flight control.

A Kalman Filter estimates the target's motion state. A separate guidance and control system must determine how the drone should respond to that estimate. The flight controller then executes the appropriate control commands.

Consequently, successful target tracking does not automatically mean that a drone can safely or reliably follow a target under every flight condition.

Engineering Considerations for Onboard Implementation

Deploying a Kalman Filter on an onboard AI platform requires attention to several implementation details.

Update Frequency and Time Synchronization

The time interval between filter updates should reflect the actual interval between observations.

If the video stream has dropped frames or irregular processing delays, using a fixed time step can introduce errors into the motion prediction.

The transition matrix should therefore use the measured elapsed time:

Δ t = t k − t k − 1

Camera timestamps, detector outputs, and tracking updates should be synchronized as closely as the system architecture allows.

Process Noise and Measurement Noise Tuning

The process noise covariance Q and measurement noise covariance R have a direct influence on tracking behavior.

A low process noise assumption indicates that the target is expected to follow the selected motion model closely. A higher value allows the filter to adapt more readily to unexpected movement.

Measurement noise describes uncertainty in the detected target position.

These parameters should be selected according to actual camera performance, target dynamics, frame rate, and environmental conditions.

Computational Efficiency

A conventional linear Kalman Filter has relatively low computational requirements for a small state vector.

However, a complete multi-object tracking system also needs to perform detection, data association, track management, and potentially camera motion compensation.

As the number of tracked objects increases, the overall computational load may become more significant than the filtering operation itself.

On an embedded platform, processing frequency, memory availability, power consumption, and thermal limitations should all be considered.

Track Initialization and Termination

A new detection requires an initial state estimate.

Position can be initialized from the bounding box, while velocity may initially be set to zero or estimated from subsequent observations. Initial covariance should reflect the uncertainty in these assumptions.

Tracks should also have clear termination criteria. Maintaining an old predicted track indefinitely can result in false associations, particularly when several similar objects are present.

Conclusion: From Object Detection to Continuous Motion Estimation

Reliable drone-based object tracking requires more than identifying objects in individual video frames. The system must estimate how targets move, account for imperfect observations, and maintain consistent trajectories over time.

The Kalman Filter provides an efficient mathematical framework for this task.

By combining a motion model with new visual measurements, it estimates target position and velocity while accounting for uncertainty. When integrated with object detectors such as YOLO and data association methods such as those used in SORT, it becomes part of a broader tracking architecture.

However, drone applications introduce additional challenges. Camera motion, perspective changes, temporary occlusion, and nonlinear target behavior can all affect prediction accuracy. More advanced systems may therefore require camera motion compensation, sensor fusion, nonlinear filtering, and robust track management.

For FPV drone AI systems, the value of Kalman filtering lies in its contribution to continuous motion estimation. It helps connect individual object detections into a coherent tracking process, providing useful state information for higher-level tracking and guidance systems.

The result is a more complete approach to visual tracking, where object detection identifies what is visible, motion estimation describes how the target moves, and the broader drone system determines how that information should be used.

References and Further Reading

Kalman, R. E. (1960). https://doi.org/10.1115/1.3662552. Journal of Basic Engineering.

Bewley, A. et al. (2016). https://arxiv.org/abs/1602.00763.

OpenCV. https://docs.opencv.org/4.x/dd/d6a/classcv_1_1KalmanFilter.html.

https://www.mdpi.com/2504-446X/8/9/480.

https://www.mdpi.com/2226-4310/12/12/1065.

https://www.mdpi.com/2504-446X/8/6/252.

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Activity

Jose Araujo liked Jose Araujo's profile
Aug 29
spencer harvey liked spencer harvey's profile
Jul 9
More…