In video tracking systems using image subtraction for motion detection, the global motion is usually estimated to compensate for the camera motion. The accuracy and robustness of the global motion compensation critically affects the performance of the target tracking process. The global motion between video frames can be estimated by matching the features from the image background. However, the features from moving targets contain both camera and target motion and should not be used to calculate the global motion. Sparse optical flow is a classical image matching method. However, the image features selected by optical flow may come from moving targets, with some of the image features matched not being accurate, which leads to poor video tracking performance. Least Median of Square (LMedS) is a popular robust linear regression model and has been applied to realtime video tracking systems implemented in hardware to process up to 7.5 frames/second. In this paper, we use a robust regression method to select features only from the image background for robust global motion estimation, and we develop a real-time (10 frames/second), software-based video tracking system that runs on an ordinary Windows-based general-purpose computer. The software optimization and parameter tuning for real-time execution are discussed in detail. The tracking performance is evaluated with real-world Unmanned Air Vehicle (UAV) video, and we demonstrate the improved global motion estimation in terms of accuracy and robustness.