Aiming at the problem of extracting and detecting movingobjections in the actual road environment, analyzes and summarizes the advantages and disadvantages of the current main detection algorithms, and proposes a method for quickly detecting moving targets by extracting the prior knowledge of vehicle entrances and exits, road spacing and so on. The experimental results show that for the case where the camera position is fixed and the background disturbance is not large, the background media construction and background reconstruction can be well realized by adaptive median filtering and multi-frame mean filtering, which reduces the computational complexity and the calculation amount is small.