Motion detection is the first and important step in many computer vision applications. Gaussian mixture model is an effective way for moving objects detection, but there are some shortcomings of this model such as slow updating rate and false detection in complex background. In this paper, we proposed an improved Gaussian mixture model method. A matching distance is defined to compute the learning rate when updating the models, and we also use dual threshold to improve the matching mechanism. Experimental results show that this method can get a faster adaptation to background and better contour of the moving objects.