Skip to main content
. 2018 May 29;18(6):1746. doi: 10.3390/s18061746
Algorithm 1 Overall algorithm with the proposed method
Input: An image sequence from a depth information video
Output: An image sequence where touching-pigs are individually separated
// Load a depth information video
Seq=Load(depth_video)
// Remove noises in depth images
SeqInterpolate=SpatioTemporalInterpolate(Seq)
// Perform background subtraction
SeqBS=BackgroundSubtract(SeqInterpolate)
// Detect moving pigs only
SeqGMM=GMM(SeqBS)
// Separate touching-pigs using the proposed method
for (i=1; i the number of connected components in SeqGMM; i++) 
  If size of each connected component Iini(SeqGMM) > size of a single pig
    Go to YOLO Processing Module with Iini(SeqGMM)
    Save the separated results of the touching-pigs
Return;