## 2 The Overview of Our Proposed Loitering Detection Method  
Figure 1 shows the overall framework of our proposed loitering detection method. According to different scenarios, the method analyzes and calculates the size of the target activity area using the best adaptive fitting curve for loitering detection. An automatic alarm will be performed when loitering behavior occurs.  
Figure 1: The overall framework of loitering detection method.  
The previous research was based on simple scenarios and lacks reliability. This paper redefines and classifies loitering through the new perspective of pedestrian activity area. In the analysis of loitering in various situations, pedestrian activity areas were used to divide loitering behavior into three categories.  
In the spacious and wide scene, normal pedestrians usually walk straight line with a strict goal [47]; the suspects are aimless. They keep loitering with a complex and disordered trajectory in order to not to be noticed. Figure 2 shows a rectangle loitering in the real scene. Through the trajectory map and analysis of suspicious target trajectory, the target's area of motion is completely in the red rectangle. So, we call this type of loitering as rectangle loitering within a rectangle area.  
In some small spaces, suspects with abnormal behavior loiter in a narrow area with back-and-forth movement. However, when the area of activity decreases, the distribution of target trajectory is dispersed, and the trajectory coordinate change greatly and discrete. The rectangular analysis method not satisfy this kind of small area movement, which will miss the judgment of loitering behavior. Figure 3 shows the different detection methods used for fitting the loitering in the same situation. The rectangle frame and ellipse frame were used to fit the same area of activity, and the shaded area was the difference of the area. So, it is necessary to propose ellipse detection in order to improve the accuracy of detection. Aiming at the narrow moving scene and the large return distance of target trajectory, an ellipse area fitting method is proposed. The trajectory of the suspect will constantly change. We first detected the convex hulls of all the trajectory points, and then used the ellipse fitting to solve the problem of uncertainty in the active area and the irregularity of the trajectory.  
In some occasions, the suspects, such as thieves or drug dealers, are purposefully loitering around points of interest. [PERSON] [13] the author claims that the suspect's motion is purposeful, for example, drug dealers focusing on the goals of interest, purposeful round trip loitering, to achieve drug dealing  
Figure 3: Ellipse loitering. (**a**) The ellipse detection method and rectangle detection method fitting the trajectory of simulation. (**b**) Ellipse loitering in real scene.  
Figure 2: Rectangle loitering. (**a**) A loitering in the real scene. (**b**) The trajectory simulation map corresponding.  
or stealing. This is very similar to the reality of the detection of dropped objects [48]. From the perspective of the mathematical model for analysis, this kind of activity area is similar to a sector. A sector loitering example is shown in Figure 4. The pedestrians' activity area is fitted with a red sector which contains the motions of the pedestrian. We call this type of loitering as a sector loitering around a point in a sector area.