Background Modeling and Foreground Detection for Video Surveillance