The input array from the frame is appended and minimum difference algorithm is applied by simultaneously checking the both the frames for minimum sum of differences. The array that generates the minimum value gives us an exact approximation of the direction that must have been under consideration from the video source.