Tracking Human Motions in Photographing 29:13 Sensor data Linear-acc, gyroscope data Which level it belongs to Variance,periodicity Negligible variance, Large variance in linear-acc and Low variance in linear-acc,moderate or periodical change gyroscope data,no periodicity variance ingyroscope data Activity Recognition in Activity Recognition in Activity Recognition in Body Level Arm Level Wrist Level (motionlessness,body movement) (arm up,arm down) (rotating,tuning,shooting) Fig.10.Activity recognition among different levels. For arm level,the user lifts up the arm or lays down the arm.There are no periodicity of consecutive activities,for example,the user cannot continuously lift up the arm.Therefore,if the activity does not satisfy Equations(3),(4),and(5),it will be classified into arm level.For wrist level,the user rotates the phone,makes fine-tuning,shoots a photo.The micro movements of the phone satisfy Equation(3)while not satisfying Equation(4).Without loss of generality,we assume the initial activity of the user belongs to body level.That is to say,before the phone runs our scheme "SenSave,"the user is motionless or keeping moving (e.g.,walking,jogging).The process of activity recognition among three levels is shown in Algorithm 1.When we know which level the current activity belongs to,then we can do activity recognition in the corresponding level,as described in Section 4.1.5. ALGORITHM 1:Recognition among Three Levels Input:Activity segment Ai. Output:Classified level Li. Calculate the variance s2 of linear-acc of Ai with Equation(2). Calculate the variance s of gyroscope data of Ai like Equation(2). if s2 satisfies Equation(3)and s2 satisfies Equation (4)then LClassify Ai into Body Level and recognize the activity as motionlessness. if sa dissatisfies Equation(3)and s dissatisfies Equation(4)then if Period tp of Ai satisfies Equation(5)then LClassify Ai into Body level and recognize it in body movement. else L Classify Ai into Arm level. if sa satisfies Equation (3)and sa dissatisfies Equation(4)then LClassify A;into Wrist level. Ruturn the classified level Li. 4.1.5 Activity Recognition in Each Level.According to Section 4.1.4 and Figure 9,the activities in different levels usually have different features in sensor data.For body-level activities,they usually have large variation in linear-acc and gyroscope data.For arm level activities,we need to combine linear-acc and gravity data to distinguish the lifting-up activity and laying-down activity. For wrist level activities,we combine linear-acc and gyroscope data to distinguish the three micro ACM Transactions on Sensor Networks,Vol.13,No.4,Article 29.Publication date:September 2017.Tracking Human Motions in Photographing 29:13 Fig. 10. Activity recognition among different levels. For arm level, the user lifts up the arm or lays down the arm. There are no periodicity of consecutive activities, for example, the user cannot continuously lift up the arm. Therefore, if the activity does not satisfy Equations (3), (4), and (5), it will be classified into arm level. For wrist level, the user rotates the phone, makes fine-tuning, shoots a photo. The micro movements of the phone satisfy Equation (3) while not satisfying Equation (4). Without loss of generality, we assume the initial activity of the user belongs to body level. That is to say, before the phone runs our scheme “SenSave,” the user is motionless or keeping moving (e.g., walking, jogging). The process of activity recognition among three levels is shown in Algorithm 1. When we know which level the current activity belongs to, then we can do activity recognition in the corresponding level, as described in Section 4.1.5. ALGORITHM 1: Recognition among Three Levels Input: Activity segment Ai . Output: Classified level Li . Calculate the variance s2 a of linear-acc of Ai with Equation (2). Calculate the variance s2 д of gyroscope data of Ai like Equation (2). if s2 a satisfies Equation (3) and s2 д satisfies Equation (4) then Classify Ai into Body Level and recognize the activity as motionlessness. if s2 a dissatisfies Equation (3) and s2 д dissatisfies Equation (4) then if Period tp of Ai satisfies Equation (5) then Classify Ai into Body level and recognize it in body movement. else Classify Ai into Arm level. if s2 a satisfies Equation (3) and s2 д dissatisfies Equation (4) then Classify Ai into Wrist level. Ruturn the classified level Li . 4.1.5 Activity Recognition in Each Level. According to Section 4.1.4 and Figure 9, the activities in different levels usually have different features in sensor data. For body-level activities, they usually have large variation in linear-acc and gyroscope data. For arm level activities, we need to combine linear-acc and gravity data to distinguish the lifting-up activity and laying-down activity. For wrist level activities, we combine linear-acc and gyroscope data to distinguish the three micro ACM Transactions on Sensor Networks, Vol. 13, No. 4, Article 29. Publication date: September 2017