Content deleted Content added
GoingBatty (talk | contribs) m General fixes & manual clean up, replaced: C → C (2) using AWB |
m Stray word removed |
||
(19 intermediate revisions by 12 users not shown) | |||
Line 1:
{{redirect|TF Algorithm}}
[[File:Street in Sendai.png|thumb|400px|The TF algorithm produces the background image from a video of a street with many pedestrians crossing.]]
The '''Teknomo–Fernandez algorithm (TF algorithm)''', is an efficient algorithm for generating the background image of a given video sequence.
By assuming that the background image is shown in the majority of the video, the algorithm is able to generate a good background image of a video in <math>O(R)</math>-time using only a small number of [[binary operations]] and Boolean
==History==
[[File:Sample Colored Result.png|thumb|500px|The TF algorithm generates the colored background image and uses it for background subtraction.]]
People tracking from videos usually involves some form of [[background subtraction]] to segment foreground from background. Once foreground images are extracted, then desired algorithms (such as those for [[Video tracking|motion tracking]], [[Optical motion tracking|object tracking]], and [[facial recognition system|facial recognition]]) may be executed using these images.<ref name="TF" /><ref name="ITF">{{cite thesis |last=Abu|first=Patricia Angela|date=March 2015|title=Improving the Teknomo–Fernandez Background Image Modeling Algorithm for Foreground Segmentation|type=Ph.D|publisher=Ateneo de Manila University|url=https://www.researchgate.net/publication/
However, [[background subtraction]] requires that the background image is already available
The Teknomo–Fernandez algorithm is also an automatic background generation algorithm. Its advantage, however, is its computational speed of only <math>O(R)</math>-time, depending on the resolution <math>R</math> of an image and its accuracy gained within a manageable number of frames. Only at least three frames from a video is needed to produce the background image assuming that for every pixel position, the background occurs in the majority of the videos. Furthermore, it can be performed for both grayscale and colored videos.<ref name="TF" />
Line 16:
* The camera is stationary.
* The light of the environment changes only slowly relative to the motions of the people in the scene.
* The number of people does not occupy the scene for
Generally, however, the algorithm will certainly work whenever the following single important assumption holds: <blockquote>For each pixel position, the majority of the pixel values in the entire video contain the pixel value of the actual background image (at that position).<ref name="TF" /></blockquote>As long as each part of the background is shown in the majority of the video, the entire background image needs not to appear in any of its frames. The algorithm is expected to work accurately.<ref name="TF" />
Line 22:
==Background image generation==
===Equations===
# For three frames of image sequence <math>x_1</math>, <math>x_2</math>, and <math>x_3</math>, the background image <math>B</math> is obtained using <br> <math>B = x_3(x_1\oplus x_2)+x_1x_2 </math><ref name="TF" />
#The Boolean mode function <math>S</math> of the table occurs when the number of 1 entries is larger than half of the number of images such that<ref name="TF" /><br> <math>S=\begin{cases} 1, & \text{if } \sum_{i=1}^n x_i\ge\left \lceil \frac n 2 + 1 \right\rceil, \text{ and } n\ge 3 \\
0, &\text{otherwise} \end{cases}</math>
# For three images, the background image <math>B</math> can be taken as the value
::: <math>\bar{ ===Background generation algorithm===
Line 33 ⟶ 34:
At level <math>\ell</math>, the probability <math>p_\ell</math> that the modal bit predicted is the actual modal bit is represented by the equation <math>p_\ell = (p_{\ell-1})^3 + 3(p_{\ell-1})^2(1-p_{\ell-1})</math>.
The table below gives the computed probability values across several levels using some specific initial probabilities. It can be observed that even if the modal bit at the considered position is at a low 60% of the frames, the probability of accurate modal bit determination is already more than 99% at 6 levels.<ref name="TF" />
[[File:Probability Table.png|
==Space complexity==
Line 42 ⟶ 43:
==Variants==
A variant of the Teknomo–Fernandez algorithm that incorporates the [[Monte-Carlo method]] named CRF has been developed. Two different configurations of CRF were implemented: CRF9,2 and CRF81,1. Experiments on some colored video sequences showed that the CRF configurations outperform the TF algorithm in terms of accuracy. However, the TF algorithm remains more efficient in terms of processing time.<ref name="CRF">{{cite journal | last1 = Abu | first1 = Patricia Angela | last2 = Chu | first2 = Varian Sherwin| last3 = Fernandez | first3 = Proceso| title = A Monte-Carlo-based
==Applications==
|