Image Processing Reference
In-Depth Information
(around 100 according to the histogram) will result in a difference around 20. De-
pending on the threshold value, this could actually be interpreted as an object in
the scene, since it seems different from the reference image. This is obviously not
desirable and each pixel in the reference image should therefore be calculated as the
mean of the first N images, see Appendix C. The reference image at this particular
position will then be around 100, which is much more appropriate according to the
histogram. So to make the background subtraction more robust the first few seconds
of processing should therefore be spent on calculating a good reference image.
Sometimes the background changes during processing. For example due to the
changing position of the sun during the day or due to changes in the illumination
sources, e.g., they are accidentally moved. In such situations a new reference image
should be calculated. But how do we detect that this has happened? One way is, of
course, if we can see that the performance of the system degrades. An automatic
way is to gradually change the value of each pixel in the reference image in the
following way:
r new (x, y)
=
α
·
r old (x, y)
+
( 1
α)
·
f(x,y)
(8.4)
where r(x,y) is the reference image, f(x,y) is the current image, and α is a weight-
ing factor that defines how fast the reference image is updated. The value of α de-
pends on the application, but a typical value is α
=
0 . 95.
8.3.1 Defining the Threshold Value
As for any other threshold operation, defining the actual threshold value is a
trade-off between false positives and false negatives, see Appendix C, which is
application-dependent.
It is important to notice that Eq. 8.3 is actually based on the assumption that
the histograms for different pixel positions are similar and only differ in their mean
values. That is, it is assumed that the variation in the histograms is similar. In order
to understand the implications of this assumption let us have a closer look at the
bottom histogram in Fig. 8.5 together with Eq. 8.3 . Say we define the threshold
value to 25. This means that an object in an image needs to have a value below
75 or above 125 in order to be segmented as an object pixel and not a background
pixel. This seems fine. But then have a look at the top histogram in Fig. 8.5 . Clearly
this histogram has a larger variation and applying a threshold of 25 will result in
incorrect segmentation of pixel values in the intervals:
.
In many situations different histograms will occur simply because the different
parts of the scene are exposed to different illumination conditions, which yields
histograms with different variations. For example, you could have some parts of the
background which move slightly (due to a draft for instance) and this will create a
larger variation. So to sum up the above, the problem is that each position in the
image is a associated with the same global threshold value.
[
150 , 175
]
and
[
225 , 255
]
Search WWH ::

Custom Search