Abstract: The invention discloses a method for moving targets tracking and number counting, comprising the steps of: a). acquiring continuously the video images comprising moving targets; b). acquiring the video image of a current frame, and pre-processing the video image of the current frame; c). segmenting the target region of the processed image, and extracting the target region; d). matching the target region of the current frame obtained in step c) with that of the previous frame based on an online feature selection to establish a match tracking link; and e). determining the number of the targets corresponding to each match tracking link based on the target region tracks recorded by the match tracking link.