| To get the real-time population flows in entrances and exits has important significance for reasonable resource scheduling and security. The traditional people counting methods due to low efficiency, low accuracy and other shortcomings can not meet the practical requirements,people counting system based on digital image processing technology is receiving more and more attention, the system has been widely used because of its characteristics of intelligent and high working efficiency,the system’s application prospect is also broad.In order to minimize the mutual occlusion between the moving targets, the people counting system this paper designed approximate vertically placing a monocular camera to capture images, this paper choose background subtraction method to detect the foreground and update the background model in real time with the improved sliding average method, and then transform the foreground image into HSV space to eliminate the detection of shadows.Lots of information of foreground target will missing when the pixel value deviation between foreground target and the local background is too small, to solve the problem, this paper propose an adaptive merging algorithm for foreground region, then fill the holes inside the foreground target. A segmentation algorithm based on the city distance transformation is proposed to solve the problem of multi-objective across the entrances and exits in a time, the adhesion targets are effectively divided into several single targets.To classify targets after divided as pedestrian and non-pedestrian goals. This paper extract the targets’ length, width, area and other information to do preliminary judgment, then use the Hough circle transform algorithm to extract the head feature, and add the target gait movement cycle characteristics as the pedestrian judgment basis to increase pedestrian correct recognition rate. Finally, this paper use the Kalman filter to predict the motion range, then use the objective cost function based on centroid and duty cycle performing interframe match, depict the tracking trajectory, analyze the trajectory to achieve the number of people counting systems.Through the experimental test of sampling video, the number of people counting systems proposed in this paper has good robustness to illumination change and noise interference, the extracted foreground has a high quality, and the adhesion target can be effectively divided into several single targets even though there has much adhesion. In pedestrian target recognition stage, gait movement characteristics to improve the correct recognition rate especially for the female targets and targets whose head are failed to extract for the interference of jewelry or when the clothing color similar to the hair color. Finally, the stable tracking of’ single target after segmentation is realized, and the pedestrian target is counted only. Experiments show that the proposed algorithm can approximate to meet the real-time requirements of video processing. |