1. A method comprising: determining, by a computing device, a first local binary pattern for a first image in a video; determining, by the computing device, a second local binary pattern for a second image in the video; determining, by the computing device, an optical flow between the first image and the second image based on a distance between the first local binary pattern and the second local binary pattern; and outputting, by the computing device, the optical flow for use in aligning the first image to the second image.