# Image Recognition Method for Pitching Fingers of Basketball Players Based on Symmetry Algorithm

Authors: Wanquan Chen
Journal: Wireless Communications and Mobile Computing
 (2021)

---

## Abstract

In the basketball game, the accuracy and standardization of pitching are directly related to the score. So it is very important to analyze the pitching figure movement to have a better positioning of the fingers. There are limited techniques to recognize the movement. The human motion recognition method is one of them. It utilizes the spatiotemporal image segmentation and interactive region detection to recognize images of pitching finger movement of basketball players. This method has a limitation that the symmetrical information of the human body and sphere cannot be excavated, which leads to certain errors in recognition effect. This paper presents a method of recognizing pitching finger movement of basketball players based on symmetry algorithm, constructs an acquisition model, carries out edge contour detection and adaptive feature segmentation of images of pitching finger movement of basketball players, and uses a fixed threshold to segment finger image to extract players’ hand contour and locate the middle axis of the finger. On this basis, the symmetry recognition method based on nematode recognition algorithm is used to recognize the symmetry of basketball pitching finger movement image and complete the accurate recognition of basketball pitching finger movement image. The experimental results show that the proposed method can effectively recognize the basketball player’s finger movement image. The average recognition accuracy is 98%, the growth rate of recognition speed is 98%, and the maximum recognition time is 12 s. The robustness of the proposed method is 0.45.


---

## Body

## 1. Introduction

In the basketball game, the accuracy and standardization of pitching are directly related to the score, which is of great significance to the accurate recognition and judgment of the finger-stroke motion image of basketball pitching. When evaluating a baseball game, analysts are also interested in important game events to explore the course of a play. For example, these events can be used in systems such as those developed in [1–3] to visualize the game timeline. A human motion recognition method based on spatiotemporal image segmentation and interactive region detection is proposed [4, 5], which detects human contours in the video stream and segments them into key regions, then expands the segmentation to include nonhuman objects interacting with the human body. The spatiotemporal histogram of gradient direction (HOG) and histogram of optical flow field (HOF) descriptor were used to represent the static and dynamic characteristics of key segments, and codebook is constructed by K-means algorithm. At the same time, local constrained linear coding (LLC) technology is used to optimize codebook. Finally, nonlinear support vector machine (SVM) is used to learn features and recognize actions, because this method cannot mine human beings. The symmetrical information of body and sphere leads to some errors in recognition effect. Another motion recognition method combines multipose estimation features [6] and uses the obtained multimotion models to estimate the posture of any image to obtain multigroup posture feature information of the image; each group of feature information includes key point information and posture scoring, because the method is based on multimotion models to recognize images, the recognition speed is slow, and the efficiency is low. A real-time motion recognition method came up with [7]. Firstly, the depth image is projected in three projection planes; then, the Gabor features are extracted from three projection maps, and finally, these features are utilized to train extreme learning machine (ELM) classifier and complete motion classification, but the recognition accuracy of the proposed method is less than 90% in the experiment. The data is insufficient and the usability needs to be excavated. Sun et al. [8] proposed a face recognition method based on center-symmetric local binary pattern (CS-LBP) and DBN (FRMCD). The results show that the recognition rate of FRMCD is superior to that of traditional methods; the highest recognition rate is up to 98.82%.In view of the above problems, this paper proposes a method of recognizing the finger-stroke action image of basketball pitching based on symmetry algorithm. Firstly, the image acquisition model of finger-stroke action of basketball pitching is constructed. The edge contour detection and adaptive feature segmentation are carried out on the finger-stroke image of basketball pitching, and the hand-shape image of players is extracted. Nematode recognition algorithm identifies image of basketball players’ pitching finger movement [9]. The output is measured in terms of robustness of the method which includes the judgment time and recognition accuracy. The results obtained for the proposed method are also compared with the motion recognition method fusing multipose estimation and human motion recognition method based on spatiotemporal image segmentation. The proposed method has better judgment time and recognition accuracy as compared to the other two methods and hence can be employed for real-time motion recognition.


## 2. Image Recognition Method for Pitching Finger Movement

### 2.1. Image Acquisition Model of Pitching Finger Movement of Basketball Players

Assuming that the Gauss mixture model labels the rotation of the spatial position of the pitching finger movement of the basketball players, at the multiposition points of the space of the finger movement, the body coordinates of the pitching finger movement of under the initial deformation areX=xi0,xi1,⋯,xin−1,yi0,yi1,⋯,yin−1T, and the width and height of the whole characteristic image of the basketball court are W and H. The three-dimensional spatial feature image I of pitching finger movement is divided into several subblocks, using the grid model. The coordinates of the center points along the gradient direction of the matching points on the network model are calculated to be X′=xi0′,xi1′,⋯,xin−1′,yi0′,yi1′,⋯,yin−1′T. Then, the sphere network model of the basketball in the player’s hands is calculated separately. At the jth manual calibration point xij,yij, the triangular partition pheromone pi,j of the single-frame pitching movement is obtained as given in the following equation:
(1)pi,j=i∈0,intW2−1,j∈0,intH2−1.There are2×2 pixels in the sampling image of pitching finger movement. The density feature of sampling points is extracted [10]. The mean square error between the standardized feature points xij′,yij′ of basketball pitching finger movement is obtained as shown in the following equation:
(2)errij=1N∑i=1Nxij′−yij′+yij′−yij′2.In the formula,N is the total number of evenly distributed grids for image of pitching finger of basketball players.Considering all the pixel feature points ofn spatial positions, the error vectors of basketball players’ differences in lifting and pitching motions are obtained as given in the following equation:
(3)ERR=1n∑j=0n−1errij−1n×1N∑j=0n−1∑i=1Nxij′−xij2+yij′−yij2.Thus, the sampling and feature analysis of three main position spaces of basketball players’ hands are realized, and the standardized judgment of basketball pitching action in interactive scenes is carried out employing a computer image processing method [11]. The modelling process is shown in Figure 1.Figure 1
Standardized judgment process of finger throwing action in basketball throwing.In this paper, the local reconstruction weight matrixA of the sample points’ pitching motion is set up. The basketball player’s motion vector is high-dimensional. The affine transformation of the pixel information features of the motion is as shown in Equation (4):
(4)fGn=a1+a2x+a3y+a4z+∑i=0nγiUgi′,pi,gGn=b1+b2x+b3y+b4z+∑i=0nθiUgi′,pi,hGn=c1+c2x+c3y+c4z+∑i=0nωiUgi′,pi.The normalized sampling point matrixH for basketball action is a symmetric matrix and the matrix element h=Ugi′,Pj=gi′−Pj:i,j=0,1,2,..,n. U stands for matrix vectors, and g represents matrix elements. The eigenspace cost function under three-dimensional nonlinear space mapping is used to find partial differential of unknown transformation parameters a,b,c, γ,θ, and ω, so as to get the linear equations of sampling points and fixed points of network model, and is given by Equation (5):
(5)xyz000=H+τ⋅IPPT0γθωabc.The TPS transform determines the edge features of the vertex of the mesh. The cost error function of wrong pitching movement in the local coordinate system is as shown in the following equation:(6)minεWz=∑i=1Nxi−∑j=1kwjixij2.In the formula:k vertexes of the feature space network model of basketball pitching fingers are xijj=1,2,⋯,k of xi, wji is the weighted difference error between xi and xij.Through triangulation construction, the standardized characteristics of pitching motion of basketball players meet the conditionxij. In order to obtain the motion vector matrix W, the edge contour segmentation errors of the n-th and n+1-th acquisition points are represented by Pn and Pn+1. When the elbow of the player’s ball-holding hand is gradually straightened, the points of the space position in the P Euclidean space form a high-dimensional manifold [12]. With the probability of position distribution of basketball in the air, a local covariance matrix Qjmi is obtained as given in the following equation:
(7)Qjmi=xi−xijTxi−xij.Combining formula (7) with ∑j=1kwji=1, edge contour view point segmentation and the output function fx=WxT of basketball pitching motion under computer vision are used as regression function, and x is the input vector of pixel value. Based on this, the three-dimensional model visual modeling is carried out, as shown in Figure 2.Figure 2
3D modeling of finger throwing for basketball throwing.
(a)
Cuboid primitives(b)
Cylindrical primitives(c)
Cone element


### 2.2. Hand Contour Extraction of Players

#### 2.2.1. Hand Image Preprocessing

The main purpose of hand image preprocessing is to extract player’s hand contour, which includes three parts: gray image, binary image, and hand contour extraction [13]. Because of the single background, uniform illumination, and obvious difference between foreground image and background, the hand image can be segmented by fixed threshold. Figures 3(a)–3(c) are gray image, binary image, and contour of the hand.Figure 3
Hand image preprocessing.
(a)
Hand grayscale(b)
Hand shape two value image(c)
Hand shape image preprocessing


#### 2.2.2. Locating Fingertips and Figure End

Locating fingertips and finger end is the basis of locating the middle axis of the finger. The commonly used location algorithm of fingertips and finger end is to find the distance from each contour point to the center of the wrist [14]. In Figure 4, the local vertex of the curve is the fingertip and the local valley is the finger end. Wrist center point, in a hand contour, is the midpoint of the vertex line of the two hand contours at the wrist (the black midpoint in Figure 3(c)).Figure 4
The distance from the outline point to the wrist center point.


#### 2.2.3. Locating the Central Axis of a Finger

Because the player’s finger contour has high stability, the finger axis positioned according to the finger contour also has high stability [15]. Firstly, the left and right contours of the finger are fitted as the edge line of the finger, and then, the midline of the two edge lines is taken as the center axis of the finger.For a single finger contour, the left and right contours of the finger are divided according to the fingertip points, and then, the left and right contours of the finger are fitted, respectively, by the binomial curve fitting algorithm [16]. A fitting straight line is shown below in the following equation:
(8)y=kdx+bd,wherein kd=∑c=1ndycd×∑c=1ndxcd−nd×∑c=1ndxcd×ycd/∑c=1ndxcd2−nd×∑c=1ndxcd2, bd=∑c=1ndycd−kd×∑c=1ndxcd/nd, xcd,ycdc=1,⋯,nd, dd=1,2,⋯,8, d is the finger unilateral contour label, and kd is the fitting vector of the finger unilateral contour label. nd is the length of the unilateral contour of the finger (from the fingertip to the end of finger), x1d,y1d is the fingertip, xndd,yndd is the figure end, and c represents the fitting parameter.The angular bisector of the line fitted by the left contour and the line fitted by the right contour is defined as the central axis of finger, but when the line fitted by the left contour is parallel to the line fitted by the right contour, it is considered that the line parallel to and equal to the two lines is the central axis of finger [17]. Equation (9) represents the central axis of the finger.
(9)y=ki′x+bi′x.In the formula,ki′=tanarctanki×2−1+arctanki×2/2, bi′=ki×2−1bi×2−ki×2bi×21/ki×2−1−ki×2−ki′bi×2−1−bi×2/ki×2−1−ki×2, ii=1,2,3,4, y=ki×2−1x+bi×2−1 is the line fitting the left finger contour, and the intersection point between the central axis of the finger and the contour of the finger is defined as a new fingertip.The finger length is defined as the vertical line of the finger’s central axis through the left and right contour points of the finger. There are two intersections. The intersection point near the fingertip is defined as the start of finger length, and the contour length from the fingertip to the finger end is the finger length [18]. Figure 5(a) is a schematic diagram of finger contour fitting. Figure 5(b) is a sketch map of the central axis of finger.Figure 5
Finger localization.
(a)
Finger contour fitting(b)
Finger central axis diagramThe above process completes the effective extraction of pitching finger contour and central axis and obtains the effective pitching finger image. On this basis, the symmetry recognition of basketball pitching finger movement image based on nematode recognition algorithm is adopted to realize the accurate recognition of image.


### 2.3. Symmetry Recognition of Pitching Finger Image Based on Nematode Recognition Algorithm

The nematode body has the characteristic of high symmetry, and the human body and the basketball ball also have high symmetry. In order to accurately recognize the symmetry of the pitching finger movement image [19], the nematode recognition algorithm is used to recognize the pitching movement [20].The biggest factor affecting nematode recognition is the bubbles in the culture medium. The length of the edge of the bubbles is similar to the length of the nematode body, and the enclosure area is similar to the nematode body area [21]. The observation showed that the body of nematode was completely symmetrical. Although the complete envelope curve of nematode edge could not be obtained after pretreatment, the lines on both sides of the nematode body also had high similarity, and there was no similar curve around the bubble edge curve. Through this characteristic, the lines between the nematode body curve and its bubble edge curve could be distinguished [22].Based on the nematode recognition algorithm, the image symmetry recognition method is as follows:(1)
Progressive scanning of the pitching handIn the first scan, after removing the isolated points and bifurcation points, the image edge is refined [23]. After image preprocessing, the finger binary image contains many bifurcated lines. Firstly, the bifurcation points should be removed so that only one branch line segment can be included in the image for easy operation [24]. To facilitate algorithm description, an eight-neighborhood model is defined around each pixel, as shown in Figure 6.Figure 6
Eight-neighborhood model.There are only three cases around 8 points: there is only one black point, which is the starting point or termination point of the line segment; there are two black points around which is the middle point of the line segment; there are three or more black points around which are intersections or bifurcations. There are 9 types satisfying the characteristics of the bifurcation point, as shown in Figure7:Figure 7
Bifurcation point model.Through the template matching, the bifurcation points can be removed one by one, so that the image becomes a single pixel wide edge [25].For the second scan, detect line segment, remove interference short line segment, record position information and midpoint coordinates of long line segment, and determine line segment chain code [26, 27]. The steps are as follows: scanning line by line to find the starting point of the line segment and give its label; judging the direction of the line segment according to the neighborhood of the pixel point, labeling the same line segment along its direction; returning to the starting point after labeling a line segment, continuing to find the next starting point line by line, as shown in Figure 8; and determining the link code of the line segment, line by line. Segment chain code is very important data [28, 29]. It can not only express the length of the line segment but also indicate its direction. Some characteristics of players and spheres must be identified through them. In this paper, we use the 8 connected region chain code (also called Freeman code). The definition of chain code value is shown in Figure 9:Figure 8
Sequential labeling of line segments.Figure 9
8-unicom chain code.When a starting point is found, the chain code value is determined point by point along the line to the end point in sequence and then returns to the starting point and continues to search the next starting point in horizontal scanning order to determine the chain code value of the next line segment. The process is shown in Figure10.
(2)
Calculate the information of the two lines with the highest similarity between the two adjacent lines, calculate the coordinates of the points in the human body and the sphere, and make the cross mark [30]Figure 10
Image edge tracking (chain code 0671707611).Specific methods are as follows: firstly, extract all the point information of a line segment, find out whether there are other line segments around the starting point, and if so, extract the point information of the line segment. Based on the shorter line segment in two-line segments, the similarity of the two-line segments is calculated by using the chain code value. The formula for calculating the similarity coefficient of two lines of equal length is given in the following equation:(10)r=∑i=1n∑i=1nAi−A¯Bi−B¯∑i=1n∑i=1nAi−A¯∑i=1n∑i=1nBi−B¯2.In the formula:A1,⋯,An and B1,⋯,Bn are chain code values of two-line segments, respectively, A¯=∑i=1nAi/n and B¯=∑i=1nBi/n. The closer the similarity coefficient is to 1, the more similar the two-line character is.In the image studied in this paper, the length of the two-line segments is not always equal (Beyer–H RTL). This is to calculate the similarity coefficient by truncating the chain code value of the same length as the chain code value of the short line segment from scratch in the chain code value of the longer line segment and then moving one bit backward in turn to calculate the chain code value of the same length until all the chain code values of the longer line segment have been taken. If there aren chain codes in the shorter line segment and m chain codes in the longer line segment, it is necessary to calculate the m−n+1-degree similarity coefficients. Finally, all the similarity coefficients are compared, and the group with the largest value is taken as the similarity coefficients of the two-line segments. Because the players’ human body and sphere are symmetrical, the similarity between the two contours of the same body and sphere is significant [31], and the similarity coefficient is large, while the similarity coefficient between the contours of different bodies and spheres or between the contours of human body and sphere and the contours of bubbles is small; this method can be used to judge whether the two contours belong to the same body or sphere [32, 33]. According to the definition of similarity, when the similarity coefficient is greater than 0.7, the similarity degree is high, so 0.7 is taken as the judgment threshold. The flow chart of the recognition algorithm is shown in Figure 11.Figure 11
Flow chart of nematode recognition algorithm.


## 2.1. Image Acquisition Model of Pitching Finger Movement of Basketball Players

Assuming that the Gauss mixture model labels the rotation of the spatial position of the pitching finger movement of the basketball players, at the multiposition points of the space of the finger movement, the body coordinates of the pitching finger movement of under the initial deformation areX=xi0,xi1,⋯,xin−1,yi0,yi1,⋯,yin−1T, and the width and height of the whole characteristic image of the basketball court are W and H. The three-dimensional spatial feature image I of pitching finger movement is divided into several subblocks, using the grid model. The coordinates of the center points along the gradient direction of the matching points on the network model are calculated to be X′=xi0′,xi1′,⋯,xin−1′,yi0′,yi1′,⋯,yin−1′T. Then, the sphere network model of the basketball in the player’s hands is calculated separately. At the jth manual calibration point xij,yij, the triangular partition pheromone pi,j of the single-frame pitching movement is obtained as given in the following equation:
(1)pi,j=i∈0,intW2−1,j∈0,intH2−1.There are2×2 pixels in the sampling image of pitching finger movement. The density feature of sampling points is extracted [10]. The mean square error between the standardized feature points xij′,yij′ of basketball pitching finger movement is obtained as shown in the following equation:
(2)errij=1N∑i=1Nxij′−yij′+yij′−yij′2.In the formula,N is the total number of evenly distributed grids for image of pitching finger of basketball players.Considering all the pixel feature points ofn spatial positions, the error vectors of basketball players’ differences in lifting and pitching motions are obtained as given in the following equation:
(3)ERR=1n∑j=0n−1errij−1n×1N∑j=0n−1∑i=1Nxij′−xij2+yij′−yij2.Thus, the sampling and feature analysis of three main position spaces of basketball players’ hands are realized, and the standardized judgment of basketball pitching action in interactive scenes is carried out employing a computer image processing method [11]. The modelling process is shown in Figure 1.Figure 1
Standardized judgment process of finger throwing action in basketball throwing.In this paper, the local reconstruction weight matrixA of the sample points’ pitching motion is set up. The basketball player’s motion vector is high-dimensional. The affine transformation of the pixel information features of the motion is as shown in Equation (4):
(4)fGn=a1+a2x+a3y+a4z+∑i=0nγiUgi′,pi,gGn=b1+b2x+b3y+b4z+∑i=0nθiUgi′,pi,hGn=c1+c2x+c3y+c4z+∑i=0nωiUgi′,pi.The normalized sampling point matrixH for basketball action is a symmetric matrix and the matrix element h=Ugi′,Pj=gi′−Pj:i,j=0,1,2,..,n. U stands for matrix vectors, and g represents matrix elements. The eigenspace cost function under three-dimensional nonlinear space mapping is used to find partial differential of unknown transformation parameters a,b,c, γ,θ, and ω, so as to get the linear equations of sampling points and fixed points of network model, and is given by Equation (5):
(5)xyz000=H+τ⋅IPPT0γθωabc.The TPS transform determines the edge features of the vertex of the mesh. The cost error function of wrong pitching movement in the local coordinate system is as shown in the following equation:(6)minεWz=∑i=1Nxi−∑j=1kwjixij2.In the formula:k vertexes of the feature space network model of basketball pitching fingers are xijj=1,2,⋯,k of xi, wji is the weighted difference error between xi and xij.Through triangulation construction, the standardized characteristics of pitching motion of basketball players meet the conditionxij. In order to obtain the motion vector matrix W, the edge contour segmentation errors of the n-th and n+1-th acquisition points are represented by Pn and Pn+1. When the elbow of the player’s ball-holding hand is gradually straightened, the points of the space position in the P Euclidean space form a high-dimensional manifold [12]. With the probability of position distribution of basketball in the air, a local covariance matrix Qjmi is obtained as given in the following equation:
(7)Qjmi=xi−xijTxi−xij.Combining formula (7) with ∑j=1kwji=1, edge contour view point segmentation and the output function fx=WxT of basketball pitching motion under computer vision are used as regression function, and x is the input vector of pixel value. Based on this, the three-dimensional model visual modeling is carried out, as shown in Figure 2.Figure 2
3D modeling of finger throwing for basketball throwing.
(a)
Cuboid primitives(b)
Cylindrical primitives(c)
Cone element


## 2.2. Hand Contour Extraction of Players

### 2.2.1. Hand Image Preprocessing

The main purpose of hand image preprocessing is to extract player’s hand contour, which includes three parts: gray image, binary image, and hand contour extraction [13]. Because of the single background, uniform illumination, and obvious difference between foreground image and background, the hand image can be segmented by fixed threshold. Figures 3(a)–3(c) are gray image, binary image, and contour of the hand.Figure 3
Hand image preprocessing.
(a)
Hand grayscale(b)
Hand shape two value image(c)
Hand shape image preprocessing


### 2.2.2. Locating Fingertips and Figure End

Locating fingertips and finger end is the basis of locating the middle axis of the finger. The commonly used location algorithm of fingertips and finger end is to find the distance from each contour point to the center of the wrist [14]. In Figure 4, the local vertex of the curve is the fingertip and the local valley is the finger end. Wrist center point, in a hand contour, is the midpoint of the vertex line of the two hand contours at the wrist (the black midpoint in Figure 3(c)).Figure 4
The distance from the outline point to the wrist center point.


### 2.2.3. Locating the Central Axis of a Finger

Because the player’s finger contour has high stability, the finger axis positioned according to the finger contour also has high stability [15]. Firstly, the left and right contours of the finger are fitted as the edge line of the finger, and then, the midline of the two edge lines is taken as the center axis of the finger.For a single finger contour, the left and right contours of the finger are divided according to the fingertip points, and then, the left and right contours of the finger are fitted, respectively, by the binomial curve fitting algorithm [16]. A fitting straight line is shown below in the following equation:
(8)y=kdx+bd,wherein kd=∑c=1ndycd×∑c=1ndxcd−nd×∑c=1ndxcd×ycd/∑c=1ndxcd2−nd×∑c=1ndxcd2, bd=∑c=1ndycd−kd×∑c=1ndxcd/nd, xcd,ycdc=1,⋯,nd, dd=1,2,⋯,8, d is the finger unilateral contour label, and kd is the fitting vector of the finger unilateral contour label. nd is the length of the unilateral contour of the finger (from the fingertip to the end of finger), x1d,y1d is the fingertip, xndd,yndd is the figure end, and c represents the fitting parameter.The angular bisector of the line fitted by the left contour and the line fitted by the right contour is defined as the central axis of finger, but when the line fitted by the left contour is parallel to the line fitted by the right contour, it is considered that the line parallel to and equal to the two lines is the central axis of finger [17]. Equation (9) represents the central axis of the finger.
(9)y=ki′x+bi′x.In the formula,ki′=tanarctanki×2−1+arctanki×2/2, bi′=ki×2−1bi×2−ki×2bi×21/ki×2−1−ki×2−ki′bi×2−1−bi×2/ki×2−1−ki×2, ii=1,2,3,4, y=ki×2−1x+bi×2−1 is the line fitting the left finger contour, and the intersection point between the central axis of the finger and the contour of the finger is defined as a new fingertip.The finger length is defined as the vertical line of the finger’s central axis through the left and right contour points of the finger. There are two intersections. The intersection point near the fingertip is defined as the start of finger length, and the contour length from the fingertip to the finger end is the finger length [18]. Figure 5(a) is a schematic diagram of finger contour fitting. Figure 5(b) is a sketch map of the central axis of finger.Figure 5
Finger localization.
(a)
Finger contour fitting(b)
Finger central axis diagramThe above process completes the effective extraction of pitching finger contour and central axis and obtains the effective pitching finger image. On this basis, the symmetry recognition of basketball pitching finger movement image based on nematode recognition algorithm is adopted to realize the accurate recognition of image.


## 2.2.1. Hand Image Preprocessing

The main purpose of hand image preprocessing is to extract player’s hand contour, which includes three parts: gray image, binary image, and hand contour extraction [13]. Because of the single background, uniform illumination, and obvious difference between foreground image and background, the hand image can be segmented by fixed threshold. Figures 3(a)–3(c) are gray image, binary image, and contour of the hand.Figure 3
Hand image preprocessing.
(a)
Hand grayscale(b)
Hand shape two value image(c)
Hand shape image preprocessing


## 2.2.2. Locating Fingertips and Figure End

Locating fingertips and finger end is the basis of locating the middle axis of the finger. The commonly used location algorithm of fingertips and finger end is to find the distance from each contour point to the center of the wrist [14]. In Figure 4, the local vertex of the curve is the fingertip and the local valley is the finger end. Wrist center point, in a hand contour, is the midpoint of the vertex line of the two hand contours at the wrist (the black midpoint in Figure 3(c)).Figure 4
The distance from the outline point to the wrist center point.


## 2.2.3. Locating the Central Axis of a Finger

Because the player’s finger contour has high stability, the finger axis positioned according to the finger contour also has high stability [15]. Firstly, the left and right contours of the finger are fitted as the edge line of the finger, and then, the midline of the two edge lines is taken as the center axis of the finger.For a single finger contour, the left and right contours of the finger are divided according to the fingertip points, and then, the left and right contours of the finger are fitted, respectively, by the binomial curve fitting algorithm [16]. A fitting straight line is shown below in the following equation:
(8)y=kdx+bd,wherein kd=∑c=1ndycd×∑c=1ndxcd−nd×∑c=1ndxcd×ycd/∑c=1ndxcd2−nd×∑c=1ndxcd2, bd=∑c=1ndycd−kd×∑c=1ndxcd/nd, xcd,ycdc=1,⋯,nd, dd=1,2,⋯,8, d is the finger unilateral contour label, and kd is the fitting vector of the finger unilateral contour label. nd is the length of the unilateral contour of the finger (from the fingertip to the end of finger), x1d,y1d is the fingertip, xndd,yndd is the figure end, and c represents the fitting parameter.The angular bisector of the line fitted by the left contour and the line fitted by the right contour is defined as the central axis of finger, but when the line fitted by the left contour is parallel to the line fitted by the right contour, it is considered that the line parallel to and equal to the two lines is the central axis of finger [17]. Equation (9) represents the central axis of the finger.
(9)y=ki′x+bi′x.In the formula,ki′=tanarctanki×2−1+arctanki×2/2, bi′=ki×2−1bi×2−ki×2bi×21/ki×2−1−ki×2−ki′bi×2−1−bi×2/ki×2−1−ki×2, ii=1,2,3,4, y=ki×2−1x+bi×2−1 is the line fitting the left finger contour, and the intersection point between the central axis of the finger and the contour of the finger is defined as a new fingertip.The finger length is defined as the vertical line of the finger’s central axis through the left and right contour points of the finger. There are two intersections. The intersection point near the fingertip is defined as the start of finger length, and the contour length from the fingertip to the finger end is the finger length [18]. Figure 5(a) is a schematic diagram of finger contour fitting. Figure 5(b) is a sketch map of the central axis of finger.Figure 5
Finger localization.
(a)
Finger contour fitting(b)
Finger central axis diagramThe above process completes the effective extraction of pitching finger contour and central axis and obtains the effective pitching finger image. On this basis, the symmetry recognition of basketball pitching finger movement image based on nematode recognition algorithm is adopted to realize the accurate recognition of image.


## 2.3. Symmetry Recognition of Pitching Finger Image Based on Nematode Recognition Algorithm

The nematode body has the characteristic of high symmetry, and the human body and the basketball ball also have high symmetry. In order to accurately recognize the symmetry of the pitching finger movement image [19], the nematode recognition algorithm is used to recognize the pitching movement [20].The biggest factor affecting nematode recognition is the bubbles in the culture medium. The length of the edge of the bubbles is similar to the length of the nematode body, and the enclosure area is similar to the nematode body area [21]. The observation showed that the body of nematode was completely symmetrical. Although the complete envelope curve of nematode edge could not be obtained after pretreatment, the lines on both sides of the nematode body also had high similarity, and there was no similar curve around the bubble edge curve. Through this characteristic, the lines between the nematode body curve and its bubble edge curve could be distinguished [22].Based on the nematode recognition algorithm, the image symmetry recognition method is as follows:(1)
Progressive scanning of the pitching handIn the first scan, after removing the isolated points and bifurcation points, the image edge is refined [23]. After image preprocessing, the finger binary image contains many bifurcated lines. Firstly, the bifurcation points should be removed so that only one branch line segment can be included in the image for easy operation [24]. To facilitate algorithm description, an eight-neighborhood model is defined around each pixel, as shown in Figure 6.Figure 6
Eight-neighborhood model.There are only three cases around 8 points: there is only one black point, which is the starting point or termination point of the line segment; there are two black points around which is the middle point of the line segment; there are three or more black points around which are intersections or bifurcations. There are 9 types satisfying the characteristics of the bifurcation point, as shown in Figure7:Figure 7
Bifurcation point model.Through the template matching, the bifurcation points can be removed one by one, so that the image becomes a single pixel wide edge [25].For the second scan, detect line segment, remove interference short line segment, record position information and midpoint coordinates of long line segment, and determine line segment chain code [26, 27]. The steps are as follows: scanning line by line to find the starting point of the line segment and give its label; judging the direction of the line segment according to the neighborhood of the pixel point, labeling the same line segment along its direction; returning to the starting point after labeling a line segment, continuing to find the next starting point line by line, as shown in Figure 8; and determining the link code of the line segment, line by line. Segment chain code is very important data [28, 29]. It can not only express the length of the line segment but also indicate its direction. Some characteristics of players and spheres must be identified through them. In this paper, we use the 8 connected region chain code (also called Freeman code). The definition of chain code value is shown in Figure 9:Figure 8
Sequential labeling of line segments.Figure 9
8-unicom chain code.When a starting point is found, the chain code value is determined point by point along the line to the end point in sequence and then returns to the starting point and continues to search the next starting point in horizontal scanning order to determine the chain code value of the next line segment. The process is shown in Figure10.
(2)
Calculate the information of the two lines with the highest similarity between the two adjacent lines, calculate the coordinates of the points in the human body and the sphere, and make the cross mark [30]Figure 10
Image edge tracking (chain code 0671707611).Specific methods are as follows: firstly, extract all the point information of a line segment, find out whether there are other line segments around the starting point, and if so, extract the point information of the line segment. Based on the shorter line segment in two-line segments, the similarity of the two-line segments is calculated by using the chain code value. The formula for calculating the similarity coefficient of two lines of equal length is given in the following equation:(10)r=∑i=1n∑i=1nAi−A¯Bi−B¯∑i=1n∑i=1nAi−A¯∑i=1n∑i=1nBi−B¯2.In the formula:A1,⋯,An and B1,⋯,Bn are chain code values of two-line segments, respectively, A¯=∑i=1nAi/n and B¯=∑i=1nBi/n. The closer the similarity coefficient is to 1, the more similar the two-line character is.In the image studied in this paper, the length of the two-line segments is not always equal (Beyer–H RTL). This is to calculate the similarity coefficient by truncating the chain code value of the same length as the chain code value of the short line segment from scratch in the chain code value of the longer line segment and then moving one bit backward in turn to calculate the chain code value of the same length until all the chain code values of the longer line segment have been taken. If there aren chain codes in the shorter line segment and m chain codes in the longer line segment, it is necessary to calculate the m−n+1-degree similarity coefficients. Finally, all the similarity coefficients are compared, and the group with the largest value is taken as the similarity coefficients of the two-line segments. Because the players’ human body and sphere are symmetrical, the similarity between the two contours of the same body and sphere is significant [31], and the similarity coefficient is large, while the similarity coefficient between the contours of different bodies and spheres or between the contours of human body and sphere and the contours of bubbles is small; this method can be used to judge whether the two contours belong to the same body or sphere [32, 33]. According to the definition of similarity, when the similarity coefficient is greater than 0.7, the similarity degree is high, so 0.7 is taken as the judgment threshold. The flow chart of the recognition algorithm is shown in Figure 11.Figure 11
Flow chart of nematode recognition algorithm.


## 3. Results

In order to verify the effectiveness of this method, this method is used to identify and judge the standardization of pitching finger movement of a basketball player. The hardware environment of the experimental platform is as follows: CPU is Intel Core I3 processor 3.30 GHz, memory 4 GB FFR3, and the resolution of sampling image is320×240. The simulation data of ball vision image express a kind of basketball throwing action. There are 100 test sample image sets in each throwing action mode, and there are 1024×1000 test sets in the basketball throwing action image database. A simplified visual analysis model of finger pulling action of basketball throwing is established by SolidWorks, and the analysis data are imported into Adams software. The image processing and recognition analysis are carried out, and the standardized judgment of the finger pitching action is made. The standardized action mode of the finger pitching action is shown in Figure 12.Figure 12
Standard mode of finger throwing in basketball bowling.The standardized action data of basketball throwing in Figure12 is saved as .txt text data and loaded into image data processing software. The computer vision analysis is carried out to guide the actual pitching action, and the image acquisition model of basketball pitching is constructed. The acquisition results are shown in Figure 13. The edge contour of the acquired pitching image is detected and adaptive feature segmentation is carried out, which are shown in Figure 14.Figure 13
Raw information collection of basketball bowling.Figure 14
Image edge detection and adaptive feature segmentation.The computer vision analysis process of 20 pitching movements is averaged, and self-adaptive correction and action standardization judgment are made in the three-dimensional space of pitching movements. The results are shown in Table1:Table 1
The results of analysis on the transformation of basketball pitching finger strokes.
WayTopping pointsOverall sampling pointsJudge time (s)Smooth timeJudgment precision (%)Fixed point432192112.1221198.1Sport2432121123.0932197.72From Table1, it can be seen that the accuracy of recognition and judgment is more than 95% for the proposed method and thus can be used to perform fixed-point judgment and motion of pitching motion. The accuracy of proposed method suggests that it can accurately identify the pitching action image of a basketball player and correct the pitching deviation in real-time and hence, this method realizes adaptive real-time correction.The comparison of the proposed method with human motion recognition method based on spatiotemporal image segmentation and interactive region detection and action recognition method fused with multipose estimation features is also conducted with eight sample runs. Eight basketball pitching finger motion image recognition experiments are set up. The recognition images are set to four. The recognition accuracy of the three methods is counted. The comparison results are shown in Tables2–4.Table 2
Identification accuracy of this method.
Number of experiments/timesIdentification accuracy (%)4 image recognition accuracy meanImage 1Image 2Image 3Image 4195%97%99%99%98%299%95%98%98%98%397%97%99%99%98%497%97%99%99%98%599%95%99%98%98%697%99%98%98%98%799%98%95%98%98%898%99%95%95%97%8 identification accuracy mean98%97%98%98%98%Table 3
Identification accuracy of human motion recognition method based on time and space image segmentation and interaction area detection.
Number of experiments/timesIdentification accuracy (%)4 image recognition accuracy meanImage 1Image 2Image 3Image 4145%48%46%46%46%246%48%46%45%46%346%48%45%46%46%446%48%48%45%47%546%48%48%46%47%645%48%45%45%46%746%46%45%46%46%845%45%45%48%46%8 identification accuracy mean46%47%46%46%46%Table 4
Identification accuracy of action recognition method for fusion of multiple posture estimation features.
Number of experiments/timesIdentification accuracy (%)4 image recognition accuracy meanImage 1Image 2Image 3Image 4177%76%76%76%76%276%77%78%78%77%376%78%77%77%77%476%78%48%78%70%577%77%77%78%77%678%76%76%78%77%778%77%77%78%78%875%75%75%78%76%8 identification accuracy mean77%77%73%78%76%Tables2–4 represent the recognition accuracy of the various methods for the same basketball pitching finger image and identical recognition times. The average recognition accuracy of proposed method is 98%; the average recognition accuracy of human motion recognition method based on spatiotemporal image segmentation and interactive region detection is 46%. The average recognition accuracy of the multipose estimation methods is 76%. This comparison shows that the accuracy of the proposed method is the largest among the three methods.The results of the recognition growth rate of the three methods in the above experiments are statistically analyzed. The results are shown in Figure15.Figure 15
Growth rate of recognition of the three methods.Analysis of Figure15 shows that three methods can identify the growth rate of speed. The trend of the broken line of the growth rate of recognition speed of the proposed method is obviously above the other two methods. With the increase of the number of experiments, the maximum growth rate of recognition speed of the proposed method reaches 98%, and the recognition speed of the motion recognition method with multipose estimation features increases. The growth rate of recognition speed of proposed method is 91.8%. The highest speed of human motion recognition based on spatiotemporal image segmentation and interactive region detection is only 91.5%. From this, we can see that the speed of recognition in this paper increases rapidly and the efficiency is high.Statistical time-consuming data of the three methods in the above experiments are described in Tables5–7.Table 5
Time-consuming identification of this method.
Number of experiments/timesTime consuming (s)Image 1Image 2Image 3Image 4110111111210111010312111012410111111512111011612101110712101010810121010Table 6
Time-consuming recognition of human motion recognition methods based on spatial and temporal image segmentation and interactive region detection.
Number of experiments/timesTime consuming (s)Image 1Image 2Image 3Image 4156575351252535555356576061456575958557595858656626160756575860857606060Table 7
Time consuming for recognition of motion recognition methods incorporating multiple posture estimation features.
Number of experiments/timesTime consuming (s)Image 1Image 2Image 3Image 4132333434234343435334353635437343434533333637635363637737373736836343633Tables5–7 show that, on the premise of identifying the same target and identical recognition times, the maximum recognition time of this method is 12 s; the maximum recognition time of human motion recognition method based on spatiotemporal image segmentation and interactive region detection is 62 s. The maximum time of the recognition of the action recognition method based on the fusion of multipose estimation features is 37 s. Through data comparison, we can see that the recognition time of this method is the shortest and the recognition efficiency is the fastest.Statistics on robustness of the three methods are described in Figure16.Figure 16
Comparison of the robustness of the three methods.Analysis of Figure16 shows that with the increase of the number of experiments, the overall trend of the robust data of the proposed method is always above the other two methods. The maximum robustness and minimum robustness of the proposed method are 0.45 and 0.1, respectively. The maximum robustness and minimum robustness of the motion recognition method fusing multipose estimation features are 0.43 and 0.43, respectively. The maximum robustness and minimum robustness of the human motion recognition method based on spatiotemporal image segmentation and interactive region detection are 0.37 and 0.05, respectively, which shows that the robustness of the proposed method is higher than that of the other two methods. The experimental results show that the proposed method has higher robustness.


## 4. Discussion

Based on the results of the previous section, this paper discusses the impact of wrist and finger movements on the percentage of hits. Firstly, the wrist backward motion during pitching directly affects the direction, rotation, and running parabola of the ball. If the wrist back is not enough, the angle of the shot is small, and the parabola of the ball is low, the possibility of entering the basket will be reduced. The correct action should be as follows: five fingers are separated naturally, the hand turns backward, the palm is empty, and the ball does not fall on the hand; the center of gravity falls between the middle finger and the index finger, so as to facilitate the control of the ball by the hand and finger. Secondly, the finger movement when the ball is released is beneficial to the control of the ball’s movement route and can make the thrown ball naturally produce backspin. The backspin ball has a higher flying radian than the nonrotating ball, which enlarges the incident cross section and improves the chances of basketball entering the basket. In this case, even if the backspin ball occasionally encounters the basket, because the ball’s rebound direction is upward, the ball will be more likely to score the basket again. Therefore, it is very important to pay attention to and strengthen the training of wrist and finger movements, form correct throwing techniques, and make them become dynamic stereotypes, so as to improve the shooting rate of the ball. Practice has proved that if we grasp the opportunity (condition) of pitching well, grasp the correct jump shot technology (core), give full play to good physical quality (foundation), plus a better feel, we can improve the hit rate of pitching (especially jump shot) in the fierce competition. Therefore, grasping the correct throwing wrist and finger movements is the key to improve the hit rate of jump shots.


## 5. Conclusion

In this paper, a method of recognizing basketball pitching finger movement image based on symmetry algorithm is proposed. A model of acquiring pitching finger movement image is constructed. The edge contour of pitching finger movement image is detected, and self-adapting feature segmentation is carried out. The players’ hand contour is extracted. Basketball pitching based on nematode recognition algorithm is carried out. According to the high symmetry of the nematode body, the human body and sphere are also highly symmetrical. First, the chain code value on one side of the body contour is obtained by image analysis, and then, the basketball pitch is recognized by comparing the similarity coefficient of the chain code value of adjacent line segments. Based on the experimental results, it is concluded that the accuracy of recognition and judgment is more than 95% when judging the movement in basketball pitching. An accuracy of above 95% indicates that the method can be employed for time recognitions. The average recognition accuracy for the proposed method is 98%, the growth rate of recognition speed is 98%, and the maximum recognition time is 12 s. The recognition efficiency and accuracy for the proposed method are greater than those for the other two methods. The robustness of the proposed method is 0.45, which shows that the method has high stability.



---

*Source: 2242222-2021-09-16.xml*