Tracking Human Motions in Photographing 29:11 Body Level Arm Level Wrist Level Ss: S S3: Rotating the phone Motionlessness Lifting up the arm So: Fine-tuning S2: Body movement: S4: e.g..walking. Laying down the arm jogging,etc. S7: Shotting Fig.8.The activity state machine. Here.If the variancesis below the corresponding threshold,that is,satisfy- ing Equation(3),then the window will be regarded as the start/end segment of an activity, as the pause window A,B,D shown in Figure 6.The left side of the window is regarded as the end point of the last activity,while the right side of the window is regarded as the start point of the next activity.Based on extensive observations,we set ea to 1,and set the size the sliding pause window wp to 0.5s, sa Ea. (3) -Step 2:We move the sliding pause window with the step lengthI=wp represents 0.5s.If two sliding windows have overlaps and are both regarded as start/end segments, then it may indicate that micro activities (or motionlessness)occur.At this time,we will use the corresponding gyroscope data in the pause window to calculate the variancess as described in Step 1.Similarly,if the variances satisfy Equation(4),the window will be regarded as the stat/end segment of an micro activity(or continuous pauses).Otherwise,the sliding window will keep moving forward until it finds the pause between micro activities, as shown in Figure 7.Based on extensive observations,we set e to 0.012: sg Eg (4) -Step 3:For a detected pause,it indicates the end of last activity and the start of next activity. Therefore,when we detect a pause,we start a new activity window to obtain the sensor data of the following activity.As shown in Figure 6,we mark the activity window with a rectangle Z.Obviously,an activity window represents a potential activity.We recognize the user's activity in the activity window and adopt the corresponding energy-saving strategy until the next pause occurs.Based on extensive observations,we set the size wa of the activity window to 2s,because 2s is usually enough to obtain the features of an activity, as shown in Figure 6.If the next pause without overlaps occurs in 2s,then we adaptively change wa to the duration between two consecutive pauses. 4.1.4 Recognition among Different Levels.When we get sensor data of an activity,we should first know which level the activity belongs to,then we can recognize the activity in the corre- sponding level.To describe the relationship between the levels and activities,we introduce an activity state machine,as shown in Figure 8.In the state machine,each activity is represented as a state,and the states are classified into three levels accordingly.Considering the behavior features during photographing,the user cannot transfer from one state to any other state arbitrarily.For ACM Transactions on Sensor Networks,Vol.13,No.4,Article 29.Publication date:September 2017Tracking Human Motions in Photographing 29:11 Fig. 8. The activity state machine. Here, a = 1 n n i=1 ai . If the variance s2 a is below the corresponding threshold, that is, satisfying Equation (3), then the window will be regarded as the start/end segment of an activity, as the pause window A, B, D shown in Figure 6. The left side of the window is regarded as the end point of the last activity, while the right side of the window is regarded as the start point of the next activity. Based on extensive observations, we set ϵa to 1, and set the size the sliding pause window wp to 0.5s, s2 a < ϵa . (3) —Step 2: We move the sliding pause window with the step length l = wp 2 , wp represents 0.5s. If two sliding windows have overlaps and are both regarded as start/end segments, then it may indicate that micro activities (or motionlessness) occur. At this time, we will use the corresponding gyroscope data in the pause window to calculate the variances s2 д, as described in Step 1. Similarly, if the variances satisfy Equation (4), the window will be regarded as the stat/end segment of an micro activity (or continuous pauses). Otherwise, the sliding window will keep moving forward until it finds the pause between micro activities, as shown in Figure 7. Based on extensive observations, we set ϵд to 0.012: s2 д < ϵд . (4) —Step 3: For a detected pause, it indicates the end of last activity and the start of next activity. Therefore, when we detect a pause, we start a new activity window to obtain the sensor data of the following activity. As shown in Figure 6, we mark the activity window with a rectangle Z. Obviously, an activity window represents a potential activity. We recognize the user’s activity in the activity window and adopt the corresponding energy-saving strategy until the next pause occurs. Based on extensive observations, we set the size wa of the activity window to 2s, because 2s is usually enough to obtain the features of an activity, as shown in Figure 6. If the next pause without overlaps occurs in 2s, then we adaptively change wa to the duration between two consecutive pauses. 4.1.4 Recognition among Different Levels. When we get sensor data of an activity, we should first know which level the activity belongs to, then we can recognize the activity in the corresponding level. To describe the relationship between the levels and activities, we introduce an activity state machine, as shown in Figure 8. In the state machine, each activity is represented as a state, and the states are classified into three levels accordingly. Considering the behavior features during photographing, the user cannot transfer from one state to any other state arbitrarily. For ACM Transactions on Sensor Networks, Vol. 13, No. 4, Article 29. Publication date: September 2017