The importance of image stabilization to warship photoelectricity equipment and varieties of image stabilization technique are introduced. A new algorithm is proposed to realize electronic image stabilization. The algorithm takes minimum square error and spatial correlation as matching function and adapts four-step search algorithm to calculate motion vectors. The result is compared with that of full search algorithm. The experimental results show that this algorithm may produce stabilized series of images.