Algorithm 1. The online segmentation process |
Initial: Start one segment from the frame , let and denote the feature vector of the frame and the sign of , respectively.
For each feature vector (The subscript indicate the frame index)
Step 1: Compute the potential difference and its sign .
Step 2:
If
If /* is the maximal length of pose feature segments. */
Complete the segment at the frame i–1; /* Pose feature segments. */
Else
Continue;
End
Else /* */
If /* is the minimal length of motion feature segments. */
; /* Eliminate tiny motion feature segments. */
Continue;
Else
Complete the segment at the frame ; /* The segment type is decided by . */
If /* Two adjacent motion feature segments */
Insert one pose feature segment which is only composed of the features and ;
End
End
End
Step 3: Start one new segment from the frame i, let and ;
End |