## 3 The Distributed Face Recognition Model
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**System**} & **Central** & \multirow{2}{*}{**Node Functions**} & \multirow{2}{*}{**Performances**} & \multirow{2}{*}{**Scalability**} & **Fault** \\  & **Server** & & & & **Tolerance** \\ \hline Centralized & One central & All nodes are passive for task allocation & Small throughput & & \\ system & controller & & & Poor Robustness & \\  & & & allocation & Globally optimal & \\ \hline Distributed & No & All nodes are autonomous for task allocation & Large throughput & & \\ system & controllers & & & Good scalability & Good \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The comparisons of two systems. Figure 2: (a) Centralized face recognition; (b) distributed face recognition; (c) server-agent interaction in the distributed face recognition. tracking the faces; (3) feature extraction: extracting the face features like principal components from the entire face or features like eye and lip from local feature points; (4) dimension reduction: reducing the extracted high-dimensional features to low-dimensional ones; and (5) face matching/recognition: comparing face features from the agents with the stored data in the dataset and returning recognition results to the agents. Herein, the first four steps are implemented on the agents, and the time taken for each step is also recorded. The server conducts Step 5 and records the time. The total time to process all the videos can be obtained as follows. Suppose that there are N tasks and M agents. Use \(\mathrm{O}\left(\mathrm{N}_{\mathrm{P}}\right)\) to represent the processing time on the agent side and \(\mathrm{O}\left(\mathrm{N}_{\mathrm{r}}\right)\) to represent the recognition time on the server side. Since \(\mathrm{O}\left(\mathrm{N}_{\mathrm{r}}\right)\ll\mathrm{O}\left(\mathrm{N}_ {\mathrm{P}}\right)\), \(\mathrm{O}\left(\mathrm{N}_{\mathrm{r}}\right)\) can be ignored. Therefore, the total time for processing all the videos can be represented as \(\mathrm{O}\left(\mathrm{N}_{\mathrm{P}}/\mathrm{M}\right)\). Face matching is conducted on the server. At first, the server sends the number of tasks to the agent. After the server receives the task request and agrees to the request, the agent establishes a connection between the server end and the agent end, and continuously sends the video stream data to the server once the recognition task starts. When the request is for face recognition, the agent detects and tracks pedestrians in video sequences, and then detects faces in the pedestrian bounding box. After the normalization, gray scaling, histogram equalization and dimensionality reduction on these face images, the extracted features are sent to the server and matched with the data previously stored in the dataset. At last, the server returns the recognition results to the agent. When the server sends a request for ending the task to the agent, the agent terminates the current face recognition module; when the server sends the request to disconnect, the agent stops sending video streams and keeps the waiting state. Besides, the distributed framework could enhance the security because the recognition results are only returned to the agent with the right to view the results, and different permissions of agents have different impacts on the face recognition results.