# Opencv 4 C++ Tutorial simple Background Subtraction

> Simple OpenCV tutorial for video background substraction to separate background and moving foreground in the video.

- Canonical URL: https://www.funvisiontutorials.com/blog/opencv-4-cpp-tutorial-background-subtraction/
- Author: Vladimir Kucera
- Published: 2020-09-09
- Updated: 2023-11-02
- Topics: Image processing, Installing & building OpenCV

This method is used to learn what belongs to the background of the image and what belongs to the foreground. The static cameras that monitor the area can very easily recognize, what is part of the image that is always here or there is something that is new and moving over the background.

## Background subtraction Visual studio 2019 project setup
