Background subtraction is a popular technique in video surveillance. In order to use it, a background model must be built and updated according to light and scenario changes. We discuss in this paper a new algorithm (BAC) which creates or restores a background model based on the behaviour of pixels in successive frames, while performs a segmentation of objects in the scene yielding a confidence value for the obtained background, a problem which is addressed by few methods in the literature. This allows us to fulfil the requirement of producing a model, for instance in scenarios like airport halls, without interfering normal operation and still segment scenes.