Abstract:Aimed at the complexity of the current algorithm, an algorithm based on two consecutive frames subtraction and background subtraction is presented.At first, select a frame as a background. Then subtract two consecutive frames to find out moving area and background area. Update background with the background area which is detected. At last ,compare moving area with background to locate moving objection and uncovering area. Update background with uncovering area. The background model in this algorithm is obtained even if there are some moving objections. The results show that this algorithm combines the advantages of veracity and of runtime, and fit for real time detection.