Teknomo–Fernandez algorithm

The Teknomo-Fernandez Algorithm, also known as TF Algorithm, is an efficient algorithm for generating the background image of a given video sequence. [1]
By assuming that the background image is shown in the majority of the video, the algorithm is able to generate the background image of a video using only a small number of binary operations in O(R)-time.[2]
History

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 motion tracking, object tracking, and facial recognition) may be executed using these images.[2][3]
However, background subtraction requires that the background image is already available and unfortunately, this is not always the case. Traditionally, the background image is searched for manually or automatically from the video images when there are no objects. More recently, automatic background generation through object detection, medial filtering, medoid filtering, approximated median filtering, linear predictive filter, non-parametric model, Kalman filter, and adaptive smoothening have been suggested; however, most of these methods have high computational complexity. [2]
The Teknomo-Fernandez Algorithm is also an automatic background generation algorithm. Its advantage, however, is its computational speed of only O(R)-time, depending on the resolution R 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.[2]
Assumptions
- 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 the most of the time at the same place.
Generally, however, the algorithm will certainly work whenever the following single important assumption holds:
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).[2]
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.[2]
Background Image Generation
Equations
- For three frames of image sequence x1, x2, and x3, the background image B is obtained using [2]
- The Boolean mode function S of the table occurs when the number of 1 entries is larger than half of the number of images such that [2]
- For three images, the background image B can be taken as the value [2]
Background Generation Algorithm
At the first level, three frames are selected at random from the image sequence to produce a background image by combining them using the first equation. This yields a better background image at the second level. The procedure is repeated until desired level .[2]
Theoretical Accuracy
At level , the probability that the modal bit predicted is the actual modal bit is represented by the equation . 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.[2]

Space Complexity
The space requirement of the Teknomo-Fernandez Algorithm is given by the function , depending on the resolution of the image, the number of frames in the video, and the desired number of levels. However, the fact that will probably not exceed 6 reduces the space complexity to .[2]
Time Complexity
The entire algorithm runs in )-time, only depending on the resolution of the image. Computing the modal bit for each bit can be done in -time while the computation of the resulting image from the three given images can be done in -time. The number of the images to be processed in levels is . However, since , then this is actually , thus the algorithm runs in .[2]
References
- ^ Abu, Patricia Angela; Fernandez, Proceso. "Extendibility of the Teknomo-Fernandez Algorithm for Background Image Generation" (PDF): 28–37.
{{cite journal}}
: Cite journal requires|journal=
(help) - ^ a b c d e f g h i j k l m Teknomo, Kardi; Fernandez, Proceso. "Background Image Generation Using Boolean Operations".
{{cite journal}}
: Cite journal requires|journal=
(help) - ^ Abu, Patricia Angela (March 2015). Improving the Teknomo-Fernandez Background Image Modeling Algorithm for Foreground Segmentation (Ph.D). Ateneo de Manila University.
Further reading
- Chu, Varian Sherwin B. (2013). Background image reconstruction using random frame sampling and logical bit operations (Thesis). Ateneo de Manila University.
External links
- A Monte-Carlo-based Algorithm for Background Generation - a variant of the Teknomo-Fernandez algorithm that incorporates the Monte-Carlo method was developed in this study.
- Background Image Generation Using Boolean Operations - describes the TF algorithm, its assumptions, processes, accuracy, time and space complexity, and sample results.
- Extending the of the Teknomo-Fernandez Background Image Generation Algorithm on the HSV Colour Space - explores extending the TF algorithm from the original RGB color space to the HSV color space.
- Modifying the Teknomo-Fernandez Algorithm for Accurate Real-Time Background Subtraction - proposes the use of the TF algorithm for real-time background subtraction and also the application of some modifications for better accuracy.
- Extendibility of the Teknomo-Fernandez Algorithm for Background Image Generation - performs the theoretical and empirical analyses of the extendibility of TF3 by considering tournament sizes of 5 (TF5), 7 (TF7) and higher.
- Performance comparison of the Teknomo-Fernandez algorithm on the RGB and HSV colour spaces - examines the performance of the TF algorithm on both RGB and HSV color spaces.
- Improving the Teknomo-Fernandez Background Image Modeling Algorithm for Foreground Segmentation - creates a significantly improved TF3 variant and evaluates it using the Wallflower dataset. It is also compared to state-of-the-art background subtraction algorithms.