Simulation of Tennis Serve Behavior Based on Video Image Processing Technology

: Video-based human motion analysis is an important research direction in the field of computer vision. It detects moving objects from video sequences, extracts key parts of the human body, and obtains useful information for human movements. Further analysis and identification. In this paper, the joints of the teeing arm are first color-coded. The tennis teeing video is collected by a high-speed camera. The coordinates of the tacking points in each frame are used instead of the knuckles to study the trajectory of the teeing arm. In the process of video processing, after constructing a dictionary for a series of noise maps, the sparse representation idea was used to reconstruct an interference-free service diagram, and a mixture of Gaussian background modeling was used to extract the foreground of the motion. After obtaining the motion foreground, the marker points are extracted through the color features, and binarization operations are performed on the marker points. Next, the outline of the marker points is searched, the outline is surrounded by the minimum circle, and the returned circle center coordinates are used as the joint point coordinates. Taking the trajectory of the shoulder marking point as a research object, a tennis serving model based on an improved support vector machine was established. A splint was placed on the thigh to extend the knee at an angle of 10° (0° indicates full knee extension), and each person performed 30 flat serves, with normal (without knee restraint) and 15 knees restricted. The experimental results show that knee exercise is an important factor affecting the efficiency of serve, and has nothing to do with the athlete's level.


1.Introduction
With the rapid development of science and technology, the booming information has become a major feature of today's society. At the same time, modern tennis training technology has been widely disseminated. Computer technology, modern communication technology and artificial intelligence technology have been widely used in tennis training. (Feng, Ren, Jiang,2011) [1]. This has greatly promoted the development of the theory and practice of tennis training and optimization. Tennis training must take full advantage of modern tennis training techniques according to its own characteristics to improve the quality of training and improve the quality of athletes. Serving technique is one of the key technologies in tennis. In training, it is also one of the most difficult techniques to master. In the traditional tennis training, the traditional training mode is generally used to train, that is, coaches to explain the demonstration, the athletes to practice on the venue, the coach to conduct individual guidance, found that easy to make mistakes to correct, and then allow athletes to personally practice the exercise, so that Athletes do not have a correct comparison standard, and it is difficult to fundamentally understand their own mistakes (Hockaday S,1991) [2]. It is difficult to form movement representations in the brain, which is not conducive to athletes' mastery of serving techniques.
Video image analysis technology is a high-end intelligent system that comprehensively uses image data synthesis technology to realize the real-time analysis of tennis tactics and tactics and simultaneously outputs the analysis results. The system can analyze real-time images of tennis match scenes or training scenes, and has many functions such as statistical techniques and tactics data, linked motion data and images, and playback of motion processes. It is a combination of computer image analysis technology and competitive sports. Video image analysis technology, as the most remarkable achievement in the training of tennis in the century and the crystallization of human wisdom, has become the main component of tennis training science and modern tennis training techniques(Nachtergaele L, Catthoor F, Balasa F, et al.1995) [3]. It has a very positive significance for breaking through the traditional tennis training concept. Tennis technical training requires athletes to have a lot of observations, imitations, feedbacks, and corrections in the process of forming athletic skills. Sensory information other than proprioception is needed, especially audiovisual information. Traditional training is difficult to implement these processes, and video image analysis technology fully demonstrates technical advantages in demonstrating the breadth, integrity, vividness, and detail of practical content, and the key points and difficulties in certain training materials. The details, which are clearly presented to the athletes in words, voices, images, animations, etc., can provide effective help to the coaches. For athletes, their lively displays are more attractive.

2.The purpose of research
Science and technology are playing an indispensable role in today's society and their importance is even more prominent in sports. In tennis day-to-day teaching and training, the effects of coaches' visually visible training mode on athletes' competitive level have been insignificant since ancient times, and the dominant position of sports science and technology in sports training has been increasingly revealed. Therefore, how to introduce sports science and technology into sports training and continuously improve the effectiveness and scientific nature of sports training has become an important subject worth studying at present. On this basis, this paper proposes the application of video technology in the analysis of tennis serve speed and success rate. As we all know, the human eye is an important external manifestation of the visual system. It is also an important organ for people to obtain information from the outside world. Through the human visual system, it can obtain external, direct information and leave the most intuitive impression. Usually, this activity needs to rely on the static image or the dynamic video media to achieve(Aizawa K, Sakaue K, Suenaga Y,2004) [4].
With the continuous soaring level of sports competition, the development of computer technology and video technology, the use of machine vision to collect information has provided feedback for trainers with more abundant information, and can also record data information of moving targets. These data information are passed through The visual system cannot be obtained, which provides a more intuitive performance for athletes' technical movements. It can be seen that these tools and technologies that we use for video capture use different forms and means to observe the video images obtained, and are used in the analysis of the speed and success rate of tennis balls, to improve the tennis player's service level, and to constantly develop our country. Tennis career. For a long time, our country has a low level of technical training in competitive sports, and there is a big gap compared with other developed countries. The reasons for this situation mainly include the following two aspects: (1) In the training process, long-term or habitual reliance on coaches' subjective awareness and experience is implemented according to coaches' instructions. Coaches can only analyze and evaluate students' technical movements through the naked eye; (2) Athletes improve their level of technical action through repetitive exercises. There is no additional reference to help them acquire technical skills.
For a long time, the path of scientific training in China's competitive training has become increasingly difficult, and there has been a clear gap compared with other countries with developed science and technology. At present, some authoritative experts and coaches at home and abroad have come to a conclusion after long-term research and practice. That is: In the process of athletes completing their actions, they record the athlete's movements with the camera and obtain the athlete's action videos through computer software. Perform processing to make the whole action more detailed. The image or data information represented by the video processing result is the most authentic portrayal of the athlete in the training process (Camana P,1979) [5]. There is no other interference factor, and the technical movement of the athlete's technical movement can be directly assessed and the technical index can be evaluated to find the physical characteristics of the athlete. And expertise, and found that its training in the existing deficiencies and shortcomings, avoid weaknesses, in order to achieve the purpose of improving sports technology and inspire athletes to learn interest. At the same time, the introduction of technical videos in sports programs is not only an analysis of athlete skills, but also provides a basis for controversial penalties in competitions.
Video analysis systems have been introduced in tennis games: Hawkeye technology and speedometers. Among them, the Hawkeye technology records and plays back the content of the disputed ball between the player and the referee in the game, and provides evidence for the punishment. The speedometer is also calculated by the distance the ball is recorded in the unit of time. The speed of the ball, these are all accomplished using video image analysis techniques(Michalopoulos P G. Michalopoulos, P. G,1991) [6]. Video analysis technology is an extremely advantageous teaching tool in the process of tennis teaching. It can be applied to the acquisition of skills, the engraving of technical movements, the visualization of everything, the prevention of injuries and the training of coaches. The advantages of using video analytics in teaching and training include: (1) Slow-motion playback: The rate of completion of each technical link in tennis is relatively high, and it is almost impossible for the human eye to observe it. In view of this, coaches rely on the ability of the naked eye to analyze these technical actions is limited. Video technology allows coaches to analyze technical movements in slow-motion playback, repeat them repeatedly, and observe them from different angles.
This means that the coach has the opportunity to analyze the technical movements and obtain relevant and useful information from more details (Borie B, Gautier Y,1995) [7].
(2) Constructing a model library: The technical movements in tennis are composed of the most basic principle models. Using video technology, these models can be included. At the same time, technical movements with individual differences can also be collected. In the end, the technical movements of excellent tennis players can form a template, and the technical movements of other trainers can be compared with the technical movements of outstanding athletes. In comparison, it can be difficult to clearly observe the inadequacies of participants' technical movements. The motion-based template based on video technology is a very powerful tool in the teaching of tennis techniques. Especially when coaches face some tennis beginners, they are strictly regulated at the beginning of the establishment of technical movements. For those students who already have a certain level, they can play a higher level of improvement.
(3) Track changes in athletes' performance: Coaches must have the ability to comprehensively analyze changes in team performance and be able to judge and make appropriate training adjustments based on the coach's own knowledge and experience. Video technology has become a very effective tool for recording any changes in coaching coaching results. Photographing several technical moves of the players under training can strengthen the technical changes required by the coaches, and video technology can provide coaches and players with high quality information. The perseverance of the shooting team's training will convey very active training feedback to the coach and the team members, so that we can see the positive effect of the hard work. On the other hand, video technology can also give feedback on the negative effects of coaches' intervention training for expectation. This is also very valuable information because it forms a back-up for training interventions that can be reviewed and used at any time when coaches and players try out new training methods.
(4) Convenient self-reflection by team members: Many players believe that their technical moves or performances have entered an ideal realm. In fact, when they see their technical moves or performances on the video, the results are very different. . Obviously there is an error between ideals and reality. Video technology is an excellent helper to correct this illusion of motion. For athletes, it is very important to understand what is a correct and reasonable technical movement. The video analysis technology can assist the players in the implementation of new technical movements. This study uses the sports training video analysis system in combination with the teaching of tennis special classes in China University of Mining and Technology, and uses the system's convenient and timely feedback function, video contrast playback, background similar video overlay, motion picture decomposition and other functions to serve tennis special class students. Prepare gestures, turn shoulders, bend knees, accelerate rackets, hit the ball, swing with the ball, and close the action to analyze and count the technical movements. Try to grasp the technical movements of the special class as a whole and perform intensive training to correct mistakes. The technical movements provide a reference.

3.1Research state in China
In Sheng Zhijin and Zhu Manfen's "Inertial Gyro Method and Application of Mark-based Virtual Gyro Method in Measurement of Upper Arm Speed in Tennis Serve", it is pointed out that in the top level events, high-speed serve can often dominate the game, so for athletes, It is important to master the serving technique. Since tennis is really at rest only when it is serving, serving is the only action that can be fully controlled by the player. At the same time serving is also considered to be the most difficult one. It requires a series of very complex actions to be performed at the right time. The rotation of the upper arm before the impact of the racket and ball has a contribution of up to 54% to the linear swing speed at the time of impact. The athlete's exercise data in training and competition can be used to help understand the physical condition and competition skills in the competition. Therefore, these data are very important for coaches and sports workers. Video shooting was used to study high-speed serve. In the study, two synchronized high-speed cameras were used to collect data at 200 Hz(Secker A, Taubman D,2004) [8]. During the entire serving process, the two cameras take pictures from the front and side of the athlete respectively, and the shooting range covers the entire range of the athlete's activities. In the study, only the fastest three of the 20 tennis players' serve were selected for follow-up analysis. First, using the Peak Motes system to manually digitize the serve, a 20-point model was used. The 20 points included the middle toes, ankles, knees, buttocks, shoulders, elbows, wrists, head, and racquets. For handles and racquets, the initial frame of the center is selected at the moment the ball just throws up, and the end frame is selected after the net has hit the ball for a period of time. Then, a computer program that calculates the three-dimensional coordinate data using the direct linear transformation method calculates the required kinematic parameters, such as the rotation of the shoulders, knee bending, and the like. In this study, the inertial gyro method and the marker-based virtual gyro method (abbreviated as MBVG) were used for the monitoring of the upper arm rotation when serving a tennis ball, and the monitoring results were compared with the results obtained by the video shooting method. The MBV method can be used in the case of over-range gyroscopes. The data can reflect actual serving movements. The MBVG method can also be used to confirm the peak part of the gyroscopic data. It does not need to give accurate results, only rough changes are required. can.
In Wang Kaijun's "Study on Optimization of Tennis Serving Techniques in Sports Colleges and Universities", it is pointed out that teaching of serving techniques is a difficult point in teaching, and it is one of the most difficult techniques to master. Most tennis teachers, coaches and students will serve on the ball. At the top of the most important and difficult to master basic tennis techniques, many students are still not very good at mastering the serving technique when they graduate. At present, there is a lack of effective methods for serving technology teaching. There is a common situation where "teachers are difficult to teach and students are difficult to learn". The key points and difficulties in the teaching of tennis ball techniques are mainly tossing balls, hitting points, rackets, squats, balances, coordination and stability. The main problems in the current tennis teaching in physical education colleges are the lack of targeted teaching; insufficient attention to second-generation techniques; insufficient awareness of serving students; single teaching methods, lack of a diversified teaching system and lack of suitable teaching materials. Wait. In response to the major problems in the current teaching of tennis ball teaching (especially the teaching of heavy and difficult techniques of serving balls), this paper proposes methods such as parallel standing bow-body practice, gripping transformation, "8-character" circling practice, and advance and retreat. The teaching methods such as body posture transformation method, fixed point practice method and auxiliary practice method have proved that the above teaching methods are feasible and effective in the teaching of tennis ball technique(Hanna G, Cuschieri A,2001) [9].
In Ren Xiping's "Analysis of Academic Factors Affecting the Effect of Tennis Serving," he pointed out that serving is an important move in tennis skills, but it is not easy to grasp. "A good serve, which has already won half of the game," "Can win the game, you will never lose the game" has become a consensus. In the past few decades, biomechanics research technology (biomechanical measurement and model Techniques, etc.) are widely used to evaluate the tennis serve technique. This article analyzes and summarizes the data through literature analysis, and concludes that relevant mechanical technical indexes affecting serve effect understand the technical principles from the objective rules of serving, and from this perspective, explores the mistakes and effective corrective methods of serving balls to improve the serving effect. . The placement, rotation and speed are important symbols of tennis serve. The momentary angle when the ball is shot, the height of the shot, the initial speed of the ball when hitting the ball, the ball flight trajectory, the flight time and other indicators are important technical indicators that affect the serving effect. Starting from the objective law of serving, it is considered that the principle of "contact point, hitting point, target point" is the basic principle of serving. Starting from the principle of technology, we made clear the susceptibility mistakes of various technical links, and put forward specific exercises such as "ring-throwing, hanging-hanging, elastic rope pulling, volleyball spiking, and softball passing" to improve serving techniques. In order to improve the serving effect.

3.2Foreign research status
Girard O et al. studied the effect of knee motion on tennis ball-shot serve by limiting the extension of the knee during the serve. During the experiment, thirty athletes were divided into three groups: Beginner, Intermediate, and Elite athletes. A splint was placed on the thigh to extend the knee at an angle of 10° (0° indicates full knee extension), and each person performed 30 flat serves, with normal (without knee restraint) and 15 knees restricted. The experimental results show that knee exercise is an important factor affecting the efficiency of serve, and has nothing to do with the athlete's level.
IKRAM HUSSAIN et al. divided tennis balls into three phases: preparation phase, force phase and swing phase. In order to increase the speed of delivery, kinematic analysis of the wrist, elbows, shoulders, buttocks and knees of the human body was performed. The results show that the speed of the ball has a significant positive correlation with the speed and acceleration of each part. This provides a kinematic basis for improving tennis serve techniques.
Since the existing tennis teaching software system cannot automatically index key events in tennis matches, Cormaghan D et al. proposed a new type of video analysis system suitable for all levels of athletes. The system can automatically edit and index the collected tennis videos using computer vision algorithms. Key events in the game.
In order to track the tennis player's motion information on the court in real time, Pansiot J et al. proposed a visual sensor network VSN (Visual Sensor Network). These autonomous, wirelessly-communicable VSN nodes are very small and battery-powered, a feature that makes them ideal for monitoring tennis day-to-day training and competition under any circumstances. The "Eye Eye" system, also known as the "Instant Replay System", was developed in 2001 by the British doctor Paul Hawkins. Its technical principle is not very complicated, but it is very precise. This system was originally used in tennis sports to help judges make the right judgments in some controversial decisions. The system consists of 8 or 10 high-speed cameras, supporting computer systems and large screens distributed around the site. First, the entire playing field is divided into measuring units accurate to millimeters by a computer. Then, using the high-speed cameras at different angles scattered around the site, the ball's flight trajectory data is captured at the same time. Then through the computer equipped with special software, the trajectory data collected by all cameras is calculated and analyzed to generate a three-dimensional image. Finally, with real-time imaging technology, the ball's flight path and its placement are clearly displayed on the big screen. In the sport of tennis, the introduction of the Hawkeye system has a milestone of innovation. Today, Hawkeye technology has become part of the refereeing process. Players can pose challenges to try to reverse the referee. This will help fair referees, help athletes innovate technology, enrich tactics in the game, and ultimately will enhance the overall performance of tennis. Tactical level.

4.1Experimental study object
In this study, some young elite tennis players (secondary athletes and above) were selected during the study. Actual combat data served during training and competition was used as research object. A 20-team male student from a sports college tennis special class was selected as the research object, and the students were randomly divided into the experimental group and the control group. As can be seen from Table 1, the average height of students in the experimental group was 177.2cm; the average age was 21.4 years; the average arm length was 73.16cm; the average weight was 65.63kg. The average age of the control group was 21.9 years; the average height was 176.8cm; the average body weight was 64.7kg; the average arm length was 72.6cm. The average age of excellent tennis players is 15.5 years old; the average height is 175.1cm; the average weight is 64.4kg; the average arm length is 73.2cm. There was no significant difference in the average height, average arm length, and average weight of experimental group students, control group students, and high-level athletes.

4.2research tool
Tools used throughout the video analysis process include cameras, memory cards, computers, video processing software, etc. (as shown in Figure 1). During the processing of the entire technical system, people use video cameras to obtain video images and store them in memory cards. Then the video images are transferred to computers through memory cards. Then the video processing software in the computer is used to process the obtained video information. The data information and picture information needed in scientific training.

5.1Background Difference Method
Background difference method is a relatively common method for detecting moving objects. For Image capture card computer CCD camera Rectangular field example, most video surveillance and intelligent traffic systems are based on background difference techniques. Because there is a difference between the current frame and the background model, the part where the current frame and the background frame are similar is taken as the background, and the part with the larger difference is defined as the foreground(Mudde R F, Schulte H B M, Akker H E A V D,1994) [11]. The basic principle is: extract the static background from the video sequence, and then use the difference between the current frame and the background to get the motion foreground. In a static scene, the background model may be captured in advance without foreground moving objects or noise. Differentiating the current image frame from the background reference model, determining the moving target area by statistically changing the information in the histogram, or determining the change in the grayscale feature, finally performing the threshold determination and calculation of the difference result image. Therefore, we can know the size, position, shape and other relevant information of the sports foreground target. Figure 2 shows the background difference method schematic.

Fig. 2 Background Difference Method Schematic
The background difference method can effectively extract the target of the motion. Given the background reference model, the background difference method is an efficient detection method for moving targets. The most common way to initialize the background model is to extract a certain frame image directly from the image sequence, or to calculate the average value of the multi-frame image. (1) In the formula, B(x,y,t) denotes the background pixel value at the position of (x,y) at time t, I(x,y,k) denotes the image information of the k-th frame, and the background is taken from the previous N frame images. . The advantage of this method is that it is simple and can extract complete image information features, but is more susceptible to occlusion, shadows, and changes in light. Markov random field can solve the problem of occlusion, but for obvious occlusion, the effect is still relatively poor. In order to reduce the impact of dynamic scene changes on the extraction of moving objects, the simplest and most effective time averaged image can be used to create a background model(Yokoo A, Taniguchi H,2004) [12]. For example, Haritaoglu uses the minimum and maximum gray values and the largest time difference value for image sequence scenes. All the pixels in the statistics are used to create a background model that can adapt to changes in climate and light.
The background difference algorithm process is to store the background image first, and then use the difference image between the current image and the background image to perform motion detection on the target.
is the current frame, is the background frame of the is the result of the difference between the current frame and the background frame. The principle is as shown in the following formula. (2) Equation (3) When is 0, it represents the background in the image; when is 1, it represents the moving target area in the image. T is the threshold value. When the difference image point value is greater than the set T value, we think this point is a point on the moving target, otherwise it is considered as the image background point.
Since the target detection needs to perform differential processing on the image to be detected in each frame of the video and the background image model, the modeling method of the background model is very important for the accuracy of this method, and the accuracy of the model directly affects the target motion detection result. . The background difference method usually requires that the background model does not produce drastic changes. However, the background model is not absolutely immutable. Sometimes it is necessary to update the background model in time to ensure the correctness of the moving target detection. For example, video noise, changes in illumination, and the transition between objects' motions will require the background model to be updated in time.

Optical flow method
Gibson first proposed the concept of optical flow in 1950. Optical flow refers to the apparent motion of the image brightness pattern in an image sequence. A moving object will leave behind a series of constantly changing images on the retina of the naked eye, so objects in motion will be discovered by human eyes. The basic idea of the optical flow detection method is that according to the image information of the current frame and its subsequent frames, each pixel in the image is assigned a velocity vector to establish a two-dimensional motion field. When there are moving objects in the image, the optical flow vectors generated by the pixel points of the target area and the neighboring background in the image must be different. The target detection can be achieved by determining the optical flow vector of the pixel in the image.
Since a two-dimensional image is a projection of a three-dimensional object motion on a camera, we can use a two-dimensional image sequence to record three-dimensional motion information of an object in a real space. When there is a relative movement between the camera and the object, a corresponding change will occur. From the change between the images, the mutual motion between the object and the camera can be known.
In Figure 3, Z is the object distance between the center of the camera lens and the moving object, f is the focal length, ri is the direct distance between the image point and the center of the lens, and ro is the direct distance between the object point and the center of the camera lens. The basic equation of the optical flow method is based on the assumption that the image gray is constant, that is, the pixel gray value of the object in the same position remains unchanged in two adjacent frames of the video sequence(Nishikata K, Kimura Y, Takai Y, et al.2003) [13]. In 1981, Horn and Schunck derived the basic equations of optical flow based on this assumption. The gray value of the pixel (x,y) at time t is I(x,y,t). At time , the pixel moves to and the pixel gray value is . According to the previous assumptions: Formula (4) according to the Taylor formula expansion, in limit and finishing: Order , then formula (5) can be turned into: Equation (6) is called the basic equation of the optical flow method. Among them, can be obtained directly from the image. For the aperture problems caused by u, v and two unknowns, various optical flow calculation methods such as Horn-Schunck algorithm and Lucas-Kanade algorithm are formed by adding various optical flow constraint conditions. .

Inter-frame difference method
Similar to the background difference method, the inter-frame difference method is also one of the most commonly used algorithms in moving object detection algorithms. The principle of this algorithm is: when the gray level of the image sequence changes slightly, the difference operation is performed using the corresponding pixels of the two or three consecutive frames of the image. If the change of the pixel value of a certain point of the difference image is higher than the threshold, this is considered as The point area is caused by the motion of the target; if the change in the pixel value of a point in the difference image is lower than the threshold, the point area is considered as the background in the image sequence. Calibrate the motion area of the target in the video and use these calibrations to lock the position of the video target. Using the inter-frame difference method directly or indirectly can remove invalid information between frames of the image sequence data, thereby obtaining the change monitoring target(Cohen D B, Mont M A, Campbell K R, et al.1994) [14].
The two-frame difference method performs differential operations on two successive frames of an image sequence. Then, a binarization threshold decision is made on the difference result image, the static background is eliminated, and the moving target region is selected, thereby marking the moving target. The principle of this method is shown in Figure 4.
, , , , x y t I I I Fig. 4 Schematic diagram of the difference between frames In order to detect an effective moving target, the two-frame difference method needs to satisfy: the target needs to have a moving speed, the background scene is still while its gray value changes little, other interference noise is small, and the target gray value changes relatively large, etc. condition. Due to the influence of noise, the influence of background brightness, etc., these factors will affect the effect of the two-frame difference method image to varying degrees. The algorithm operation process is as follows:

Set
as the difference result image, the gray values at points (x, y) in the k-1 frame image and the k-th frame image are and , and the k-1 and k-frames are calculated using the following equation (7). Image difference processing, where is the resulting image after difference calculation.

(7)
By using the following equation (8), is thresholded to detect the background and the moving target.

(8)
Where T is the threshold and is 1, this point represents the target motion area in the image. The detection formula reflects the accuracy of the target change location depends on the threshold selection during the thresholding calculation process.
The two-frame difference method is the same as the background difference method. It achieves a simple program with low complexity and good robustness. In the case of dynamic background, it is more adaptive than other algorithms. Unlike the background difference method, it does not establish a background model, which saves a lot of processing calculations and eliminates the errors generated by the model. However, this algorithm also has some disadvantages. First, when the target motion speed is too fast, the moving target is easily missed. Second, only part of the target-related motion information can usually be detected, and thus the interior of the target will appear hollow, thus the connectivity of the moving target in the image. Influencing; Finally, if a slight gray level change in the background area is misjudged as a change in the target, such interference noise will cause noise points in the detection target.
In summary, the disadvantages of the two-frame difference method include the fact that the target speed is too fast and it is easy to miss the inspection. It will cause the interior of the target to have a void affecting the connectivity, and the background region's micro-motion will increase the noise interference; the background difference method has disadvantages that are difficult to be in a dynamic scene. Under the circumstances, it is difficult to detect the target; the disadvantage of the optical flow .
method is high complexity and large amount of calculation, so it is difficult to achieve. The three-frame difference rule is to improve the inter-frame difference method. In the three consecutive frames of images, first use the classic inter-frame difference method to perform motion detection on the first two frames and the last two frames respectively; secondly, two results are obtained. The image is cross-referenced to the common part, which is considered to be the target area of the second frame. The principle is shown in Figure 5.

Fig. 5 Three-frame difference method schematic
Suppose three frames of image, k-1, k, and k + l at the point (x, y) gray values are , , and , according to the principle of Figure 5, the difference calculation, as follows: An appropriate threshold T is selected to threshold the result image to obtain a binarized image.
The above processed images and are logically intersected with each other to obtain the final target result set .
In the same way, the point at which is 1 represents the target area of motion.  x y x y T x y x y x y

mixed gaussian background modeling
Mixed Gaussian background modeling is a background description method based on statistical information of pixel samples. It uses statistical information such as the probability density of pixels (such as the expected and standard deviation of each mode, the number of modes, etc.) Long time sample values represent the background. Then, the target pixel is determined by statistical difference method (such as principle, is standard deviation). Complex dynamic backgrounds can also be modeled, but the amount of computation may be large.
In the mixed Gaussian background model, the color information between the pixels is defined as not related to each other, and the processing of each pixel point is also independent of each other. In the video image, the change of the value of each pixel in the image sequence can be seen as a random process of continuously generating pixel values, that is, a Gaussian distribution network can be used to represent the regularity of the color of each pixel. For the multimodal Gaussian distribution model, first assign different weights to each pixel in the image, then make multiple Gaussian distributions superimposed by different weights to build the model. Each Gaussian distribution and one pixel may generate The rendered color state corresponds. Over time, the weights and distribution parameters of each Gaussian distribution will be continuously updated. When processing a color image, it is assumed that the RGB three color channels of the pixel point are independent of each other and the variance is the same. Mixing Gaussian Background Modeling In order to describe the state of a pixel at a certain moment, K Gaussian models are created for this pixel. The mixed Gaussian distribution probability function is as follows: (14) (15) In (15), is the pixel value of a pixel at time t, K is the number of Gaussian models, and and represent the mean and weight of the i-th Gaussian model at time t.
represents the probability density function, is the covariance matrix of the Gaussian model, where .
The detailed algorithm flow is as follows: (1) According to equation (16), each pixel value is compared with the current K models until a distribution model matching the new pixel value is found, ie, the expected deviation from the model is within . (16) (2) If the matched pattern matches the background requirement, the pixel belongs to the background, otherwise it will belong to the foreground.
(3) The weight of each mode is updated according to equation (17), where is the learning rate, and for pattern that matches successfully, otherwise , then the weights of the modes are normalized. (17) (4) Mean and standard deviations that do not match the pattern of success remain unchanged, and the parameters for the matching pattern are updated according to the following formula. (20) (5) If no pattern matching is successful in (1), the pattern with the least weight will be updated. The mean of the pattern is the current pixel value, the standard deviation is replaced by the initial large value, and the weight is updated to a smaller value. (6) The patterns are arranged in descending order, with the pattern of heavy weight and small standard deviation placed first.  In equation (21), T represents the proportion of the background, and by setting the value of T, the best background pixel can be selected.
Among these methods, the background difference method is suitable for situations where light and shadows do not change significantly, and the background modeling and updating process is more complicated; the optical flow method is extremely sensitive to noise and has a large amount of calculation, but the camera is in the process of shooting. The motion and sloshing do not affect the detection results, and the robustness is strong. The inter-frame difference method has a simple operation and strong anti-interference. However, when the foreground part of the scene stops moving, it cannot detect the complete foreground, and the sampling frequency and prospect The speed of the target will also affect the detection effect. Mixed Gaussian background modeling has strong robustness to the dynamic changes of the scene, but is sensitive to changes in illumination.

6.Experiment
Variability is an inherent feature of human motion. It cannot be accurately repeated twice by human eyes. This chapter marks the joints of the delivery arm with marked points and obtains the tennis serve video through a high-speed camera. In the process of video processing, the video image sequence is first denoised, and then the foreground of the movement is acquired through the target detection algorithm. Perform coordinate extraction and analyze the trajectory of the marker points. With the analysis of the movement trajectory and serving data of the marked points, the best hitting point of the tennis is predicted. The use of video image processing technology to improve the quality of training will help athletes better master motor skills and improve training efficiency.
The collected tennis ball leveling serve video was analyzed by video image technology. When the noise interference is filtered out, median filtering, wavelet denoising and sparse denoising are used for comparative analysis. Then, the mixture of Gaussian background modeling is used to extract the foreground of motion, and the foreground is further analyzed and processed to obtain the coordinate information of the three markers. Three stages of the tennis ball serve are selected: throwing the ball, backward swinging and hitting the ball. Through data analysis, a range of best hitting points was obtained, and hitting the ball within this range can improve the accuracy of serving.

7.Results and Discussion
Sports analysis based on video image processing is a research hotspot and difficult point in the field of computer vision. It detects moving objects from video sequences, extracts key parts of the human body, and obtains useful information for human movements to achieve human movements, postures, etc. The essay made predictions on the best hitting point for tennis. We color-coded the joints of the serving arm, collected the tennis ball video by a high-speed camera, and used the coordinate of å the point in each frame instead of the joint point coordinate to study the trajectory of the arm when the ball was served. During the video processing, in the process, the interference of the environment with the mark color should be avoided. Blending Gaussian background modeling for motion foreground extraction. After obtaining the motion foreground, the marker points are extracted by the color features, then the binarization operation is performed on the marker points, then the contour search is performed, the outline is surrounded by the minimum circle, and the returned center coordinates are the joint point coordinates. Through the analysis of the trajectory, we find that the arms have periodical mathematical characteristics in the process of serving and find the inherent characteristics of the best ball hitting point in the trajectory analysis of each set of serving movements. For the prediction of the best shot point, the efficiency of serving can be improved and the purpose of auxiliary training can be achieved.