Mathematical Problems in Engineering / 2014 / Article / Alg 2

Research Article

Sensor Selection and Integration to Improve Video Segmentation in Complex Environments

Algorithm 2

Pseudocode of the proposed algorithm.
Determine the maximum motion dynamic expected per image in the form of pixel radius
FOR  (each frame in the image sequence)
   (i) Perform fuzzy rule-based technique
   (ii) Perform connected component analysis on result of fuzzy rule-based technique
  IF  (current frame is the first frame in sequence to contain object of interest)
    Store all components detected by connected component analysis
     Each component stored has the following auxiliary information:
      (i) All pixels included in the component
      (ii) Centroid of the component
      (iii) Eight extrema points on the edge of the component
  Else
    FOR  (each new component detected)
      FOR  (each of the sorted components from previous frame)
         FOR  (each of the extrema points of stored components)
           FOR  (each pixel included in the current new component)
              Calculate the distance from current extrema point to current
              pixel in current new component
            IF  (distance < max motion dynamic expected)
              (i) Store current new component and auxiliary
               information for subsequent frames
              (ii) Break to next new component
            END-IF
           END-FOR
         END-FOR
      END-FOR
      IF  (frame processed in a multiple of 20)
         Calculate the total distance travelled by the current new component
       IF  (distance travelled is greater than user-defined threshold)
          Store current new component and auxiliary information for
          subsequent frames
       ELSE
          Discard the current new component
       END-IF
      END-IF
    END-FOR
  END-IF
END-FOR