# Research on Sports Training Action Image Recognition Based on SDN

Authors: Dianhai Wang; Lianmei Shen
Journal: Journal of Mathematics
 (2022)

---

## Abstract

Current image recognition methods cannot combine the transmission of image data with the interaction of image features, so the steps of image recognition are too independent, and the traditional methods take longer time and cannot complete the image denoising. Therefore, a recognition method of sports training action image based on software defined network (SDN) architecture is proposed. The SDN architecture is used to integrate the image data transmission and interactive process and to optimize the image processing centralization. The network architecture is composed of application layer, control layer, and infrastructure layer. Based on this, the dimension of image sample set is reduced, and the edge detection operator in any direction is constructed. The image edge filter is realized by calculating the response and threshold of image edge by using lag threshold and nonmaximum suppression (NMS). The Hough transform algorithm is improved to optimize the detection range. Extracting the neighborhood feature of sports training action, the recognition of sports training action image based on SDN architecture is completed. Simulation results show that the proposed method takes less time and the image denoising effect is better. In addition, the F1 test results of the proposed method are higher than those of the literature, and the convergence is better. Therefore, the performance of the proposed method is better.


---

## Body

## 1. Introduction

A large number of sports videos are collected in the process of sports training and teaching. Accurate recognition of sports action in the video can prevent accidental injury and protect athletes’ health. In the sports movement recognition aspect, the computer image processing technology has obtained the widespread application. But at present, there are all kinds of complex movements in sports training. It is difficult to judge the wrong movements simply by traditional contour detection methods, which results in that athletes cannot get correct movements in time [1]. In [2], relevant scholars summarized the research progress and significance of motion recognition and summarized it into two processes: motion capture and motion classification based on deep learning. First, three mainstream motion capture methods based on video, depth camera, and inertial sensor are introduced in detail, and the commonly used motion datasets are listed. Second, motion recognition based on depth learning is described from two aspects: automatic feature extraction and multimodal feature fusion. Reference [3] proposes an automatic tracking method based on image recognition to recognize human actions under high-intensity motion. First, the double convolution theory is used to segment the image of human action under high intensity, and the feature of human action is extracted. Then, combined with the Gaussian distribution model, the obtained human motion image target and background and foreground information are processed to obtain the Gaussian distribution model of human motion image background, and the tracking trajectory of human motion image is obtained by Kalman filter. Finally, the Bayesian classification theory is applied to construct the target model for the gray information of human motion image, solve the optimal peak point of human motion image, and realize the segmentation and tracking of multiple targets. Reference [4] extracts pose features from local areas of the image and depth features from the overall image to explore their complementary role in motion recognition. First, a pose representation method is introduced. The pose of each limb component is represented by a set of poselet detection scores describing the pose of the component. In order to suppress detection errors, a component-based model is designed as the basis of detection. In order to train CNN network from a limited number of datasets, the methods of pretraining and fine adjustment are used.However, the previously mentioned methods cannot combine the transmission of image data with the interaction of features, which leads to the independence of the steps of image recognition, which takes longer time and has higher noise. Therefore, a recognition method of sports training action image based on SDN architecture is proposed. In Section2 of this paper, we propose the method for recognition of sports training action image on the basis of SDN architecture. In Section 3, the simulation test design is proposed, and the results of the tests are analyzed for the validation of proposed techniques. At the end, the paper is concluded in Section 4.


## 2. Sports Training Action Image Recognition Method Based on SDN Architecture

This section proposed the method for recognition of sports training action image on the basis of SDN architecture. In the process, we first define the SDN network. Then, the reduction of image dimensions is talked about. Through adaptive threshold, the edges of images are filtered. Moreover, the Hough transformation algorithm is improved. Lastly, the sports training action’s neighborhood feature is extracted.


### 2.1. SDN Network

SDN is a software-defined network, and it is an architecture that simplifies and optimizes the traditional network. SDN combines data transfer or interaction between devices and application services to control centralized networks, primarily applications that interact between devices and the data information they transmit [5, 6]. The SDN network architecture is shown in Figure 1.Figure 1
Existing network architecture and SDN network architecture.As shown in Figure1, the existing network architecture is rooted in traditional network devices. Traditional networks control each device individually in the form of distributed control and tightly couple the forwarding layer and the control layer. Because the manager cannot control and forward the data center directly, the network protocol needs to be configured, which has an impact on the forwarding behavior through the network protocol. This impact is fixed mode, so it is relatively closed and uncontrollable compared with the traditional network equipment and the traditional network architecture. In other words, it is difficult to manage and control the existing network.The traditional network architecture of SDN is composed of application layer, control layer, and infrastructure layer. It uses the east-west interface to communicate to keep the consistency of flow table between controllers.


### 2.2. Image Dimensionality Reduction

SetQ=q1,q2,…,qn to represent the sample set to be processed and reduce the dimension of the sample set. Specific sports training images are easily affected by equipment parameters, illumination, time, and other factors in the process of collection, and there are more useless data and information in the sports training images, which leads to a longer time for recognizing local changeable features of the images. The method of recognizing local changeable features of specific sports training images removes the useless data and information in the images through dimensionality reduction [7]. First, the global discrete matrix can be reduced by solving the problem of global discrete matrix. The global optimal discrete matrix J is obtained by using PCA algorithm.(1)J=YJin+Jout,where Y represents the weighting factor; Jout represents interclass discrete matrix; and Jin represents in class discrete matrix.The intraclass discrete matrix is weighted by the following formula to update the global discrete matrix. The result is(2)J′=Jin+Joutδ⋅Y.In the expression,δ is the global discrete coefficient.In order to realize the conversion between linear discriminant analysis (LDA) reduction and principal component analysis (PCA) reduction in space, the following formula is used to calculate the second update resultJ″ of the in-class discrete matrix:(3)J″=∑i=1n∑j=1nqji−giqji−giQ.In the formula,Q represents the total number of samples corresponding to clustering number i, gi represents the cluster center corresponding to clustering number i, and qji represents the number j samples in clustering number i.The principle of PCA is to realize the projection of correlated variables in the principal component space, and the projectionQ′ of Q is obtained by PCA mapping in the PCA subspace to complete the dimensionality reduction of specific sports training images [8].


### 2.3. Image Edge Filtering Based on Adaptive Threshold

Sports training image edge filtering is an image edge detection operator in any direction, which uses lag threshold and NMS to realize image edge filtering [9, 10]. It mainly has two parts: calculating image edge response and selecting threshold.


#### 2.3.1. Select Adaptive Threshold

After the edge response intensity of the sports training image is calculated by the edge detection operator, it is necessary to locate the edge of the sports training image. When locating the image edge, the lag threshold method can connect the image edges according to the spatial information of the gradient image. In the lag threshold method, it is necessary to set the high threshold and low threshold. The larger the threshold, the stronger the anti-interference ability of image edge detection, but the edge of the image is easy to be lost. When selecting the size of the filter, when the size of the filter is smaller, the small edge of the image can be detected, but the phenomenon of poor anti-interference ability will appear.Through the previously mentioned analysis, it can be seen that when using a small-size filter to detect the edge of sports training image, a large threshold should be selected to locate the image edge shape, which can improve the anti-interference ability of image edge filtering. When a larger size filter is selected, a small threshold should be selected to locate the image edge shape to avoid the loss of image edge, and the lag threshold method should be used to determine [11].Set the high threshold and low threshold asTmax and Tmin, respectively, and the size of the image edge detection filter is R. The size of this value determines the value of the threshold, and then(4)T′=maxT1,T2,...,Tn,R=Rmax,minT1,T2,...,Tn,R=Rmin,where T′ represents the candidate threshold, 1≤i≤n, when R=Rmax, and T selects the maximum candidate threshold. In order to make the image edge filtering have better real-time performance, two threshold selection methods are used to determine the candidate threshold, namely, the image gradient histogram and the image edge threshold determination method of Canny operator [12].Among the existing image edge threshold calculation methods, the more common method is to determine the image edge response threshold according to the image gradient probability. Let the gradient of sports training imageI be normalized so that the number of pixels is N, the gray range of the image is 1,L′, the gray level is 1≤j′≤L′, the number of pixels is n′, and the probability is(5)pj=n′N.Then,(6)∑j=1npj=1.The gradient histogramhI of the sports training image can be obtained through pj, in which the kurtosis χ and skewness Χ relative to the gray level are, respectively,(7)χ=I4I22,Χ=I3I22,where In represents the n-order center distance relative to the first j gray levels of hI.The gradient of sports training image can be expressed as(8)Κ=∑nΧθi′2,where n represents the number of image edge angles θi′. According to relevant regulations, the angles are 0∘, 45∘, 90∘, and 135∘. When using formula (8) to calculate the image edge response, it is necessary to determine the value of φ in Gx′ and Gy′. There is a close correlation between Gaussian distribution and Gaussian function. For Gaussian distribution, the probability distribution outside −6φ,6φ range is less than 0.05. Let the size of filter template window be R×R, R≥3 be odd, R=6φ+1, and filter size R be important parameters. The shape of functions Gx′ and Gy′ is determined by this parameter.In order to determine the edge threshold of the image through ROI, Otsu is used to calculate the interclass variance of the gray value of the sports training image in ROI, and the image gray value with the maximum variance is selected as the image edge threshold. Set the ROI relative histogram gray value betweenL1′,L2′, and calculate the interclass variance of each gray level L1′≤T≤L2′ of the image. The calculation formula is as follows:(9)σ=R0R1μ−μ′2,of which(10)R0=∑j=1npj,R1=1−R0,μ=φR0∑j=1npj,μ′=φR1∑j=1npj.WhenL1′≤T≤L2′, the maximum image gray level of φ is the image edge candidate threshold. Generally, the image edge threshold of Canny operator is determined according to the total number of nonedge points in the sports training image pixels. Set the total number of pixels as N and the proportion of nonedge points as r. When the number of image points is accumulated to N×r, the gradient value of the image is the image edge candidate threshold. When there is noise in the sports training image, the selection of lag threshold and filter size directly affects the image edge filtering effect. The large-size filter can reduce the noise and improve the image edge filtering effect by changing the filter size.Suppose that the proportion of nonedge pixels relative toΒmin and Βmax in the image is rmin and rmax, so that(11)Δr=rmax−rmin.Assuming that the filter size is within the range ofRmax,Rmin, when the initial value is Rinit, the value of R is determined according to Δr iteration. After the calculation of image edge response and adaptive selection of threshold, the morphological composite filtering of sports training image edge is finally realized. The expression is as follows:(12)Q=Δr+R⋅Βmin−Βmin⋅p.


#### 2.3.2. Edge Shape Response Calculation

In the process of image processing, Gaussian function has good filtering performance and is widely used in image filtering and image restoration. Generally, Gaussian operatorGx′,y′,l has the following expression:(13)Gx′,y′,σ′=expx′2+y′2l.The differential operator along the two axes can be obtained by differentiating the Gaussian operator along thex′ and y′ axes. The expressions are as follows:(14)Gx′=l⋅expx′2l,(15)Gy′=l⋅expy′2l.Based on formulas (14) and (15), the edge morphology detection operator of sports training image is established:(16)Gθ′x′,y′=Gx′cosϕ+Gy′sinϕ,where ϕ represents the image edge angle, and Gx′ and Gy′ represent the linear operator. Convolute the input sports training image with formula (13) to obtain the edge response of the sports training image in the image edge angle direction, and the expression is:(17)Gx′,y′⊗Ix′,y′=Rx′′cosϕ+Ry′′sinϕ,where ⊗ is the convolution calculation, and there are Rx′′=Gx′⊗Ix′,y′ and Ry′′=Gy′⊗Ix′,y′. After solving the edge response of sports training images in different directions, the total image edge response can be obtained.


### 2.4. Improved Hough Transform Algorithm

If there is a straight line with interceptϖ and slope σ in the plane coordinate system, the straight line equation is as follows:(18)Y=σX+ϖ.The following functional formula with intercept and slope as parameters is derived from the previously mentioned formula:(19)ϖ=Y−σX.According to the formula, based on the plane coordinate system, the formula describesY straight line with intercept a and negative slope X.Based on the previously mentioned two straight line equations, two key points are obtained: a pointX1,Y1 in the plane corresponds to a straight line ϖ=Y1−σX1 in the plane. The point cluster contained in the line y=μ1x+ξ1 in the plane corresponds to the line cluster in the plane. The line cluster is composed of lines composed of each slope and each intercept. All lines have a common intersection point σ1,ϖ1.Therefore, the polar coordinate equation is used to define the straight line in the plane; that is, the vertical distanceD between the straight line and the origin and the included angle α between the normal line and the horizontal axis are used to determine any image point X,Y in the image space. The expression is as follows, in which the direction of the straight line is determined by the included angle α:(20)D=Xcosα+Ysinα.By using the linear equation and the expression of the perpendicular distance from the origin, the pointXi,Yi in the image space is mapped to the accumulator HTσi,ϖi in the Hough space, and all points in the image space where the two formulas are true are numerically added to the corresponding accumulator to realize the calculation of the Hough transform algorithm [13, 14]. If there is a line in the image, then the accumulator has a local maximum. Compared with the preset threshold, the existence of the line is determined. When the threshold is greater than the local maximum, the straight line does not exist; otherwise, the straight line exists. Linear parameters can be obtained according to the peak value of parameter space.Since the parameter space in the current Hough transform algorithm mostly adoptsD and α parameters, which limits the detection range of the image to a certain extent, it is optimized. The specific process is described as follows.Step 1. Preset global threshold τ and tolerance z.Step 2. Selection of no. 1 seed point seed1: if the size of a binary image is m∗n and the number of feature points is K, these feature points can be used to form no. 1 seed point set seed1′=xi,yi|i=1,2,…,K. In the no. 1 seed point set seed1′, select the feature points in order as the no. 1 seed point seed1. If the current seed point has been processed, remove the feature point, and the no. 1 seed point is represented by the next feature point until the untreated seed point is obtained. Based on the no. 1 seed point, a set seed2′=xi,yi|i=1,2,…,M storing the no. 2 seed point is constructed. In the initial stage of the set, the feature point contains a no. 1 seed point seed1 less than seed1′.Step 3. Selection and solution of seed point seed2 no. 2: in the same way, seed point seed2=x2,y2 no. 2 is obtained from seed point seed2′, and it is paired with seed point seed1=x1,y1 no. 1 to obtain a straight line in Figure 1. The length of the straight line to the origin is ρ, and the angle between the vertical line and the transverse axis is β. The calculation formula is shown as follows:(21)β=tan−1X2−X1Y2−Y1,ρ=Y2−Y1X2−X1−sinβ.Determination of straight line by feature point pair is shown in Figure2.Step 4. Accumulative Hough space: suppose S is zero initial accumulator which can get a straight line as shown in formula (3) according to the angle values between each characteristic point X,Y and the obtained image, as shown in Figure 2. If there is a difference between the origin and the length of the line q and ρ, and the range of variation of the difference is less than tolerance z, then the selected feature point is located on the line which is defined by the seed point pairs. Add 1 to the accumulator S, and then remove the feature point:(22)ρ−q≤z.Feature points and included angle determination line are shown in Figure3.Step 5. For the iteration operation step 4 of the next feature point, the iteration shall be terminated upon the completion of all the feature points.Step 6. Retention of results: if the global threshold is greater than the value of the accumulator, then the straight line does not exist, jumping to step 8; otherwise, the straight line exists, and the detected linear parameters and D are calculated using formulas (4) and (5);Step 7. Removal of feature points contained in a line: the detected feature points contained in a line are removed from the no.1 seed point set to reduce the calculation complexity.Step 8. Seed point update no. 1 and no. 2: remove the selected seed points from the set of seed points, select the next feature point as the seed point, and perform the next iteration until the termination conditions are met.Figure 2
Determination of straight line by feature point pair.Figure 3
Feature points and included angle determination line.


### 2.5. Neighborhood Feature Extraction of Sports Training Action

Because of the difference of data acquisition equipment, the collected data may be in different coordinate system. Therefore, the following Frankfurt coordinate system is used to measure the human body contour coordinate unity. After unifying the coordinate, normalization of the scale is needed. Setting the distance between human contour curves to 1 requires scaling the 3D contour lines. When the mannequin is filled and normalized, the maximum curvature of the surface of the human body needs to be set as the center of the sphere to draw a sphere for the radius, and the region contained in the sphere is the effective region [15].Because there are obvious differences between the restored 3D facial model and the real human model, this paper mainly uses morphological feature points to judge. Among them, the following two factors shall be considered in the selection of feature points.(1)
The feature points are obvious and easily demarcated.(2)
It is relatively stable and does not change greatly with the expression or weight.First, the nasal tip coordinates are obtained, the intervals between different coordinate points are analyzed, and the body profile is set perpendicular to the body and face. At the same time, in practical application, it is necessary to judge whether the vertex is in the set cutting plane. If it is, then the distance between the vertex and the plane is 0; otherwise, it is necessary to extract the section of the adjacent point as the vertex, and judge the distance between the vertex and the cutting plane with the help of the set threshold.In the process of 3D model processing, all the neighborhood of feature points in the 3D model are set as discrete scale parameters by multiscale method, and the number of neighborhood is calculated to ensure the descriptive feature of the algorithm is effectively improved. In addition, the size of the neighborhood scale will also have a significant impact on the effectiveness of the whole algorithm. Among them, the size of neighborhood needs to be completed through the relevant prior knowledge and human–computer interaction [16].Adaptive neighborhood needs to analyze the intrinsic characteristics of the image first, and then obtain the dynamic changes of different neighborhood points. Because of different composing feature structure, the neighborhood points of the image are different, but they all have multiscale. In the process of practical application, it is not necessary to consider the number of neighborhood points [17]. Among them, the first order neighborhood corresponding to feature point Pi is selected to participate in the calculation of the feature point, and the formula for calculating the difference in average curvature N between feature point qj and feature point Pi is shown as follows:(23)N=k1qj+k2qj−k1Pi+k2Pi2.In the previously mentioned formula,k1 and k2 represent the maximum curvature and the minimum curvature, respectively.The covariance descriptor is constructed by the corresponding feature points of the sports training image, and the 3D human model is transformed into covariance descriptor sequence. Among them, the similarity problem of 3D human model can also be transformed into the similarity problem of different descriptor sequences. In the practical application,RM is used to represent the restored human model, M is used to represent the real human model, and the similarity between the restored human model and the real human model is used to describe the similarity between different descriptors. The following measures are mainly based on logarithmic Euclidean Riemann, and then, the neighborhood features are established. The specific calculation formula is as follows:(24)ΘRM,M=∑i=1nInRMPi+InMPi.In the previously mentioned formula,RMPi represents the feature descriptor of the restored manikin feature point Pi; MPi represents the feature descriptor of the feature point Pi corresponding to the real manikin; δ represents the logarithm of the matrix.The expression formula of geometric feature variance descriptor of feature pointPi is(25)S=∑i=1NFPi−∂−FPi+∂−.In the previously mentioned formula,∂− represents the average value of geometric feature vector corresponding to feature points of 3D manikin; N represents the number of nodes participating in neighborhood calculation; S stands for symmetric matrix.


## 2.1. SDN Network

SDN is a software-defined network, and it is an architecture that simplifies and optimizes the traditional network. SDN combines data transfer or interaction between devices and application services to control centralized networks, primarily applications that interact between devices and the data information they transmit [5, 6]. The SDN network architecture is shown in Figure 1.Figure 1
Existing network architecture and SDN network architecture.As shown in Figure1, the existing network architecture is rooted in traditional network devices. Traditional networks control each device individually in the form of distributed control and tightly couple the forwarding layer and the control layer. Because the manager cannot control and forward the data center directly, the network protocol needs to be configured, which has an impact on the forwarding behavior through the network protocol. This impact is fixed mode, so it is relatively closed and uncontrollable compared with the traditional network equipment and the traditional network architecture. In other words, it is difficult to manage and control the existing network.The traditional network architecture of SDN is composed of application layer, control layer, and infrastructure layer. It uses the east-west interface to communicate to keep the consistency of flow table between controllers.


## 2.2. Image Dimensionality Reduction

SetQ=q1,q2,…,qn to represent the sample set to be processed and reduce the dimension of the sample set. Specific sports training images are easily affected by equipment parameters, illumination, time, and other factors in the process of collection, and there are more useless data and information in the sports training images, which leads to a longer time for recognizing local changeable features of the images. The method of recognizing local changeable features of specific sports training images removes the useless data and information in the images through dimensionality reduction [7]. First, the global discrete matrix can be reduced by solving the problem of global discrete matrix. The global optimal discrete matrix J is obtained by using PCA algorithm.(1)J=YJin+Jout,where Y represents the weighting factor; Jout represents interclass discrete matrix; and Jin represents in class discrete matrix.The intraclass discrete matrix is weighted by the following formula to update the global discrete matrix. The result is(2)J′=Jin+Joutδ⋅Y.In the expression,δ is the global discrete coefficient.In order to realize the conversion between linear discriminant analysis (LDA) reduction and principal component analysis (PCA) reduction in space, the following formula is used to calculate the second update resultJ″ of the in-class discrete matrix:(3)J″=∑i=1n∑j=1nqji−giqji−giQ.In the formula,Q represents the total number of samples corresponding to clustering number i, gi represents the cluster center corresponding to clustering number i, and qji represents the number j samples in clustering number i.The principle of PCA is to realize the projection of correlated variables in the principal component space, and the projectionQ′ of Q is obtained by PCA mapping in the PCA subspace to complete the dimensionality reduction of specific sports training images [8].


## 2.3. Image Edge Filtering Based on Adaptive Threshold

Sports training image edge filtering is an image edge detection operator in any direction, which uses lag threshold and NMS to realize image edge filtering [9, 10]. It mainly has two parts: calculating image edge response and selecting threshold.


### 2.3.1. Select Adaptive Threshold

After the edge response intensity of the sports training image is calculated by the edge detection operator, it is necessary to locate the edge of the sports training image. When locating the image edge, the lag threshold method can connect the image edges according to the spatial information of the gradient image. In the lag threshold method, it is necessary to set the high threshold and low threshold. The larger the threshold, the stronger the anti-interference ability of image edge detection, but the edge of the image is easy to be lost. When selecting the size of the filter, when the size of the filter is smaller, the small edge of the image can be detected, but the phenomenon of poor anti-interference ability will appear.Through the previously mentioned analysis, it can be seen that when using a small-size filter to detect the edge of sports training image, a large threshold should be selected to locate the image edge shape, which can improve the anti-interference ability of image edge filtering. When a larger size filter is selected, a small threshold should be selected to locate the image edge shape to avoid the loss of image edge, and the lag threshold method should be used to determine [11].Set the high threshold and low threshold asTmax and Tmin, respectively, and the size of the image edge detection filter is R. The size of this value determines the value of the threshold, and then(4)T′=maxT1,T2,...,Tn,R=Rmax,minT1,T2,...,Tn,R=Rmin,where T′ represents the candidate threshold, 1≤i≤n, when R=Rmax, and T selects the maximum candidate threshold. In order to make the image edge filtering have better real-time performance, two threshold selection methods are used to determine the candidate threshold, namely, the image gradient histogram and the image edge threshold determination method of Canny operator [12].Among the existing image edge threshold calculation methods, the more common method is to determine the image edge response threshold according to the image gradient probability. Let the gradient of sports training imageI be normalized so that the number of pixels is N, the gray range of the image is 1,L′, the gray level is 1≤j′≤L′, the number of pixels is n′, and the probability is(5)pj=n′N.Then,(6)∑j=1npj=1.The gradient histogramhI of the sports training image can be obtained through pj, in which the kurtosis χ and skewness Χ relative to the gray level are, respectively,(7)χ=I4I22,Χ=I3I22,where In represents the n-order center distance relative to the first j gray levels of hI.The gradient of sports training image can be expressed as(8)Κ=∑nΧθi′2,where n represents the number of image edge angles θi′. According to relevant regulations, the angles are 0∘, 45∘, 90∘, and 135∘. When using formula (8) to calculate the image edge response, it is necessary to determine the value of φ in Gx′ and Gy′. There is a close correlation between Gaussian distribution and Gaussian function. For Gaussian distribution, the probability distribution outside −6φ,6φ range is less than 0.05. Let the size of filter template window be R×R, R≥3 be odd, R=6φ+1, and filter size R be important parameters. The shape of functions Gx′ and Gy′ is determined by this parameter.In order to determine the edge threshold of the image through ROI, Otsu is used to calculate the interclass variance of the gray value of the sports training image in ROI, and the image gray value with the maximum variance is selected as the image edge threshold. Set the ROI relative histogram gray value betweenL1′,L2′, and calculate the interclass variance of each gray level L1′≤T≤L2′ of the image. The calculation formula is as follows:(9)σ=R0R1μ−μ′2,of which(10)R0=∑j=1npj,R1=1−R0,μ=φR0∑j=1npj,μ′=φR1∑j=1npj.WhenL1′≤T≤L2′, the maximum image gray level of φ is the image edge candidate threshold. Generally, the image edge threshold of Canny operator is determined according to the total number of nonedge points in the sports training image pixels. Set the total number of pixels as N and the proportion of nonedge points as r. When the number of image points is accumulated to N×r, the gradient value of the image is the image edge candidate threshold. When there is noise in the sports training image, the selection of lag threshold and filter size directly affects the image edge filtering effect. The large-size filter can reduce the noise and improve the image edge filtering effect by changing the filter size.Suppose that the proportion of nonedge pixels relative toΒmin and Βmax in the image is rmin and rmax, so that(11)Δr=rmax−rmin.Assuming that the filter size is within the range ofRmax,Rmin, when the initial value is Rinit, the value of R is determined according to Δr iteration. After the calculation of image edge response and adaptive selection of threshold, the morphological composite filtering of sports training image edge is finally realized. The expression is as follows:(12)Q=Δr+R⋅Βmin−Βmin⋅p.


### 2.3.2. Edge Shape Response Calculation

In the process of image processing, Gaussian function has good filtering performance and is widely used in image filtering and image restoration. Generally, Gaussian operatorGx′,y′,l has the following expression:(13)Gx′,y′,σ′=expx′2+y′2l.The differential operator along the two axes can be obtained by differentiating the Gaussian operator along thex′ and y′ axes. The expressions are as follows:(14)Gx′=l⋅expx′2l,(15)Gy′=l⋅expy′2l.Based on formulas (14) and (15), the edge morphology detection operator of sports training image is established:(16)Gθ′x′,y′=Gx′cosϕ+Gy′sinϕ,where ϕ represents the image edge angle, and Gx′ and Gy′ represent the linear operator. Convolute the input sports training image with formula (13) to obtain the edge response of the sports training image in the image edge angle direction, and the expression is:(17)Gx′,y′⊗Ix′,y′=Rx′′cosϕ+Ry′′sinϕ,where ⊗ is the convolution calculation, and there are Rx′′=Gx′⊗Ix′,y′ and Ry′′=Gy′⊗Ix′,y′. After solving the edge response of sports training images in different directions, the total image edge response can be obtained.


## 2.3.1. Select Adaptive Threshold

After the edge response intensity of the sports training image is calculated by the edge detection operator, it is necessary to locate the edge of the sports training image. When locating the image edge, the lag threshold method can connect the image edges according to the spatial information of the gradient image. In the lag threshold method, it is necessary to set the high threshold and low threshold. The larger the threshold, the stronger the anti-interference ability of image edge detection, but the edge of the image is easy to be lost. When selecting the size of the filter, when the size of the filter is smaller, the small edge of the image can be detected, but the phenomenon of poor anti-interference ability will appear.Through the previously mentioned analysis, it can be seen that when using a small-size filter to detect the edge of sports training image, a large threshold should be selected to locate the image edge shape, which can improve the anti-interference ability of image edge filtering. When a larger size filter is selected, a small threshold should be selected to locate the image edge shape to avoid the loss of image edge, and the lag threshold method should be used to determine [11].Set the high threshold and low threshold asTmax and Tmin, respectively, and the size of the image edge detection filter is R. The size of this value determines the value of the threshold, and then(4)T′=maxT1,T2,...,Tn,R=Rmax,minT1,T2,...,Tn,R=Rmin,where T′ represents the candidate threshold, 1≤i≤n, when R=Rmax, and T selects the maximum candidate threshold. In order to make the image edge filtering have better real-time performance, two threshold selection methods are used to determine the candidate threshold, namely, the image gradient histogram and the image edge threshold determination method of Canny operator [12].Among the existing image edge threshold calculation methods, the more common method is to determine the image edge response threshold according to the image gradient probability. Let the gradient of sports training imageI be normalized so that the number of pixels is N, the gray range of the image is 1,L′, the gray level is 1≤j′≤L′, the number of pixels is n′, and the probability is(5)pj=n′N.Then,(6)∑j=1npj=1.The gradient histogramhI of the sports training image can be obtained through pj, in which the kurtosis χ and skewness Χ relative to the gray level are, respectively,(7)χ=I4I22,Χ=I3I22,where In represents the n-order center distance relative to the first j gray levels of hI.The gradient of sports training image can be expressed as(8)Κ=∑nΧθi′2,where n represents the number of image edge angles θi′. According to relevant regulations, the angles are 0∘, 45∘, 90∘, and 135∘. When using formula (8) to calculate the image edge response, it is necessary to determine the value of φ in Gx′ and Gy′. There is a close correlation between Gaussian distribution and Gaussian function. For Gaussian distribution, the probability distribution outside −6φ,6φ range is less than 0.05. Let the size of filter template window be R×R, R≥3 be odd, R=6φ+1, and filter size R be important parameters. The shape of functions Gx′ and Gy′ is determined by this parameter.In order to determine the edge threshold of the image through ROI, Otsu is used to calculate the interclass variance of the gray value of the sports training image in ROI, and the image gray value with the maximum variance is selected as the image edge threshold. Set the ROI relative histogram gray value betweenL1′,L2′, and calculate the interclass variance of each gray level L1′≤T≤L2′ of the image. The calculation formula is as follows:(9)σ=R0R1μ−μ′2,of which(10)R0=∑j=1npj,R1=1−R0,μ=φR0∑j=1npj,μ′=φR1∑j=1npj.WhenL1′≤T≤L2′, the maximum image gray level of φ is the image edge candidate threshold. Generally, the image edge threshold of Canny operator is determined according to the total number of nonedge points in the sports training image pixels. Set the total number of pixels as N and the proportion of nonedge points as r. When the number of image points is accumulated to N×r, the gradient value of the image is the image edge candidate threshold. When there is noise in the sports training image, the selection of lag threshold and filter size directly affects the image edge filtering effect. The large-size filter can reduce the noise and improve the image edge filtering effect by changing the filter size.Suppose that the proportion of nonedge pixels relative toΒmin and Βmax in the image is rmin and rmax, so that(11)Δr=rmax−rmin.Assuming that the filter size is within the range ofRmax,Rmin, when the initial value is Rinit, the value of R is determined according to Δr iteration. After the calculation of image edge response and adaptive selection of threshold, the morphological composite filtering of sports training image edge is finally realized. The expression is as follows:(12)Q=Δr+R⋅Βmin−Βmin⋅p.


## 2.3.2. Edge Shape Response Calculation

In the process of image processing, Gaussian function has good filtering performance and is widely used in image filtering and image restoration. Generally, Gaussian operatorGx′,y′,l has the following expression:(13)Gx′,y′,σ′=expx′2+y′2l.The differential operator along the two axes can be obtained by differentiating the Gaussian operator along thex′ and y′ axes. The expressions are as follows:(14)Gx′=l⋅expx′2l,(15)Gy′=l⋅expy′2l.Based on formulas (14) and (15), the edge morphology detection operator of sports training image is established:(16)Gθ′x′,y′=Gx′cosϕ+Gy′sinϕ,where ϕ represents the image edge angle, and Gx′ and Gy′ represent the linear operator. Convolute the input sports training image with formula (13) to obtain the edge response of the sports training image in the image edge angle direction, and the expression is:(17)Gx′,y′⊗Ix′,y′=Rx′′cosϕ+Ry′′sinϕ,where ⊗ is the convolution calculation, and there are Rx′′=Gx′⊗Ix′,y′ and Ry′′=Gy′⊗Ix′,y′. After solving the edge response of sports training images in different directions, the total image edge response can be obtained.


## 2.4. Improved Hough Transform Algorithm

If there is a straight line with interceptϖ and slope σ in the plane coordinate system, the straight line equation is as follows:(18)Y=σX+ϖ.The following functional formula with intercept and slope as parameters is derived from the previously mentioned formula:(19)ϖ=Y−σX.According to the formula, based on the plane coordinate system, the formula describesY straight line with intercept a and negative slope X.Based on the previously mentioned two straight line equations, two key points are obtained: a pointX1,Y1 in the plane corresponds to a straight line ϖ=Y1−σX1 in the plane. The point cluster contained in the line y=μ1x+ξ1 in the plane corresponds to the line cluster in the plane. The line cluster is composed of lines composed of each slope and each intercept. All lines have a common intersection point σ1,ϖ1.Therefore, the polar coordinate equation is used to define the straight line in the plane; that is, the vertical distanceD between the straight line and the origin and the included angle α between the normal line and the horizontal axis are used to determine any image point X,Y in the image space. The expression is as follows, in which the direction of the straight line is determined by the included angle α:(20)D=Xcosα+Ysinα.By using the linear equation and the expression of the perpendicular distance from the origin, the pointXi,Yi in the image space is mapped to the accumulator HTσi,ϖi in the Hough space, and all points in the image space where the two formulas are true are numerically added to the corresponding accumulator to realize the calculation of the Hough transform algorithm [13, 14]. If there is a line in the image, then the accumulator has a local maximum. Compared with the preset threshold, the existence of the line is determined. When the threshold is greater than the local maximum, the straight line does not exist; otherwise, the straight line exists. Linear parameters can be obtained according to the peak value of parameter space.Since the parameter space in the current Hough transform algorithm mostly adoptsD and α parameters, which limits the detection range of the image to a certain extent, it is optimized. The specific process is described as follows.Step 1. Preset global threshold τ and tolerance z.Step 2. Selection of no. 1 seed point seed1: if the size of a binary image is m∗n and the number of feature points is K, these feature points can be used to form no. 1 seed point set seed1′=xi,yi|i=1,2,…,K. In the no. 1 seed point set seed1′, select the feature points in order as the no. 1 seed point seed1. If the current seed point has been processed, remove the feature point, and the no. 1 seed point is represented by the next feature point until the untreated seed point is obtained. Based on the no. 1 seed point, a set seed2′=xi,yi|i=1,2,…,M storing the no. 2 seed point is constructed. In the initial stage of the set, the feature point contains a no. 1 seed point seed1 less than seed1′.Step 3. Selection and solution of seed point seed2 no. 2: in the same way, seed point seed2=x2,y2 no. 2 is obtained from seed point seed2′, and it is paired with seed point seed1=x1,y1 no. 1 to obtain a straight line in Figure 1. The length of the straight line to the origin is ρ, and the angle between the vertical line and the transverse axis is β. The calculation formula is shown as follows:(21)β=tan−1X2−X1Y2−Y1,ρ=Y2−Y1X2−X1−sinβ.Determination of straight line by feature point pair is shown in Figure2.Step 4. Accumulative Hough space: suppose S is zero initial accumulator which can get a straight line as shown in formula (3) according to the angle values between each characteristic point X,Y and the obtained image, as shown in Figure 2. If there is a difference between the origin and the length of the line q and ρ, and the range of variation of the difference is less than tolerance z, then the selected feature point is located on the line which is defined by the seed point pairs. Add 1 to the accumulator S, and then remove the feature point:(22)ρ−q≤z.Feature points and included angle determination line are shown in Figure3.Step 5. For the iteration operation step 4 of the next feature point, the iteration shall be terminated upon the completion of all the feature points.Step 6. Retention of results: if the global threshold is greater than the value of the accumulator, then the straight line does not exist, jumping to step 8; otherwise, the straight line exists, and the detected linear parameters and D are calculated using formulas (4) and (5);Step 7. Removal of feature points contained in a line: the detected feature points contained in a line are removed from the no.1 seed point set to reduce the calculation complexity.Step 8. Seed point update no. 1 and no. 2: remove the selected seed points from the set of seed points, select the next feature point as the seed point, and perform the next iteration until the termination conditions are met.Figure 2
Determination of straight line by feature point pair.Figure 3
Feature points and included angle determination line.


## 2.5. Neighborhood Feature Extraction of Sports Training Action

Because of the difference of data acquisition equipment, the collected data may be in different coordinate system. Therefore, the following Frankfurt coordinate system is used to measure the human body contour coordinate unity. After unifying the coordinate, normalization of the scale is needed. Setting the distance between human contour curves to 1 requires scaling the 3D contour lines. When the mannequin is filled and normalized, the maximum curvature of the surface of the human body needs to be set as the center of the sphere to draw a sphere for the radius, and the region contained in the sphere is the effective region [15].Because there are obvious differences between the restored 3D facial model and the real human model, this paper mainly uses morphological feature points to judge. Among them, the following two factors shall be considered in the selection of feature points.(1)
The feature points are obvious and easily demarcated.(2)
It is relatively stable and does not change greatly with the expression or weight.First, the nasal tip coordinates are obtained, the intervals between different coordinate points are analyzed, and the body profile is set perpendicular to the body and face. At the same time, in practical application, it is necessary to judge whether the vertex is in the set cutting plane. If it is, then the distance between the vertex and the plane is 0; otherwise, it is necessary to extract the section of the adjacent point as the vertex, and judge the distance between the vertex and the cutting plane with the help of the set threshold.In the process of 3D model processing, all the neighborhood of feature points in the 3D model are set as discrete scale parameters by multiscale method, and the number of neighborhood is calculated to ensure the descriptive feature of the algorithm is effectively improved. In addition, the size of the neighborhood scale will also have a significant impact on the effectiveness of the whole algorithm. Among them, the size of neighborhood needs to be completed through the relevant prior knowledge and human–computer interaction [16].Adaptive neighborhood needs to analyze the intrinsic characteristics of the image first, and then obtain the dynamic changes of different neighborhood points. Because of different composing feature structure, the neighborhood points of the image are different, but they all have multiscale. In the process of practical application, it is not necessary to consider the number of neighborhood points [17]. Among them, the first order neighborhood corresponding to feature point Pi is selected to participate in the calculation of the feature point, and the formula for calculating the difference in average curvature N between feature point qj and feature point Pi is shown as follows:(23)N=k1qj+k2qj−k1Pi+k2Pi2.In the previously mentioned formula,k1 and k2 represent the maximum curvature and the minimum curvature, respectively.The covariance descriptor is constructed by the corresponding feature points of the sports training image, and the 3D human model is transformed into covariance descriptor sequence. Among them, the similarity problem of 3D human model can also be transformed into the similarity problem of different descriptor sequences. In the practical application,RM is used to represent the restored human model, M is used to represent the real human model, and the similarity between the restored human model and the real human model is used to describe the similarity between different descriptors. The following measures are mainly based on logarithmic Euclidean Riemann, and then, the neighborhood features are established. The specific calculation formula is as follows:(24)ΘRM,M=∑i=1nInRMPi+InMPi.In the previously mentioned formula,RMPi represents the feature descriptor of the restored manikin feature point Pi; MPi represents the feature descriptor of the feature point Pi corresponding to the real manikin; δ represents the logarithm of the matrix.The expression formula of geometric feature variance descriptor of feature pointPi is(25)S=∑i=1NFPi−∂−FPi+∂−.In the previously mentioned formula,∂− represents the average value of geometric feature vector corresponding to feature points of 3D manikin; N represents the number of nodes participating in neighborhood calculation; S stands for symmetric matrix.


## 3. Simulation Test Design and Result Analysis

Experiments on sports training images are carried out under the environment of Intel Core 2 Duo cpu2.33ghz/2gb, Windows Vista Business and MATLAB 2020. The multimodal human motion recognition method based on depth camera proposed in [2], image motion recognition method based on pose feature proposed in [4], and the proposed method are tested, respectively. Compare the time taken by the three methods to identify the local changeable features of the image. The test results are shown in Figure 4.Figure 4
Identification time of different methods.By analyzing Figure4, it can be seen that the recognition time of the proposed method is less than that of the multimodal human motion recognition method based on depth camera proposed in [2] and the image motion recognition method based on attitude feature proposed in [4]. Because the local polytropic feature recognition method of a specific sports training image reduces the dimension of the specific sports training image by adjusting the interclass discrete matrix and the intraclass discrete matrix before identifying the local polytropic feature of the image, removes the useless information and data in the specific sports training image, and reduces the amount of data to be calculated for identifying the local polytropic feature of the image, it shortens the time used to identify the local changeable features of specific sports training images.The multimodal human motion recognition method based on depth camera proposed in [2] and the image motion recognition method based on pose feature proposed in [4] do not remove the redundant and useless information in specific sports training images and spend more time calculating a large amount of data. Through the previously mentioned analysis, it can be seen that the local changeable feature recognition method of specific sports training image can realize the recognition of local changeable features in a short time, and it is verified that the recognition efficiency of the local changeable feature recognition method of specific sports training image is high.Based on the previously mentioned experimental results, the multimodal human motion recognition method based on depth camera proposed in [2] and the image motion recognition method based on pose features proposed in [4] are used as the control methods. The denoising effect of the proposed method is compared with that of the proposed method. The test results are shown in Figures 5–8.Figure 5
Experimental sample image. (a) Image sample 1. (b) Image sample 2.
(a)(b)Figure 6
The method proposed in this paper. (a) Image sample 1. (b) Image sample 2.
(a)(b)Figure 7
Multimodal human motion recognition method based on depth camera. (a) Image sample 1. (b) Image sample 2.
(a)(b)Figure 8
Image action recognition method based on attitude features. (a) Image sample 1. (b) Image sample 2.
(a)(b)According to the experimental results in Figures6–8, the proposed method has better denoising effect on the image. Under the comparison of various methods, the multimodal human motion recognition method based on depth camera proposed in [2] and the image motion recognition method based on pose features proposed in [4] still have noise in the processed sports training image, and the incomplete noise removal will directly affect the accuracy of image recognition. Therefore, the experimental results show that the application effect of the proposed method is better for the application of image noise removal and image quality improvement.Taking F1 value as an index to measure the performance of sports training image recognition, if you want to show that the method has strong performance, the higher F1 value should be. A comparative experiment is designed. The multimodal human motion recognition method based on depth camera proposed in [2] and the image motion recognition method based on posture features proposed in [4] are selected as the comparison methods of this method. The F1 value results of sports training image recognition of the three methods under different sample numbers are described in Figure 9.Figure 9
Comparison of F1 value results of sports training image recognition.Analysis of Figure9 shows that the F1 value of the method in this paper is always higher than that of the other two methods, and when the number of samples continues to increase, the F1 value shows an upward trend, and the method performance is gradually improved. The F1 value of the multimodal human motion recognition method based on depth camera proposed in [2] is close to the method in this paper, but when the number of samples increases to 300–500, the F1 value shows a downward trend and the performance stability of the method is poor. The F1 value of the image motion recognition method based on attitude features proposed in [4] is greatly affected by the number of samples, fluctuates violently, and is always at the lowest value. Compared with these data, this method has excellent sports training image recognition performance and good stability.Test the convergence characteristics of sports training image recognition method, and the test results are shown in Figure10.Figure 10
Convergence test results of different methods.According to Figure10, the convergence of the proposed method is better than the depth camera based multimodal human motion recognition method proposed in [2] and the image motion recognition method based on attitude features proposed in [4], and the convergence characteristics of the proposed method are relatively stable. The SDN architecture is used to closely combine the image data transmission and interaction process, and optimizing the centralization of image processing can extract the global features of the image, so the algorithm can still obtain the best convergence characteristics when the image resolution is reduced, so the convergence characteristics of the algorithm are good.


## 4. Conclusion

On the basis of SDN architecture, this paper proposed a sports training image recognition method, which aims to solve the problem of longer recognition time and higher image noise in current image recognition methods. SDN architecture is composed of application, control, and infrastructure layers. This study combined the image data transmission and interactive process through SDN architecture to process images in a centralized way. Further, we optimized the comprehensiveness of image feature extraction and recognition. Based on the dimensionality reduction of image samples, an image edge detection operator with arbitrary direction was constructed to realize image edge filtering. Through optimizing Hough transform algorithm to expand the detection range of image, the recognition of sports training action image based on SDN architecture was realized. Experimental results showed that the proposed method takes less time and the time is always less than 20 m, and the image denoising effect is better and can get better image recognition effect. The F1 results of the proposed method are 0.7∼0.8, which is obviously higher than those of the existing methods. Experimental results show that the proposed method has achieved good simulation test results, which can provide a reliable theoretical basis for this field.



---

*Source: 3668647-2022-01-05.xml*