1. A method for creating a dictionary for video compression, comprising : (a) designating an initial reference dictionary of functions , stored in a memory; (b) designating a set of video sequences to be used as training sequences , ; (c) calculating the a motion residual image for at least one of the frames of a video sequence from the set of video sequences , ; (d) determining an energy threshold for evaluating the residual image , ; (e) evaluating the residual image for portions above the energy threshold ; (f) comparing a first high energy portion of the residual image to at least one function in the reference dictionary , ; (g) extracting the first high energy portion of the residual image , ; (i) storing the extracted high energy portion of the residual image , in the memory; and (j) synthesizing , using a processing device, the dictionary from the stored high energy portion of the residual image , in which the step of synthesizing comprises by dividing the extracted high energy portions into at least two subsets based on an inner product calculation, and calculating an updated dictionary pattern from the elements in the two subsets.