Skip to main content
. 2016 Jan 28;16(2):161. doi: 10.3390/s16020161
Algorithm 1. The online segmentation process
Initial: Start one segment from the frame start, let Fstart and denote the feature vector of the frame and the sign of Ed(start), respectively.
For each feature vector Fi (The subscript i indicate the frame index) 
   Step 1: Compute the potential difference Ed(i) and its sign Si. 
   Step 2: 
   If Si==Sstart 
     If istart>LPmax&Sstart==0 /*LPmax is the maximal length of pose feature segments. */ 
	 Complete the segment at the frame i–1; /* Pose feature segments. */ 
     Else 
	 Continue; 
     End 
   Else /* SiSstart */ 
     If istart<LMmin&Sstart0 /*LMmin is the minimal length of motion feature segments. */
	 Sstart=Sj; /* Eliminate tiny motion feature segments. */ 
	 Continue; 
     Else
	 Complete the segment at the frame i1; /* The segment type is decided by Sstart. */ 
	 If SiSstart==1 /* Two adjacent motion feature segments */ 
             Insert one pose feature segment which is only composed of the features Fi1 and Fi; 
	 End 
     End 
  End
  Step 3: Start one new segment from the frame i, let Fstart=Fj and Sstart=Sj;
End