1. A method comprising: dividing a video frame into a plurality of elements; determining at a video rate of a video stream whether an element in the plurality of elements is part of a background image or is part of a foreground image; determining the foregoing image of a subsequent video frame using the background image as a temporal reference; and registering the background image of the subsequent video frame based on the foreground image.