Keywords

1 Introduction

The spirit of competitive sports is “higher, faster and stronger". With the improvement of sports competition level, how to understand the training level of athletes conveniently and quickly, extract sports parameters, and provide help for athletes’ daily training, has become an urgent problem for sports workers. In recent years, many countries have strengthened the research on the field of sports science. In the past, the mode of sports training based on Coaches’ observation records and intuitive judgment can no longer meet the needs of the continuous improvement of competitive level. In 2008 Beijing Olympic Games put forward “Digital Olympics” and “science and technology Olympics”. Under such circumstances, it is urgent to improve the level of sports science research in China. Therefore, computer vision technology is widely used in sports training [1].

Because machine vision has better accuracy and memory than human eyes, it can quickly capture moving objects and record all kinds of motion data of objects. By collecting a large number of video image information of high-level athletes in daily training and large-scale competitions, and analyzing these information effectively, we can change the deficiency of the former coaches who only rely on manual observation and experience to guide athletes’ technical movements, and can greatly improve the training effect of athletes.

In recent years, with the continuous development of science and technology, moving target detection and tracking technology is becoming more and more mature. However, in the sports video, the colors of athletes and background venues may be similar, and there is still mutual occlusion between athletes. The uniqueness of sports video brings a great challenge to target detection and tracking technology. Therefore, the purpose of this paper is to propose an efficient algorithm for moving target detection and tracking, and build a simulation system to verify the correctness of the algorithm.

2 Image Preprocessing Method

In general, due to the problems mentioned above, the original images collected by our system are usually not beautiful enough. For the original image collected, due to noise, illumination and other reasons, often can not be directly used for tracking and detection, so we need to carry out relevant preprocessing work on the original image. Preprocessing includes image enhancement, data coding and transmission, edge sharpening and so on [2]. Through preprocessing, the image can not only effectively denoise, improve the image quality and improve the clarity, but also provide a good guarantee for the follow-up processing work, such as the correctness of target detection and extraction, and the timeliness of target tracking. It is more convenient for computer to analyze, understand and recognize images.

2.1 Grayscale Processing

Color images are generally divided into three types: black and white, gray and color. In general engineering applications, it is often necessary to transform color images into gray images to deal with problems. The sports video sequence images collected by digital camera are all color images. In order to facilitate the rapid processing of the program, it is necessary to convert the collected color images into gray images. The process of converting color image into gray image is called grayscale processing. The description of gray image, like color image, still reflects the distribution and characteristics of the whole and local chroma and brightness of the whole image.

In general, each pixel of a color image is represented by 3 bytes, and each byte corresponds to the brightness of RGB component. A pixel of the transformed gray image is represented by a byte. The larger the gray value of the point, the brighter the brightness; the smaller the value, the darker the brightness. The transformation relationship is usually formulated.

$$ grey(i,j) = 0.11_{r} (i,j) + 0.59g(i,j) + 0.3b(i,j) $$
(1)

The maximum value, minimum value or arithmetic mean value of the three components can also be taken for gray transformation. The purpose is to make the RGB component value of color equal.

2.2 Image Enhancement

The important problem of image enhancement is to improve the image details, lightness and sharpen the edge of the image. Gray level transformation is an important means of image enhancement [3]. Its purpose is to change the gray level of the whole image or some areas of the image in a unified way, so as to increase the contrast, strengthen the image interpretation and recognition effect, so as to make the details of the image easier to see. The general formula for gray scale transformation is shown in 2.

$$ s = T(r) $$
(2)

2.3 Filtering Processing

Median filtering is a kind of nonlinear digital filtering technology based on statistical sorting theory. It replaces the gray value with the median value in the pixel field. However, the median filter does not need to know the statistical characteristics of the image in the actual operation. Compared with linear filter, median filter can effectively compensate for the loss of image details caused by linear filter, and can effectively eliminate the interference of noise while retaining the image edge, so it is widely used. Median filtering is very effective for processing impulse noise, because the noise is superimposed on the image in the form of black and white dots. Median filtering is very effective in dealing with the interference of outliers and line segments, because it does not rely on the values in the domain that are significantly different from the typical values.

In the digital image, because the digital image is two-dimensional data, so the median filter is also two-dimensional. The filtering process is to select a 2D sliding template with a specific structure, and then arrange the pixel values in the template according to the size to form a monotonous data sequence. The output formula of two-dimensional median filter is as follows:

$$ g(x,y) = Medf(x - i,y - j),(i,j) \in D $$
(3)

In the example, the effect of median filtering is shown in Fig. 1.

Fig. 1
figure 1

Image after median filtering and image after mean filtering

3 Overview of Tracking Algorithm

After successfully detecting the moving target, we need to track the target. There are many kinds of moving target tracking algorithms, people try to classify them: according to rigid target tracking algorithm and non rigid target tracking algorithm; according to motion based tracking algorithm and model-based tracking algorithm [4]. So far, there is no authoritative classification.

Target tracking is to find the position of the interested moving object in each frame of a video sequence. It is an important link between moving target detection and target behavior analysis and understanding, and has an important role. Therefore, it is a very active topic in the field of computer vision, image processing and pattern recognition. In practical application, target tracking can not only provide the target's motion track and accurate position, but also provide reliable data source for the motion analysis and scene analysis of the moving target in the scene. At the same time, the tracking information of the moving object also provides help for the correct detection and recognition of the moving target. Moving target tracking has important practical value in industrial process control, medical research, traffic surveillance, automatic navigation, astronomical observation and other fields.

4 Conclusion

Moving object detection and tracking is a hot research direction in computer vision and image processing. Based on the analysis of commonly used moving object detection and tracking algorithms, this paper focuses on non rigid human object tracking in sports video. In sports video, non rigid athletes often produce body deformation in the process of sports, and may be accompanied by the cover up of sports day mark. The complexity of sports brings many difficulties to the actual detection and tracking of moving objects. In order to effectively detect and track athletes, this paper improves the common single tracking algorithm and proposes a tracking method combining mean shift algorithm and color histogram algorithm, which further improves the effect of sports target detection and tracking. In order to verify the effectiveness of the algorithm, this paper uses MATLAB to carry out simulation and gives an example of detection and tracking effect.