The present invention relates to an object tracking method, and more particularly to an object tracking method using spatial-color statistical model.
For safety purpose, intelligent video surveillance system is developed rapidly in recent years. There have been many surveillance systems applied to our surrounding environments, such as airports, train stations, shopping malls, and even private residential areas where tight or great security is required. Intelligent video surveillance systems can identify objects within the frames. For monitoring various events in real time, e.g. motion detection, tracking objects within frames is a necessary procedure, but the accuracy is somewhat unsatisfactory.
The feature used for tracking moving objects includes color, bounding box (position and size), etc. An appearance model is established by collecting the feature of object. After comparing the appearance model within different frames, the relation between the position of the object and time depicts the moving track.
Some object tracking methods have been proposed, e.g. in U.S. Pat. No. 6,574,353, U.S. Pat. No. 6,226,388, U.S. Pat. No. 5,845,009 and U.S. Pat. No. 6,674,877, incorporated herein for reference. In a non-segmentation based approach, templates are established manually to track objects by template matching. This approach, however, cannot be performed automatically. In a video segmentation based approach, objects are extracted from frames. Then, the pixels belonging to one object are assigned with unique label. According to the assigned labels, bounding boxes are obtained.
To identify an object, a color statistical model is the most widely used model. The color values in the bounding box are analyzed to obtain probability distributions of color parameters including R, G, B in the bounding box. These probability distributions can be expressed by distribution model, for example, Gaussian distribution. The color probability distributions in the bounding box are simulated with a mixture of Gaussian models. Hence, the color probability distributions can be easily expressed by parameters (average μ and variance σ2) defining the Gaussian models. The memory required for recording the parameters is very limited. When two bounding boxes in different masks have similar distribution parameters, they are considered as the same object.
Referring to
Therefore, there is a need of providing an efficient object tracking method, which can accurately identify objects especially when there is interaction between multiple objects.
The present invention provides an object tracking method using spatial-color statistical model. The object tracking method can track an object in different frames. A first object extracted from a first frame and a second object extracted from a second frame are compared according to the following steps. At first, the first object and the second object are divided into several first blocks and several second blocks according to pixel parameters of each pixel within the first object and the second object. The first blocks are compared with the second blocks to find the corresponding relation therebetween. The second object is identified as the first object according to the corresponding relation.
In an embodiment, the pixel parameters include at least one color parameter such as (R, G, B) value and at least one position parameter such as (X, Y) coordinate. The spatial-color statistical model is probability distribution, Gaussian distribution for example.
A method for dividing a plurality of pixels of an object into a plurality of blocks is also provided. At first, a plurality of spatial-color statistical models corresponding to the blocks are established. Then, pixel parameters of each pixel of the object are compared with the spatial-color statistical models. If the pixel parameters of one pixel substantially fit a specific spatial-color statistical model, the pixel participates the block corresponding to the specific spatial-color statistical model and the spatial-color statistical model is updated to add the factor relating to the pixel.
A method for constructing a bounding box of an object is further provided. The object is divided into several blocks. If one block includes a portion of other object, the block is discarded. The remained blocks are combined to generate a bounding box of the object.
The above contents of the present invention will become more readily apparent to those ordinarily skilled in the art after reviewing the following detailed description and accompanying drawings, in which:
The present invention will now be described more specifically with reference to the following embodiments. It is to be noted that the following descriptions of preferred embodiments of this invention are presented herein for purpose of illustration and description only. It is not intended to be exhaustive or to be limited to the precise form disclosed.
Before tracking an object in different frames, the object should be extracted from the frames. At first, a binary mask obtained by an adaptive background subtraction specifies whether a pixel belongs to the background or foreground. The foreground pixels are analyzed to get connected components. Connected component labeling algorithm is performed to group connected pixels and assigning a unique label for the connected pixels to extract the object. Please refer to
In one embodiment, dividing the object into several blocks is performed by establishing statistical models of the blocks, especially using spatial-color statistical model. It is assumed that each pixel has three color parameters (R, G, B) and two position parameters (X, Y), which form a five-dimensional space. Each block can be expressed by a probability distribution constructed by the pixels within the block. In this embodiment, Gaussian distribution is taken for example to explain the establishment of the blocks. The representative value of Gaussian distribution is average μ. In a mathematic form, a pixel p is expressed as:
p=[Rp, GP, Bp, Xp, Yp]T (1)
And object P is a set of n pixels:
P{p1, p2, p3, . . . , pn} (2)
The overall probability distribution of object P can be simulated by K probability distributions:
Wherein αi is mixing parameter meeting
If parameters (R, G, B, X, Y) of a pixel are close to an overall Gaussian distribution average μi of a block, the pixel is considered as one member of the block. Accordingly, for each pixel, the system finds one of the overall Gaussian distribution average μi which is closest to the pixel parameter pj:
i=min[pj−μi]−1 (4)
Now, for the found i, a determination is made to judge whether the difference between the pixel parameter and the Gaussian distribution average is small enough. A threshold value is predetermined for the comparison. If the difference is less than the threshold value, the pixel is determined to belong to the corresponding block. Then, the corresponding overall Gaussian distribution is updated to include the pixel based on the following equations:
μi′=μi+ω·(p−μi) (5)
σi2′=σi2+ω·[(p−μi)·(p−μi)−σi2] (6)
Please note that the pixel parameters include both color parameters and position parameters. Hence, adjacent pixels with similar color are grouped in one block. The blocks are more suitable than the whole object for later analysis.
Please refer to
These steps repeat till all the pixels are classified into proper blocks (steps 314 and 316). According to the present invention, the extracted object can be easily and automatically divided into blocks for further analysis or tracking.
Please refer to
If a difference between the current second block and a particular first block is less than the predetermined threshold value, the current second block is considered as corresponding to the particular first block (step 414). However, if the current second block corresponds more than one blocks, the current second block may include block of other object (step 416). Therefore, the current second block is also discarded (step 410). Otherwise, one-to-one corresponding relation is established between the second blocks and the first blocks (step 418). The steps repeat till all the second blocks have been compared (step 420 and 412). The remained second blocks are combined to construct a bounding box of the second object which corresponds to the first object in the earlier frame (step 422) so as to achieve object tracking of the first object in different frames.
The above-described procedure is applied to the example shown in
In the later frame 600, the two objects 501 and 503 touches each other. In the prior art, one bounding box is generated and the bounding box includes the two objects 501 and 503. According to the present invention, for analyzing the frame 600, the objects 501 and 502 are automatically divided into blocks 6021, 6023, 6024, 6026, 6041, 6043, 6044, 606 and 608. According to the procedure of
Besides, the block 606 corresponds to both the block 5022 and the block 5042 (step 416). Therefore, the block 606 is discarded at step 410. Similarly, since the block 608 corresponds to both the block 5027 and the block 5045, the block 608 is also discarded. The remained blocks can construct the object bounding box. For example, the bounding box 602 is composed of blocks 6021, 6023, 6024 and 6026; while the bounding box 604 is composed of blocks 6041, 6043 and 6044. Accordingly, even though multiple objects interact with each other, the objects can be accurately tracked according to the present invention.
From the above description, the present object tracking method utilizes the concept of breaking the whole into parts to efficiently exhibit the features of blocks instead of the whole object. This method is particularly practical for tracking multiple objects with interaction. Besides, a spatial-color statistical model is used to focus on features locally. It is to be noted that other statistical models may be useful and the statistical model does not limited to Gaussian distribution or normal distribution. The interference caused by other object can be removed by discarding the interfered blocks so as to achieve more accurate tracking.
While the invention has been described in terms of what is presently considered to be the most practical and preferred embodiments, it is to be understood that the invention needs not to be limited to the disclosed embodiment. On the contrary, it is intended to cover various modifications and similar arrangements included within the spirit and scope of the appended claims which are to be accorded with the broadest interpretation so as to encompass all such modifications and similar structures.
Number | Date | Country | Kind |
---|---|---|---|
097121630 | Jun 2008 | TW | national |