The complex background will greatly affect the test accuracy of human detection. In order to improve the accuracy of human detection,in this paper a new method of Foreground Segmentation has been proposed. This method is divided into two phases, in the sample training phase,through Oriented Watershed Transform and Ultrametric Contour Map,many closed regions in the image can be got,then we compare these closed regions with a box which has been set,and determine these closed regions is foreground or not. The foreground in the image can be got and trained. During the testing phase,the area in the test image which need to be detected can be segmentalized and the foreground can be got,then we can get the HOG of the foreground. By SVM,we know that there is a human in the area or not. So the foreground characteristic can be calculated which have no background noise in the sample training phase and testing phase. The experimental results show that this approach is effective in improving detection accuracy.