Image threshold segmentation is a widely used imaging technology. It takes advantage of the differences in gray characteristics between the object to be extracted from the image and its background. It also regards the image as a combination of two types of regions (targets and background) with different gray levels [9]. Among them, the most important is the selection of image threshold, inappropriate threshold selection will affect the quality of the binary image and recognition accuracy. This is because of the influence of uneven illumination, camera distortion, insufficient exposure and narrow dynamic range, results in serious artifacts appearing in the moving video images. Because of the uneven gray distribution and insufficient contrast, the edge of the moving video image is blurred and the details are not clearly distinguished. Also the binaryzation effect of moving video image is seriously affected.

For this reason, a global threshold algorithm based on the spatial distribution of moving video images and the classification criterion of maximum inter-class variance is used to binarize the recognition of moving video images, which can not only eliminate artifacts, but also maintain the edge integrity of moving video images [10].

Given ideal condition of uniform illumination, no noise and interference, the total gray level of the moving video image changes gently. Supposing the key content of the image is *g*_{1}, the background gray is *g*_{2}, and 0 ≤ *g*_{1}, *g*_{2} ≤ 255. Supposing that the proportion of key content pixels in a moving video image is *r*_{1}, the proportion of background pixels is *r*_{2}, and 0 < *r*_{1}, *r*_{2} < 1, *r*_{1} + *r*_{2} = 1. The gray mean of moving video images is expressed as Eq. (1)

$$M={r}_{1}{g}_{1}+{r}_{2}{g}_{2}$$(1)The variance calculation is shown in Eq. (2)

$${C}^{2}={r}_{1}{\left({g}_{1}-M\right)}^{2}+{r}_{2}{\left({g}_{2}-M\right)}^{2}$$(2)According to Eq. (1) and Eq. (2) it can get:

$${r}_{1}\left({g}_{1}-M\right)+{r}_{2}\left({g}_{2}-M\right)=0$$(3)According to Eq. (3) there are:

$$\left({g}_{2}-M\right)=-\frac{{r}_{1}}{{r}_{2}}\left({g}_{1}-M\right)$$(4)The Eq. (4) is substituted for Eq. (2) and it can get:

$${C}^{2}=\frac{{r}_{1}}{{r}_{2}}{\left({g}_{1}-M\right)}^{2}$$(5)In summary, the grayscale of the key content in the image is:

$${g}_{1}=M\pm \sqrt{\frac{{r}_{2}}{{r}_{1}}}C$$(6)In this way, the grayscale of image’s background is:

$${g}_{2}=M\pm \sqrt{\frac{{r}_{1}}{{r}_{2}}}C$$(7)The rough threshold value can be expressed as:

$$T=M-\sqrt{\frac{{r}_{1}}{{r}_{2}}}C$$(8)According to the calculation of rough threshold, the fine threshold value of an image with binaryzation is determined. The binarization of moving video images can be reduced to the classification of the two models (targets and backgrounds). Finally, the images are divided into two categories: key content and background [11].

Assuming that a given moving video image has a gray level of 123 · · · *L*^{′}, a total of *L*^{′}, and a threshold of *t*, the pixels with gray levels greater than *t* and less than *t* are divided into two categories: class 1 and class 2. The total number of pixels in class 1 is *ω*_{1} (*t*), the average gray value is *μ*_{1} (*t*), and the variance is *σ*_{1} (*t*). The total number of pixels in class 2 is , the average gray value is *μ*_{2} (*t*), the variance is *σ*_{2} (*t*), and the average gray value of image pixels is *μ* (*t*). The inter-class variance ${\sigma}_{A}^{2}\left(t\right)$and intra-class variance ${\sigma}_{A}^{2}\left(t\right)$can be defined as

$$\begin{array}{r}{\sigma}_{B}^{2}\left(t\right)={\omega}_{1}\left(t\right){\left[{\mu}_{1}\left(t\right)-\mu \left(t\right)\right]}^{2}+{\omega}_{2}\left(t\right){\left[{\mu}_{2}\left(t\right)-\mu \left(t\right)\right]}^{2}\end{array}$$(9)where

$$\mu \left(t\right)={\omega}_{1}\left(t\right){\mu}_{1}\left(t\right)+{\omega}_{2}\left(t\right){\mu}_{2}\left(t\right)$$(10)In pattern classification theory, there are three criteria for separability measurement among different classes: scattering matrix, divergence and Battacharyya distance. The ratio of inter-class variance to intra-class variance corresponds to the scattering matrix, which reflects the distribution of patterns in pattern space. Also the greater the similarity of the pixels of each class are the classification results will be better [12, 13]. Therefore, the maximum inter-class variance criterion function *S* (*t*) is used to fine tune the rough threshold.

$$S\left(t\right)=\frac{{\sigma}_{B}^{2}\left(t\right)}{{\sigma}_{A}^{2}\left(t\right)}\cdot T$$(11)According to Eq. (11) the binarization method based on spatial distribution is combined with the maximum inter-class variance classification criterion to realize the binarization of moving video images. In this way, the contrast between the background and the target is enhanced, the accuracy of the image recognition is improved, the real-time performance of the image recognition is enhanced, and the energy consumption of the recognition is reduced to a certain extent.

## Comments (0)

General note:By using the comment function on degruyter.com you agree to our Privacy Statement. A respectful treatment of one another is important to us. Therefore we would like to draw your attention to our House Rules.