A new algorithm based on gradient optimization is proposed for optical flow estimation of video images with different motion ranges. The original video images are transformed by using Loggabor filtering on phases and measures,and then the spatio-temporal gradient is calculated by using the obtained feature images. The optical flow is calculated with the spatio-temporal gradient. The video images are layered and processed with coarse-to-fine image pyramid method. The theoretical analysis and experimental results show that the algorithm is suitable for the video optical flow motion estimation of the significant range. It can not only obtain the video images following the human visual resolution characteristics, but also optimize the spatio-temporal gradient, while the optical flow calculation is more accurate. Besides, the time complexity of this algorithm is equivalent to that of the traditional optical flow method, and the accuracy of the algorithm is superior to the methods suggested by Horn-Schunck, Duan,et al.