Game Development Reference
In-Depth Information
the root square value of the mean of gap values not larger than the th before. The
gap value is the difference between a pixel and its avg.
3. Create a new segment or widen the current segment : At arbitrary position, a
new temporal segment will be created if
is larger than Th i .
Otherwise, length of the current segment is widened. Through this procedure,
temporally successive pixels can be divided into segments as shown in Fig. 8.6 .
Borders between segments stand for a texture switch on adjacent frames. Note
that, if length of a segment is too short, the weight of—for the segment is 0, and
1/20 of the length of training frames is used to judge whether a segment is too
short.
4. Calculate mean value and weight for each segment : The weight of each segment
is set square of its length, as shown in Fig. 8.6 . Afterwards, denoting length and
mean value of segment k as len k and avg k , a running average procedure will be
employed to realize low computational complexity.
5. Generate and output the background value : In a practical system, to satisfy low
memory cost, we do not buffer the length and mean values of each segment.
Instead, we just interactively buffer and calculate the total mean value AVG and
its weight W from the first to the k th segment by
|
I i (
x
,
y
)
I i + 1 (
x
,
y
) |
len k ×
len k )
AVG
=
AVG
×
W
+
avg k )/(
W
+
(8.6)
len k
W
=
W
+
(8.7)
Such calculation procedure is shown in Fig. 8.7 . It indicates we only need to buffer
and derive the AVG and W of the first k segments from the first k
1 segments.
Following this, when the current segment reaches the end of training frames, we will
calculate the final AVG and W . At last, we will obtain the required background by
jointing the AVG of each pixel together.
From the above statement, we can see that the proposed SWRA works based on
weights and running average. The required additional buffered data for each pixel
position include: the avg k /
W to summarize
the previous segments and the updating threshold. Compared with the parametric
methods like GMM, SWRA does not import multiple models for each pixel and never
len k for the current segment k ,theAVG
/
Fig. 8.6 Calculate the mean
value and weight for each
segment
Search WWH ::




Custom Search