We describe an improved background mixture model to detect motion and remove illumination changes, shadows and ghosts. The shadows and ghosts detection processing is fused with updating background subtraction model after the frame is transformed to Hue Saturation Value (HSV) color space from Red Green Blue (RGB) color space in order to reduce the effect of illumination changes, shadows and ghosts. Compared with the traditional background mixture model, the improved method can avoid the bad effect of shadows and ghosts, and it is highly computationally cost-effective.