1. A method for acquiring headcount, comprising: acquiring data frames from a surveillance video, setting object models, each being a set of matched characteristics of a person and corresponding to a shape of the person in different state, in the data frames, and extracting a foreground image from the data frames, wherein the foreground image comprises moving objects extracted from the data frames; matching the moving objects in the foreground image with the object models, acquiring the headcount in corresponding data frames according to a result of the matching, extracting characteristics of the matched moving objects, and tracking the corresponding moving objects based on the characteristics; and acquiring the actual headcount for a predetermined time segment of the surveillance video based on a result of the tracking and the acquired headcount for each of the data frames, wherein the result of the tracking comprises: an indication of whether some or all of the data frames includes a same moving object or not, wherein the method further comprises: setting, through an interface of the surveillance video, a detection line in the data frames after acquiring data frames from the surveillance video, wherein the result of the tracking further comprises: a moving track of the same moving object in some or all of the data frames; accordingly, wherein the method further comprises: after acquiring the actual headcount for the predetermined time segment of the surveillance video, and acquiring the actual headcount in different directions for the predetermined time segment of the surveillance video based on the result of the tracking and position of the tracked moving objects relative to the detection line, comprising: when detecting one of the tracked moving objects moves from one side of the detection line to another side, increasing the headcount in a corresponding direction by 1.