Fast image stabilization method of dynamic scene video with foreground object

The invention belongs to the field of computer image processing, and relates to a fast image stabilization method of a dynamic scene video with a foreground object. The fast image stabilization method comprises the following steps: selecting a template for a frame image, and equally dividing the template into a plurality of sub-blocks; respectively calculating the pixel absolute difference between each sub-block and a corresponding sub-block in a previous row or a previous line, and calculating the average value of each pixel absolute difference; respectively calculating the pixel absolute difference D (i, j) (k=1, K, 4) between each sub-block and the sub-blocks at the upper side, the lower side, the left side and the right side, and setting a threshold value T and a threshold vale T', wherein T is equal to AD and T' is less than T; for each sub-block C(i, j), if the minimum value of D (i, j) is more than T' or less than T, taking the sub-block C(I, j) as a foreground object module; carrying out foreground object separation on all pictures; and carrying out motion compensation on images so as to obtain stabilized images. By using the method provided by the invention, the number of modules which are used for participating in the calculation can be greatly decreased, and the precision and speed of the foreground object separation can be improved.