This paper presents a new algorithm for updating the reference image used in a Visual Surveillance Platform. Updating the reference image is a crutial step of the motion dectection. Most of the classical methods consist in slow integration of the current image into the reference image. We propose to model the integration process to discriminate parts of the image that correspond to illumination and environment changes from those that correspond to individuals evolving in the scene. We conclude this article by showing some results on subway video sequences.