This paper presents a computer vision algorithm that segregates spurious optical flow artifacts to detect a moving object. The algorithm consists of six steps. First, the pixels in each image are shifted to compensate for camera rotation. Second, the images are smoothed with a spatiotemporal Gaussian filter. Third, the optical flow is computed with a gradient-based technique. Fourth, optical flow vectors with small magnitudes are discarded. Fifth, vectors with similar locations, magnitudes, and directions are clustered together using a spatial consistency test. Sixth, similar optical flow vectors are extended temporally to make predictions about future optical flow locations, magnitudes, and directions in subsequent frames. The actual optical flow vectors that are consistent with those predictions are associated with a moving object. This algorithm was tested on images obtained with a video camera mounted below the nose of a Boeing 737. The camera recorded two sequences containing a second flying aircraft. The algorithm detected the aircraft in 82% of the frames from the first sequence and 78% of the frames from the second sequence. In each sequence, the false-alarm rate was zero. These results illustrate the effectiveness of using a comprehensive predictive technique when detecting moving objects.