# Accurate Segmentation Algorithm of Video Dynamic Background Image Based on Improved Wavelet Transform

Ming Ming*

## Abstract

Abstract: In this paper, an accurate segmentation algorithm of video dynamic background image (VDBI) based on improved wavelet transform is proposed. Based on the smooth processing of VDBI, the traditional wavelet transform process is improved, and the two-layer decomposition of dynamic image is realized by using two-dimensional wavelet transform. On the basis of decomposition results and information enhancement processing, image features are detected, feature points are extracted, and quantum ant colony algorithm is adopted to complete accurate segmentation of the image. The maximum SNR of the output results of the proposed algorithm can reach 73.67 dB, the maximum time of the segmentation process is only 7 seconds, the segmentation accuracy shows a trend of decreasing first and then increasing, and the global maximum value can reach 97%, indicating that the proposed algorithm effectively achieves the design expectation.

Keywords: Dynamic Background Image , Image Segmentation , Improved Wavelet Transform , Video Image

## 1. Introduction

Video image processing system is inseparable with the development of contemporary science and technology. With the development of CPU computing capacity, storage space, semiconductor devices and large-scale integrated circuit technology, the development of video image processing system is promoted [1]. The development of image processing technology depends on the application and development of the computer. Image processing technology is an active part of computer application field, and sometimes image processing is equivalent to computer image processing [2].

Video image is a sequence of continuous static images. Video image processing is to analyze and manipulate video images based on image processing algorithm. Dynamic video refers to process images using computer technology, and continuously play the processed object out at the speed of 25-30 frames per second. After processing the object, a dynamic video image file is formed [3].

Video images can be categorized into foreground image and background image. Background image analysis and processing are the main contents of computer vision research. Among them, image segmentation technology is an important link, which determines the scope of image application [4].

In order to improve the quality and efficiency of image segmentation, an accurate video dynamic background image (VDBI) segmentation algorithm based on improved wavelet transform is proposed in this paper.

## 2. Literature Review

Image segmentation algorithms have been widely used. At present, a considerable number of methods or models based on different theories and principles have been proposed, improved, and optimized by scholars at home and abroad. Through summarizing these research literatures, the main problems to be solved are to improve the segmentation accuracy and image fitting effect of image segmentation algorithms in the application of medicine, engineering, and space.

The research of this paper is based on the improved wavelet transform. Wavelet transform is a new transform method developed on the basis of short-time Fourier transform (STFT). It has the advantages of fast speed, saving storage space, high degree of abrupt signal restoration, and the unification of time resolution and frequency resolution. Wavelet transform inherits the advantages of the STFT, and overcomes its shortcomings, which is an ideal signal time-frequency analysis and processing tool [5]. Wavelet transform solves the problem of Fourier transform, becoming a major breakthrough in the field of image processing [6]. The researches on signal analysis, speech synthesis, image recognition, computer vision, data compression, seismic exploration, atmospheric and ocean wave analysis and so on are of scientific significance and application value. Aiming at the shortcomings of traditional methods, a new accurate segmentation algorithm for VDBI based on improved wavelet transform is proposed in this study, which is proved to have higher segmentation accuracy and better segmentation effect.

## 3. Proposed Accurate Segmentation Algorithm for VDBI

##### 3.1 Wavelet Transform and Its Improved Processing

Wavelet transform can provide a "time-frequency" window which changes with frequency.

It solves the problem of Fourier transform, becoming a major breakthrough in the field of image processing. Wavelet transform is characterized by high compression ratio and fast compression speed. After wavelet decomposition of an image, images with different resolutions can be obtained. If only the low-frequency part containing the main texture information is retained, the purpose of image compression can be realized.

Two-dimensional wavelet transform is used in image processing [7], which is expressed as follows:

##### (1)
[TeX:] $$F\left(\partial, l_x, l_y\right)=\int_{-\infty}^{+\infty} f(x, y) \gamma_{\partial, l_x, l_y}^*(x, y) \mathrm{d} x \mathrm{~d} y$$

where [TeX:] $$\partial$$ represents the scale factor, [TeX:] $$l_x$$ and [TeX:] $$l_y$$ represent the translation of [TeX:] $$x$$- and [TeX:] $$y$$-axis, respectively, and [TeX:] $$\gamma_{\partial, l_x, l_y}^*(x, y)$$ represents the wavelet basis. The calculation process is as follows:

##### (2)
[TeX:] $$\gamma_{\partial, l_x, l_y}^*(x, y)=\frac{1}{|\partial|} \gamma\left(\frac{x-l_x}{\partial}, \frac{y-l_y}{\partial}\right)$$

The inverse transformation is:

##### (3)
[TeX:] $$f(x, y)=\frac{1}{\mu} \int_{-\infty}^{+\infty} F\left(\partial, l_x, l_y\right) \gamma_{\partial, l_x, l_y}^*(x, y) \mathrm{d} l_x \mathrm{~d} l_y \frac{\mathrm{d} \partial}{\partial^3}$$

where, [TeX:] $$\frac{1}{\mu}$$ represents the coefficient. The two-dimensional signal of static image needs to be processed by two-dimensional filter. Considering the separability of wavelet function, two-dimensional filter can be synthesized from one-dimensional filter. [TeX:] $$L$$ represents low-pass filter, [TeX:] $$H$$ represents high-pass filter, and filters [TeX:] $$LL$$, [TeX:] $$LH$$, [TeX:] $$HL$$ and [TeX:] $$HH$$ constitute four filters with different frequency and directional characteristics. [TeX:] $$LL$$ is adopted to detect low-frequency components of the image, [TeX:] $$LH$$ is used to detect edge and detail components in the horizontal direction, [TeX:] $$HL$$ is used to detect edge and detail components in the vertical direction, and [TeX:] $$HH$$ is used to detect components in the diagonal and subdiagonal directions (Fig. 1).

However, the above traditional wavelet transform process can only process static images and has poor decomposition ability for VDBIs. Therefore, an improved wavelet transform process is designed in this study to realize wavelet multi-scale decomposition of VDBI.

Image of three-layer wavelet decomposition.
##### 3.2 Information Enhancement Processing of VDBI

After the improved wavelet transform processing of VDBI is completed, the image information is enhanced in the maximum connected image area of the VDBI.

In the [TeX:] $$3 \times 3$$ sub-block, the region merging model of VDBI was constructed [8]. Within the neighborhood distribution range of a pixel point, the feature distribution function of a single superpixel of the image obtained is:

##### (4)
[TeX:] $$f_d=\varphi \prod_1^\omega e(I+c)$$

where [TeX:] $$d$$, represents the relative distance within the space range [TeX:] $$3 \times 3$$ pixel blocks, [TeX:] $$\varphi$$ represents the set of all unknown parameters in the Gaussian mixture model, [TeX:] $$\omega$$ represents the weight of the image, [TeX:] $$e$$ denotes the curvilinear contour edge of the image, [TeX:] $$I$$ represents the binarization feature model of the image, and [TeX:] $$c$$ represents the feature distribution set of gray pixels corresponding to [TeX:] $$a$$ [9].

In the active contour boundary of the VDBI, the information enhancement processing is completed, and the output expression of information enhancement is obtained as follows:

##### (5)
[TeX:] $$B=\frac{2 f_d}{\kappa}$$

where, [TeX:] $$\kappa$$ denotes the pixel gradient distribution of the image in the statistical threshold.

##### 3.3 Image Feature Detection and Feature Point Extraction

To enhance the quality of image segmentation, feature matching method is used to detect the feature information of VDBI.

Assuming there is gray pixel set of the image [TeX:] $$(i,j)$$, which is taken as the pixel center, the sharpening template block combination method is used to construct the feature segmentation model of the image. For the gray value [TeX:] $$I_q$$ of the image collected in the [TeX:] $$q$$, the corresponding gradient feature component of the image can be obtained in the feature distribution space of edge pixels:

##### (6)
[TeX:] $$G=\frac{\beta \sum_{q=1}^{\infty} I_q(i, j)}{n}$$

where, [TeX:] $$n$$ represents the number of columns in the LGB vector quantization matrix of the image, and [TeX:] $$\beta$$ represents the fuzzy feature quantity.

Combined with the pixel reconstruction method, visual perception and 3D reconstruction of the image are conducted. Then, the gray pixel features of the image are reconstructed with the spatial region reconstruction method, and the output feature quantity is:

##### (7)
[TeX:] $$C=\langle c, d\rangle \times G-v$$

where, [TeX:] $$\langle c, d\rangle$$ denotes the statistical feature distribution set of image pixel feature points in the [TeX:] $$d$$ direction, and [TeX:] $$\mathcal{V}$$ denotes the sparse residual part.

To sum up, the feature detection of VDBI is completed. Based on this, the feature points of the image are extracted. The local area intensity control method of image is used to analyze the texture information of the image, and the cosine similarity feature analysis method is employed to obtain the associated feature quantity of the image at each scale, so the quantization set of the image feature distribution is as follows:

##### (8)
[TeX:] $$L_C=\lambda_1 \int_1\left|C-c_1\right|^2+\lambda_2 \int_1\left|C-c_2\right|^2$$

where, [TeX:] $$c_1$$ and [TeX:] $$c_2$$ represent two adjacent image pixels respectively, and [TeX:] $$\lambda_1$$ and [TeX:] $$D$$ represent the weighted average coefficients of intensity of two adjacent image pixels in [TeX:] $$A$$ local area, both of which are constants greater than 0. On this basis, the gray value of each pixel is calculated to obtain the envelope contour of image threshold segmentation, and the region segmentation function is defined as follows:

##### (9)
[TeX:] $$R=\frac{C}{L_c(g(1)-g(u))}$$

##### 3.4 Accurate Image Segmentation

Based on the feature points of the VDBI obtained above, this study uses the quantum ant colony algorithm to realize accurate segmentation of image.

Firstly, the correlation detection model between synthetic image and real image is constructed. Assuming that the template matching function of correlation feature detection is [TeX:] $$K$$, which can be calculated as follows:

##### (10)
[TeX:] $$K=(\max y+Z) \times \lambda$$

where, [TeX:] $$\lambda$$ represents the normalized correlation coefficient and maxy represents the maximum matching value.

According to individual ant colony optimization routes, contour optimization control of image threshold segmentation is carried out, and combined control of individual optimal solution in the process of quantum ant colony segmentation is realized by using color space combination method. The output results are as follows:

##### (11)
[TeX:] $$X=\frac{1}{\sqrt{2 \pi}} \max y\left\{\frac{(g(1)-g(u))^2}{Z}\right\}$$

The image target boundary is extracted from the output results, and the pheromone guidance intensity of the quantum ant colony is set as [TeX:] $$\psi$$. Then, the segmentation fusion of the image is detected by using the regional feature matching method, the pixel value of the overlapping region is calculated, and the block matching is performed by combining the multi-fractal technology. The fast-matching process is as follows:

##### (12)
[TeX:] $$W=\max y+X \times \psi$$

According to the difference of texture distribution of the image, the two-dimensional network point set of the image is obtained:

##### (13)
[TeX:] $$Y=\left\{\left(x_i, x_j\right) \mid 1 \leq i \leq M, 1 \leq j \leq N\right\}$$

where, [TeX:] $$M$$ and [TeX:] $$N$$ represent the length and width of the image edge, respectively.

The ant colony segmentation is carried out according to the structure and texture of the image, the quantum ant colony algorithm is adopted to optimize the control, and the multi-layer features of the image are decomposed. Assuming that the optimization function is [TeX:] $$\eta$$, a multi-layer feature segmentation model is constructed, and the segmentation result obtained is:

##### (14)
[TeX:] $$E=W \times\left(\frac{1}{\gamma}(Y+\phi) \psi\right)$$

where, [TeX:] $$\phi$$ represents the fixed amplitude of pixels in the image pixel point set.

## 4. Experiment and Result Analysis

To validate the feasibility of the proposed VDBI segmentation algorithm based on improved wavelet transform, the following simulation experiment is designed for verification.

##### 4.1 Experimental Environment Design

The simulation experiment platform is built based on MATLAB and Visual C++, and the experimental data are collected from a video image dataset. The experimental parameter setting is shown in Table 1. The image matching template is a uniform distribution template of [TeX:] $$400 \times 400$$, and the resolution feature point of 5 mm is selected at the edge position. The pixel intensity of the image is automatically selected to 1200 pixels, and 100 pixels are randomly sampled for image segmentation with a resolution of [TeX:] $$800 \times 800$$.

Experimental parameter setting
##### 4.2 Accurate Image Segmentation

The main experimental indicators selected in the comparative experiment are as follows:

(1) Signal-to-noise ratio (SNR) of output results: SNR refers to the ratio of effective information to noise in the output results. The higher the SNR value is, the more effective information content is. The calculation process is as follows:

##### (15)
[TeX:] $$\mathrm{SNR}=10 \lg \left(\frac{P_s}{P_n}\right)$$

where, [TeX:] $$P_s$$ and [TeX:] $$P_n$$ represent the power values of the effective signal and noise, respectively.

(2) Segmentation time: the evaluation process time can reflect the efficiency of the image segmentation algorithm, and the consumption time is automatically counted by the simulation platform.

(3) Segmentation accuracy: The validity of different segmentation algorithms can be detected according to the segmentation accuracy.

Firstly, the SNR of the output results of different algorithms is tested.

With the increase of the number of experimental iterations, the SNR of the output evaluation results of different image segmentation algorithms change constantly. However, the SNR peak value of the output results of the proposed algorithm remains the highest, with the maximum value reaching 73.67 dB. Then the segmentation process time of different algorithms is tested.

With the increase of the number of experimental iterations, the time consumption of the segmentation process of different image segmentation algorithms changes constantly in an irregular law. However, the segmentation time of the proposed algorithm remainsless, of which the maximum time is only 7 seconds.

Secondly, the validity of different algorithms is verified by taking the segmentation accuracy as an indicator, with the increase of the number of experimental iterations, the segmentation accuracy changes constantly. The segmentation accuracy of the proposed algorithm decreases first and then increases, with the global maximum value reaching 97%, which is significantly higher than that of the other two algorithms. Therefore, the algorithm proposed in this paper can effectively achieve accurate segmentation of VDBIs.

## 5. Conclusion

To improve the image segmentation quality and efficiency, this paper proposes an accurate VDBI segmentation algorithm based on improved wavelet transform.

By smooth processing of VDBI, the traditional wavelet transform process is improved, and the two-layer decomposition of dynamic image is realized by using two-dimensional wavelet transform. On the basis of decomposition results and information enhancement processing, image features are detected, feature points are extracted, and quantum ant colony algorithm is adopted to complete accurate segmen¬tation of the image.

In order to verify the feasibility of the proposed segmentation algorithm, simulation experiments are carried out. The images in the form of character scene images, landscape images and remote sensing images are selected. The proposed method is adopted to segment these three types of images. The results indicate the feasibility of the proposed algorithm. To further highlight the forward-looking technical level of the algorithm proposed in this paper, the comparative experiments are carried out among the proposed algorithm and the other two literature methods in terms of SNR of output result, segmentation time and segmentation accuracy. The experimental results show that the peak value of the SNR of the output results of the proposed algorithm is always the highest, with the maximum value reaching 73.67 dB; the segmentation time of the proposed algorithm is always less, and the maximum segmentation time is only 7 seconds; the segmentation accuracy of the proposed algorithm shows a trend of decreasing first and then increasing, with the global maximum reaching 97%, which is significantly higher than that of the other two algorithms. Therefore, it shows that the image segmentation algorithm proposed in this paper has good application performance in improving the SNR of output results, shortening the time-consuming process, improving the segmentation accuracy.

Although the proposed algorithm improves the wavelet transform, the inherent limitations of wavelet transform, such as information redundancy, still limit its application. In addition, there is a lack of systematic and standardized optimal wavelet basis selection methods. These problems need to be solved in future researches.

## Biography

##### Ming Ming
https://orcid.org/0000-0002-8382-3154

She graduated from Shandong University of Finance in July 2004, majoring in information management and information system, with a bachelor’s degree. Now she works in Yantai gold college as a lecturer. Her research interests are cloud computing. She has published six academic articles.

## References

• 1 P . Shivakumara, A. Alaei, and U. Pal, "Mining text from natural scene and video images: a survey," Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, vol. 11, no. 6, article no. e1428, 2021. https://doi.org/10.1002/widm.1428doi:[[[10.1002/widm.1428]]]
• 2 H, Jin, T. Cao, C. Xiao, and Z. Xiao, "Video summary generation based on multi-feature image and visual saliency," Journal of Beijing University of Aeronautics and Astronautics, vol. 47, no. 3, pp. 441-450, 2021.custom:[[[-]]]
• 3 J. H. Zuo, Z. H. Jia, J. Yang, and N. Kasabov, "Moving object detection in video image based on improved background subtraction," Computer Engineering and Design, vol. 41, no. 5, pp. 1367-1372, 2020.custom:[[[-]]]
• 4 I. A. Kudinov, M. B. Nikiforov, and I. S. Kholopov, "Strategies for generating panoramic video images without information about scene correspondences for multispectral distributed aperture systems," Computer Optics, vol. 45, no. 4, pp. 589-599, 2021.doi:[[[10.18287/2412-6179-co-846]]]
• 5 D. Cui, "Image segmentation algorithm based on partial differential equation," Journal of Intelligent & Fuzzy Systems, vol. 40, no. 4, pp. 5945-5952, 2021.doi:[[[10.3233/jifs-179614]]]
• 6 I. Kotaridis and M. Lazaridou, "Remote sensing image segmentation advances: a meta-analysis," ISPRS Journal of Photogrammetry and Remote Sensing, vol. 173, pp. 309-322, 2021.doi:[[[10.1016/j.isprsjprs.2021.01.020]]]
• 7 Z. Wang, "Dynamic recognition simulation of video image frame features based on visual communication," Computer Simulation, vol. 37, no. 7, pp. 455-458, 2020.custom:[[[-]]]
• 8 L. Mo, L. L. Li, and L. Shu, "Application of unsupervised fuzzy clustering algorithm in image recognition," Techniques of Automation and Applications, vol. 39, no. 1, pp. 121-124, 2020.custom:[[[-]]]
• 9 Y . Yin and S. Li, "Damage diagnosis of silo structure based on two-dimensional wavelet transform," Journal of Wuhan University of Technology, vol. 43, no. 5, pp. 54-59, 2021.custom:[[[-]]]

Table 1.

Experimental parameter setting
Template size Parameter setting
[TeX:] $$8 \times 8$$ 0.456
[TeX:] $$12 \times 12$$ 0.424
[TeX:] $$30 \times 30$$ 0.554
[TeX:] $$36 \times 36$$ 0.535
[TeX:] $$40 \times 40$$ 0.578
Image of three-layer wavelet decomposition.