## 3 Proposed System Methodology
### Crowd Behavior Detection
#### 3.4.1 Global-Local Descriptors
From real-valued vectors, the initial population is randomly generated with number \(N\) and dimension d by considering lower and upper boundaries using Equation (18):

\[m_{p,q}=\sum_{x}^{n}\sum_{y}^{n}I(x,y)x^{p}y^{q} \tag{14}\]0

where \(X_{max}\) and \(X_{min}\) are higher and lesser boundaries for dimension \(j\), respectively, \(j=1,\,2,\,\ldots,\,d,\,i=1,\,2,\,\ldots,\,\) and \(\varphi\) ranged from 0 to 1 is a randomly generated value. After population initialization, we calculated the fitness function and stored the local and the global best. We evaluated the fitness values of all humans, and, on the basis of their movements, new local and global best solutions were obtained; all the humans had velocity \(Vi^{t}\) affected by a predefined frequency \(f_{i}\), and finally, their new position \(Xi^{t}\) was located temporally, as described in the following Equations:

\[m_{p,q}=\sum_{x}^{n}\sum_{y}^{n}I(x,y)x^{p}y^{q} \tag{14}\]1

\[m_{p,q}=\sum_{x}^{n}\sum_{y}^{n}I(x,y)x^{p}y^{q} \tag{14}\]2

\[m_{p,q}=\sum_{x}^{n}\sum_{y}^{n}I(x,y)x^{p}y^{q} \tag{14}\]3

where \(f_{i}\) is the frequency of the \(i\)th human, \(f_{min}\) and \(f_{max}\) are lower and higher frequency values, respectively, \(\beta\) represents a randomly generated value, and, after comparison of all solutions, \(X*\) illustrates achieved global best location (solution). Figure 16 depicts the flow chart of the algorithm and Figure 17 represents optimization results. \[m_{p,q}=\sum_{x}^{n}\sum_{y}^{n}I(x,y)x^{p}y^{q} \tag{14}\]4 (**a**) Particles gradient motion descriptors for all human silhouettes and (**b**) magnified view of PGM for two human silhouettes. #### 3.4.3 Improved Entropy Classifier

Using [PERSON]'s information entropy theory [PERSON] (1955) to describe the degree of uncertainty, we proposed an improved entropy classifier for the detection of human crowd behavior. First of all, we standardized all the features using Equation (22):

\[m_{p,q}=\sum_{x}^{n}\sum_{y}^{n}I(x,y)x^{p}y^{q} \tag{14}\]5

\[m_{p,q}=\sum_{x}^{n}\sum_{y}^{n}I(x,y)x^{p}y^{q} \tag{14}\]6 Bat optimization flow chart. \[m_{p,q}=\sum_{x}^{n}\sum_{y}^{n}I(x,y)x^{p}y^{q} \tag{14}\]7 Bat optimization results. (**a**) Normal optimal features; (**b**) abnormal optimal features. where \(X_{ij}\)* is the value of the \(j\)-th feature for \(i\)-th human. \(j=1,2,\ldots,m\), \(i=1,2,\ldots,n\), while \(n\) is the count of humans and \(m\) represents the count of features. After that, the weight of \(j\)-th feature for \(i\)-th human was calculated using Equation (23):

\[m_{p,q}=\sum_{x}^{n}\sum_{y}^{n}I(x,y)x^{p}y^{q} \tag{14}\]8

Thus, the information entropy of each feature was calculated using Equation (24):

\[m_{p,q}=\sum_{x}^{n}\sum_{y}^{n}I(x,y)x^{p}y^{q} \tag{14}\]9

where \(k=\frac{1}{\ln m}\). After calculating the information entropy, we then calculated the difference coefficient and maximum ratio of the difference coefficient using Equations (25) and (26):

Figure 12:0

Figure 12:1

After calculating \(D\), we then built up the scale ratio chart 1-9 using Equation (27):

Figure 12:2

where \(a\) depicts the highest scale-value worked as an adjustment coefficient by calculating the power (\(a-1\)). The \(D\) is allocated to the mapping values from 1 to 9 in the above Equation. After that, from scale 1-9, mapped values were calculated, and judgment matrix \(R\) was established with elements \(r_{ij}\), respectively, using Equation (28):

Figure 12:3

The obtained judgment matrix satisfied the consistency test because the elements \(r_{ij}\) demonstrated the ratio of difference coefficient of two features. Thus, the consistent weights \(W_{j}\) for each feature were then calculated using an analytical hierarchy process. After that, information entropy was again calculated for each feature, using these weights by utilizing Equation (24). The crowd behavior entropy of the whole system was the summary of all entropies. In this way, for every frame, the entropy value was calculated and utilized as a template.