@@ -11,21 +11,21 @@ In this chapter,
11
11
Basics
12
12
------
13
13
14
- Background subtraction is a major preprocessing steps in many vision based applications. For
15
- example, consider the cases like visitor counter where a static camera takes the number of visitors
14
+ Background subtraction is a major preprocessing step in many vision- based applications. For
15
+ example, consider the case of a visitor counter where a static camera takes the number of visitors
16
16
entering or leaving the room, or a traffic camera extracting information about the vehicles etc. In
17
17
all these cases, first you need to extract the person or vehicles alone. Technically, you need to
18
18
extract the moving foreground from static background.
19
19
20
- If you have an image of background alone, like image of the room without visitors, image of the road
20
+ If you have an image of background alone, like an image of the room without visitors, image of the road
21
21
without vehicles etc, it is an easy job. Just subtract the new image from the background. You get
22
22
the foreground objects alone. But in most of the cases, you may not have such an image, so we need
23
- to extract the background from whatever images we have. It become more complicated when there is
24
- shadow of the vehicles. Since shadow is also moving , simple subtraction will mark that also as
23
+ to extract the background from whatever images we have. It become more complicated when there are
24
+ shadows of the vehicles. Since shadows also move , simple subtraction will mark that also as
25
25
foreground. It complicates things.
26
26
27
27
Several algorithms were introduced for this purpose. OpenCV has implemented three such algorithms
28
- which is very easy to use. We will see them one-by-one.
28
+ which are very easy to use. We will see them one-by-one.
29
29
30
30
### BackgroundSubtractorMOG
31
31
@@ -76,7 +76,7 @@ throughout the algorithm). It provides better adaptibility to varying scenes due
76
76
changes etc.
77
77
78
78
As in previous case, we have to create a background subtractor object. Here, you have an option of
79
- selecting whether shadow to be detected or not. If detectShadows = True (which is so by default), it
79
+ detecting shadows or not. If detectShadows = True (which is so by default), it
80
80
detects and marks shadows, but decreases the speed. Shadows will be marked in gray color.
81
81
@code {.py}
82
82
import numpy as np
@@ -104,7 +104,7 @@ cv2.destroyAllWindows()
104
104
### BackgroundSubtractorGMG
105
105
106
106
This algorithm combines statistical background image estimation and per-pixel Bayesian segmentation.
107
- It was introduced by Andrew B. Godbehere, Akihiro Matsukawa, Ken Goldberg in their paper "Visual
107
+ It was introduced by Andrew B. Godbehere, Akihiro Matsukawa, and Ken Goldberg in their paper "Visual
108
108
Tracking of Human Visitors under Variable-Lighting Conditions for a Responsive Audio Art
109
109
Installation" in 2012. As per the paper, the system ran a successful interactive audio art
110
110
installation called “Are We There Yet?” from March 31 - July 31 2011 at the Contemporary Jewish
0 commit comments