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.
Draw Rectangles in OpenCV C++: Full Tutorial [Code]
Opencv rectangle drawing tutorial by example in C++. Simple steps let you draw the rectangle inside the pictures and video sample.


