Aiming at the problem on unclear background extraction due to existing ghosts in the existing background extraction algorithm
an efficient background extraction algorithm is proposed. According to the change of the gray value of the same position between each adjacent two video frames
judging that each pixel belongs to the foreground or the background in different video frames.Finally
the sequence of pixels belonging to the foreground in each position is eliminated
and partial frames that completely belong to the background are obtained
and finally a complete background image is obtained.. The experimental results show that the algorithm is simple in principle and the extracted background is clear. The effect is better than other existing background extraction algorithms.