We propose a novel method, called segmentation by temporal detection integration (STDI), to improve the segmentation results of background subtraction. The STDI applies split and merge algorithms forwardly and backwardly to obtain appropriate region segmentations based on the integration of the temporal detections across frames. The proposed scheme can be applied to human detection and tracking to avoid the situations that a group of people being detected as one single segment or a human body being separated into fragments, thus making the subsequent human tracking more reliable. To verify the performance of the proposed STDI, a dynamic layer model is used to depict motion, appearance, and shape of detections for human tracking. Experimental results show that the proposed STDI significantly improves the background subtraction segmentation results, and therefore, the accuracy of human tracking.