An object is tracked among a plurality of image frames. In an initial frame an operator selects an object. The object is distinguished from the remaining background portion of the image to yield a background and a foreground. A model of the background is used and updated in subsequent frames. A model of the foreground is used and updated in the subsequent frames. pixels in subsequent frames are classified as belonging to the background or the foreground. In subsequent frames, decisions are made, including: which pixels do not belong to the background; which pixels in the foreground are to be updated; which pixels in the background were observed incorrectly in the current frame; and which background pixels are being observed for the first time. In addition, mask filtering is performed to correct errors, eliminate small islands and maintain spatial and temporal coherency of a foreground mask.
|
25. An apparatus for tracking an object among a plurality of image frames, the apparatus receiving an initial estimate of the object for an initial image frame, the apparatus comprising:
a background model of values for a plurality of background pixels which have been observable in at least three consecutive image frames;
a first processor which predicts a background value for said each one pixel based upon a predicted background value of said each one pixel from the prior image frame, a pixel value of said each one pixel from the current image frame, and a mixing factor for weighting the background value of said one pixel from the prior image frame;
a second processor which classifies each one pixel of the current image frame as being a background pixel or a foreground pixel based on the background model, the current image frame, and at least one of a prior image frame or a subsequent image frame, the processor identifying a background mask for the current image frame; and
a foreground mask for the current image frame formed as being pixels not in the background mask for said current image frame, wherein the object being tracked is identified as corresponding to the pixels within the foreground mask of the current image frame.
8. An apparatus for tracking an object among a plurality of image frames, the apparatus receiving an initial estimate of the object for an initial image frame, the object moving relative to a background, wherein portions of the background that are initially hidden, become observable during tracking, the apparatus comprising:
a background model derived from the plurality of image frames, wherein for each image frame, background pixels within an observable portion of the background are identified, and wherein an identified background pixel is included in the background model only after being observable within the background for at least three consecutive image frames;
a processor which classifies each one pixel of the current image frame as being a background pixel or a foreground pixel based on a current state of the background model, the current image frame, and at least one of a prior image frame or a subsequent image frame, the processor identifying a background mask for the current image frame; and
a foreground mask for the current image frame formed as being pixels not in the background mask for said current image frame, wherein the object being tracked is identified as corresponding to the pixels within the foreground mask of the current image frame.
15. A method for tracking an object among a plurality of image frames, the method comprising the steps of:
defining a background mask for each one frame among a plurality of image frames, including a current image frame, the background mask of a given image frame comprising background pixels, the background pixels of the given image frame being observable for the given image frame;
maintaining a background model of background pixels which have been observable in at least three consecutive image frames by predicting, for each one pixel of a current image frame, a background value for said one pixel based upon a predicted background value of said one pixel from the prior image frame, a pixel value of said one pixel from the current image frame, and a mixing factor for weighting the background value of said one pixel from the prior image frame;
classifying each one pixel of the current image frame as being a background pixel or a foreground pixel based on the background model, the current image frame, and at least one of a prior image frame and a subsequent image frame;
defining a foreground mask for the current image frame as being pixels not in the background mask for said current image frame; and
identifying the object as being the pixels within the foreground mask for the current image frame.
26. An apparatus for tracking an object among a plurality of image frames, the apparatus receiving an initial estimate of the object for an initial image frame, the apparatus comprising:
a background model of values for a plurality of background pixels which have been observable in at least three consecutive image frames;
a processor which classifies each one pixel of the current image frame as being a background pixel or a foreground pixel based on the background model, the current image frame, and at least one of a prior image frame or a subsequent image frame, the processor identifying a background mask for the current image frame; and
a foreground mask for the current image frame formed as being pixels not in the background mask for said current image frame, wherein the object being tracked is identified as corresponding to the pixels within the foreground mask of the current image frame;
wherein the processor identifies an event from the group of events comprising: prospectively include said one pixel in the background mask for the current image frame; motion is detected in the immediate past for said one pixel; motion is detected in the immediate future for said one pixel; prospectively include said one pixel in the foreground pixel for the current image frame; and said one pixel is not to be updated in the background model.
1. A method for tracking an object among a plurality of image frames, the object moving relative to a background, wherein portions of the background that are initially hidden, become observable during tracking, the method comprising the steps of:
defining a background mask for each one frame among a plurality of image frames, including a current image frame, the background mask of a given image frame comprising background pixels, the background pixels of the given image frame being within observable portions of the background for the given image frame;
deriving a background model from the plurality of image frames, wherein for each image frame, background pixels within an observable portion of the background are identified, and wherein an identified background pixel is included in the background model only after being observable within the background for at least three consecutive image frames;
classifying each one pixel of the current image frame as being a background pixel or a foreground pixel based on the background model, the current image frame, and at least one of a prior image frame and a subsequent image frame;
defining a foreground mask for the current image frame as being pixels not in the background mask for said current image frame; and
identifying the object as being the pixels within the foreground mask for the current image frame.
19. A method for tracking an object among a plurality of image frames, the method comprising the steps of:
defining a background mask for each one frame among a plurality of image frames, including a current image frame, the background mask of a given image frame comprising background pixels, the background pixels of the given image frame being observable for the given image frame;
maintaining a background model of background pixels which have been observable in at least three consecutive image frames;
classifying each one pixel of the current image frame as being a background pixel or a foreground pixel based on the background model, the current image frame, and at least one of a prior image frame and a subsequent image frame;
defining a foreground mask for the current image frame as being pixels not in the background mask for said current image frame; and
identifying the object as being the pixels within the foreground mask for the current image frame;
wherein the step of classifying comprises identifying an event from the group of events comprising: prospectively include said one pixel in the background mask for the current image frame; motion is detected in the immediate past for said one pixel; motion is detected in the immediate future for said one pixel; prospectively include said one pixel in the foreground pixel for the current image frame; and said one pixel is not to be updated in the background model.
27. An apparatus for tracking an object among a plurality of image frames, the apparatus receiving an initial estimate of the object for an initial image frame, the apparatus comprising:
a background model of values for a plurality of background pixels which have been observable in at least three consecutive image frames;
a processor which classifies each one pixel of the current image frame as being a background pixel or a foreground pixel based on the background model, the current image frame, and at least one of a prior image frame or a subsequent image frame, the processor identifying a background mask for the current image frame; and
a foreground mask for the current image frame formed as being pixels not in the background mask for said current image frame, wherein the object being tracked is identified as corresponding to the pixels within the foreground mask of the current image frame;
wherein the processor identifies an event from the group of events comprising: prospectively include said one pixel in the background mask for the current image frame; a first degree of motion is detected in the immediate past for said one pixel; the first degree of motion is detected in the immediate future for said one pixel; a second degree of motion is detected in the immediate past for said one pixel; the second degree of motion is detected in the immediate future for said one pixel; prospectively include said one pixel in the foreground pixel for the current image frame; and said one pixel is not to be updated in the background model.
22. A method for tracking an object among a plurality of image frames, the method comprising the steps of:
defining a background mask for each one frame among a plurality of image frames, including a current image frame, the background mask of a given image frame comprising background pixels, the background pixels of the given image frame being observable for the given image frame;
maintaining a background model of background pixels which have been observable in at least three consecutive image frames;
classifying each one pixel of the current image frame as being a background pixel or a foreground pixel based on the background model, the current image frame, and at least one of a prior image frame and a subsequent image frame;
defining a foreground mask for the current image frame as being pixels not in the background mask for said current image frame; and
identifying the object as being the pixels within the foreground mask for the current image frame; and
wherein the step of classifying comprises identifying an event from the group of events comprising: prospectively include said one pixel in the background mask for the current image frame; a first degree of motion is detected in the immediate past for said one pixel; the first degree of motion is detected in the immediate future for said one pixel; a second degree of motion is detected in the immediate past for said one pixel; the second degree of motion is detected in the immediate future for said one pixel; prospectively include said one pixel in the foreground pixel for the current image frame; and said one pixel is not to be updated in the background model.
2. The method of
3. The method of
4. The method of
5. The method of
6. The method of
7. The method of
9. The apparatus of
10. The apparatus of
11. The apparatus of
12. The apparatus of
13. The apparatus of
14. The apparatus of
16. The method of
17. The method of
18. The method of
20. The method of
21. The method of
23. The method of
24. The method of
|
This invention relates to digital graphics, and more particularly to a method and apparatus for digital image object tracking and segmentation.
In composing and manipulating digital images for providing special effects in movie and video clips and for a variety of other imaging and graphics applications, image objects are identified and tracked. In movies, for example, image objects are inserted or manipulated to alter a scene in a realistic manner. Objects or regions from still frames or photographs are inserted into a sequence of frames to create a realistic image sequence.
Segmentation is a technique in which an object within an image is traced so that it may be extracted. Among the earliest segmentation methods is a manual method in which an operator manually selects points along a boundary of the object to outline the image. The points then are connected to formed a closed object. For example, straight lines have been used to connect the points. The more points selected the more accurate the outline.
An active contour based segmentation process improves on the manually selected rough approximation using an edge energy function. The edge energy function is computed based on a combination of internal forces relating to curve energy and external forces related to image gradient magnitude. The active contour minimizes the edge energy function to approximate the object boundary in an iterative process.
One shortcoming of edge based tracking and segmentation methods is the difficulty in identifying video objects or object portions with a rapidly changing shape. For example tracking a human leg during a scene where the person is walking is difficult because the shape of the leg is continually changing. Difficulties also arise in tracking objects or object portions which are being occluded and disoccluded in various image frames. Accordingly, an alternative approach to object tracking is desired which is able to track rapidly moving objects and objects which are being occluded and disoccluded in various frames.
According to the invention, an object is tracked among a plurality of image frames. In an initial frame an operator selects an object to be tracked. The selected object or a revised estimation of the selected object is distinguished from the remaining background portion of the image to yield a background mask and a foreground mask. The foreground mask corresponds to the object to be tracked. A model of the background mask is used and updated in subsequent frames, and a model of the foreground mask is used and updated in subsequent frames. Pixels in subsequent frames are classified as belonging to the background or the foreground.
In each subsequent frame, decisions are made, including: which pixels do not belong to the background; which pixels in the foreground (based on the original image) are to be updated; which pixels in the background were observed incorrectly in the current frame; and which background pixels are being observed for the first time. Some of these decisions need not be mutually exclusive of the other decisions.
In addition to classifying pixels, mask filtering is performed to correct errors, eliminate small islands and maintain spatial and temporal coherency of a foreground mask. Object tracking is achieved using a small output delay. In one embodiment a three frame latency is adopted.
An advantage of the invention is that objects having rapidly changes shapes are accurately tracked against a motionless background. Information in prior and future frames is used to detect object motion. the object can change internally and even be self-occluding. Another advantage is that previously unrevealed (i.e., occluded) portions of the background are identified, improving object estimation accuracy. Another advantage is that holes in objects also are tracked accurately.
These and other aspects and advantages of the invention will be better understood by reference to the following detailed description taken in conjunction with the accompanying drawings.
Exemplary Processing Environment
In one embodiment the interactive processing environment 10 is implemented on a programmed digital computer of the type which is well known in the art, an example of which is shown in
In another embodiment the interactive processing environment 10 is implemented in an embedded system. The embedded system includes similar digital processing devices and peripherals as the programmed digital computer described above. In addition, there are one or more input devices or output devices for a specific implementation, such as image capturing.
Software code for implementing the user interface 12 and shell environment 14, including computer executable instructions and computer readable data are stored on a digital processor readable storage media, such as embedded memory, RAM, ROM, a hard disk, an optical disk, a floppy disk, a magneto-optical disk, an electro-optical disk, or another known or to be implemented transportable or non-transportable processor readable storage media. Similarly, each one of the plug-ins 16 and the corresponding API 18, including digital processor executable instructions and processor readable data are stored on a processor readable storage media, such as embedded memory, RAM, ROM, a hard disk, an optical disk, a floppy disk, a magneto-optical disk, an electro-optical disk, or another known or to be implemented transportable or non-transportable processor readable storage media. The plug-ins 16 (with the corresponding API 18) may be bundled individually on separate storage media or together on a common storage medium. Further, none, one or more of the plug-ins 16 and the corresponding API's 18 may be bundled with the user interface 12 and shell environment 14. Further, the various software programs and plug-ins may be distributed or executed electronically over a network, such as a global computer network.
Under various computing models, the software programs making up the processing environment 10 are installed at an end user computer or accessed remotely. For stand alone computing models, the executable instructions and data may be loaded into volatile or non-volatile memory accessible to the stand alone computer. For non-resident computer models, the executable instructions and data may be processed locally or at a remote computer with outputs routed to the local computer and operator inputs received from the local computer. One skilled in the art will appreciate the many computing configurations that may be implemented. For non-resident computing models, the software programs may be stored locally or at a server computer on a public or private, local or wide area network, or even on a global computer network. The executable instructions may be run either at the end user computer or at the server computer with the data being displayed at the end user's display device.
Shell Environment and User Interface
The shell environment 14 allows an operator to work in an interactive environment to develop, test or use various video processing and enhancement tools. In particular, plug-ins for video object segmentation, video object tracking and video encoding (e.g., compression) are supported in a preferred embodiment. The interactive environment 10 with the shell 14 provides a useful environment for creating video content, such as MPEG-4 video content or content for another video format. A pull-down menu or a pop up window is implemented allowing an operator to select a plug-in to process one or more video frames.
In a specific embodiment the shell 14 includes a video object manager. A plug-in program 16, such as a segmentation program accesses a frame of video data, along with a set of user inputs through the shell environment 14. A segmentation plug-in program identifies a video object within a video frame. The video object data is routed to the shell 14 which stores the data within the video object manager module. Such video object data then can be accessed by the same or another plug-in 16, such as a tracking program. The tracking program identifies the video object in subsequent video frames. Data identifying the video object in each frame is routed to the video object manager module. In effect video object data is extracted for each video frame in which the video object is tracked. When an operator completes all video object extraction, editing or filtering of a video sequence, an encoder plug-in 16 may be activated to encode the finalized video sequence into a desired format. Using such a plug-in architecture, the segmentation and tracking plug-ins do not need to interface to the encoder plug-in. Further, such plug-ins do not need to support reading of several video file formats or create video output formats. The shell handles video input compatibility issues, while the user interface handles display formatting issues. The encoder plug-in handles creating a run-time video sequence.
For a Microsoft Windows operating system environment, the plug-ins 16 are compiled as dynamic link libraries. At processing environment 10 run time, the shell 14 scans a predefined directory for plug-in programs. When present, a plug-in program name is added to a list which is displayed in a window or menu for user selection. When an operator selects to run a plug-in 16, the corresponding dynamic link library is loaded into memory and a processor begins executing instructions from one of a set of pre-defined entry points for the plug-in. To access a video sequence and video object segmentations, a plug-in uses a set of callback functions. A plug-in interfaces to the shell program 14 through a corresponding application program interface module 18.
In addition, there is a segmentation interface 44 portion of the user interface 12 which is supported by a segmentation plug-in. The segmentation interface 44 makes calls to a segmentation plug-in to support operator selected segmentation commands (e.g., to execute a segmentation plug-in, configure a segmentation plug-in, or perform a boundary selection/edit).
The API's 18 typically allow the corresponding plug-in to access specific data structures on a linked need-to-access basis only. For example, an API serves to fetch a frame of video data, retrieve video object data from the video object manager, or store video object data with the video object manager. The separation of plug-ins and the interfacing through API's allows the plug-ins to be written in differing program languages and under differing programming environments than those used to create the user interface 12 and shell 14. In one embodiment the user interface 12 and shell 14 are written in C++. The plug-ins can be written in any language, such as the C programming language.
In a specific embodiment each plug-in 16 is executed in a separate processing thread. As a result, the user interface 12 may display a dialog box that plug-ins can use to display progress, and from which a user can make a selection to stop or pause the plug-in's execution.
Referring again to
In a preferred embodiment there are several subordinate windows 52, including a video window 54, a zoom window 56, a time-line window 58, one or more encoder display windows 60, and one or more data windows 62. The video window 54 displays a video frame or a sequence of frames. For viewing a sequence of frames, the frames may be stepped, viewed in real time, viewed in slow motion or viewed in accelerated time. Included are input controls accessible to the operator by pointing and clicking, or by predefined key sequences. There are stop, pause, play, back, forward, step and other VCR-like controls for controlling the video presentation in the video window 54. In some embodiments there are scaling and scrolling controls also for the video window 54.
The zoom window 56 displays a zoom view of a portion of the video window 54 at a substantially larger magnification than the video window. The time-line window 58 includes an incremental time-line of video frames, along with zero or more thumb nail views of select video frames. The time line window 58 also includes a respective time-line for each video object defined for the input video sequence 11. A video object is defined by outlining the object.
The data window 62 includes user-input fields for an object title, translucent mask color, encoding target bit rate, search range and other parameters for use in defining and encoding the corresponding video object.
During encoding one of the encoder windows 60 is displayed. For example, an encoder progress window shows the encoding status for each defined video object in the input video sequence 11.
Object Tracking
Prior to performing the tracking operations based on background separation, an initial process 70 is executed (see FIG. 3). At a first step 72, the operator loads in an initial image frame. Using, for example, the segmentation interface 44, the operator clicks on points along the border of the object to be tracked, or otherwise selects an object at step 74. Optionally, an object segmentation algorithm then is executed on the selected object at step 76 to better estimate the object border. An active contour model or other known technique is implemented to achieve the object segmentation. The result of step 74, or if performed, step 76 is an object mask, (i.e., a foreground mask).
Referring to
In some embodiments a scene change detection algorithm also is implemented for each frame (step 84) to determine whether a scene change has occurred. If a scene change has occurred in the current image frame, then the tracking process ends or is re-initialized. If not, tracking continues.
The general strategy for tracking is to perform a predictor operation at step 86 and a classifier operation at step 88. The predictor operation predicts the background and updates the predictor with current frame image data. The classifier operation 88 classifies the current image frame pixels into background pixels and foreground pixels. Optional mask filtering operations are performed at steps 90, 94 and 98. The filtering operations serve to correct small errors, eliminate small islands, and maintain spatial and temporal coherency of the foreground (object) mask. The foreground and background models are updated at steps 92 and 96, respectively. Also, an optional mask editing and interpolation step is performed at step 100 to add another check on temporal coherency. In some embodiments the foreground mask then is output at step 101 to an object segmentation plug-in to refine the boundary estimate for the foreground model (i.e., object). For example an active contour type model is implemented in one embodiment. The process 80 then repeats with another frame being input at step 82 and the process repeated for a next frame to be processed. The process continues for either a select number of image frames (e.g., as selected by an operator), until the end of a given frame sequence, or in some embodiments, until a scene change is detected.
Referring to
During object tracking, there is a foreground object occluding a portion of the background in the initial image frame. During subsequent image frames, background pixels within that initially occluded area may be revealed. The object tracking processes detect the newly-disoccluded pixels and adds them to the background model.
The background model is a model of the entire background 108. The background 108 is generally stable, preferably stationary. In some embodiments however, the background may be moving. In such embodiment a correlation function is implemented to account for movement of the background. A complete background model includes data for every pixel in the background. Initially, the model is not complete as some pixels are not yet revealed. As pixels are revealed, the data is added to the background model after being visible for a prescribed number of successive frames, (see RollbackOrNewObservations module).
In a preferred embodiment three successive frames is used as the criteria based upon empirical analysis. In other embodiments the criteria is for four or higher successive frames. The number of successive frames used for a given embodiment is based on a trade-off between a tendency to update the background too quickly using a low number of successive frames and a tendency to wait too long to update the background using a higher number of successive frames. When too few successive frames are used, the model erroneously detects a foreground pixel as being part of the background until another motion occurs to change the analysis. When too many successive frames are used before updating the model, the process may miss the opportunity to correctly observe the background. Specifically, the image may be changing too fast relative to the prescribed number of successive frames causing the motion to have passed during such number of frames, (e.g., a motion occurs in 3 frames, but the criteria is 5 successive frames so the pixels of the motion are not registered). Empirically, updating after 1 or 2 successive frames often yields mistakes in observing the background of moving image scenes. Accordingly, it is preferred to use 3 or more successive frames as the criteria. Note, however, that in an embodiment for processing a slow motion video sequence, the prescribed number can be as low as 1 or 2 successive frames.
The background mask is the portion of the current image frame which includes pixels classified as background pixels, plus any other pixels which are added to the background mask for the current image frame after mask filtering of the foreground mask. The foreground mask for the current image frame includes the pixels not in the background mask.
Predictor:
For an initial frame, the object derived at steps 74 and 76 (see
The second guide described above not only identifies mis-selected pixels, but also undesirably identifies, for example, the pixels in area 110 which became occluded in the second frame 106. Such pixels in area 110 are relabeled for frame 104 as being unobserved. Thus, the background model for the initial frame includes all pixels in the background 108, excluding those pixels in areas 110, 112, 114 (see
In some embodiments a second pass of the initial image frame is performed after the image frame sequence is processed. During the second pass the refined models developed over the course of processing the image frame sequence are used to recapture some or all of the pixels in area 110 that indeed are background pixels.
For a current image frame, the predictor analyzes each color component of each pixel using a 0-th or 1-st order Kalman filter (i.e., 3×M×N independent Kalman filters for a three-color-component image with M×N pixels with one filter for each color component of each pixel). The Kalman filters remove ‘noise’ from the image based on a noise model and previous observations of the background. Based on the noise model, the Kalman filter updates its estimate of the background image using the new data.
In one embodiment a discrete-time model is assumed for implementing the Kalman filters with the following state-update and state-observation column vector equations:
xk=Akxk−1+vk
yk=Ckxk+wk
where k is the k-th image frame; xk is the current state; yk is the current observation; and Ak and Ck are the state-update and state-output matrices, respectively. Also, vk and wk are assumed to be additive Gaussian noise vectors with cross-correlation matrices Qk=vkvkT and Rk=wkwkT. The purpose of the Kalman filter is to eliminate unobservable internal system state x from noisy output measurements y.
Two time-invariant state models are as follows. A 0-th order constant position model has matrices Ak=[1] and Ck=[1], where the state vector x is the value of the color component (“position”). A 1-st order constant-velocity model has matrices,
with a state vector including color component values and its derivative, i.e., xT=[position; velocity] in a physical model. It then is assumed that the quantity Ik(i,j)−Ik−1(i,j) provides a measurement (observation) of the velocity, where Ik(i,j) is the image pixel at coordinate (i,j) for image frame k.
The Kalman filter recipe for the 0-th order model is:
P0,0=covariance matrix of the initial measurement {circumflex over (x)}0|0
Repeat for all times:
Pk,k−1=Ak−1Pk−1,k−1Ak−1T+Qk−1
Gk=Pk,k−1CkT(CkPk,k−1CkT+Rk)−1
Pk,k=(I−GkCk)Pk,k−1
{overscore (x)}={circumflex over (x)}k|k−1=Ak−1{circumflex over (x)}k−1|k−1
{circumflex over (x)}k|k={circumflex over (x)}k+Gk(yk−Ck{overscore (xk)})
where Pk,k−1 is the estimated variance of predicted value {overscore (x)}k;
The matrices Q and R are assumed to be diagonal, containing noise variances. The variances are determined empirically by analyzing temporal pixel data and by observing tracking performance with different values. It was found in several experiments that performance was constant for a range of variance values. Because the noise variance is low, the Kalman gain quickly converges to a constant mixing factor of about 0.15, indicating that the background estimate places a low weight on previous background observations. Given such characteristics, the update equation for estimating background pixel (i,j) for a 0-th order Kalman filter converges to:
xi,j[n]=(1−ρ)·yi,j[n]+ρ·xi,j[n−1]
where x[n] is the current background estimate; x[n−1] is the previous background estimate; y[n] is the current observation; and ρ is the mixing factor.
As previously described, a background pixel is observed (non-occluded) in three consecutive frames as being a background pixel before it is added to an observed mask to update the background model. For a 1-st order filter it also is preferred that the state variables not be updated while the background pixel is not observed (e.g., occluded or not yet classified as observed) to avoid accumulating an error due to the finite velocity of the 1-st order filter variables.
Although a 0-th order and 1-st order Kalman filter are described for predicting which pixels are observed in the background versus unobserved, other models may be implemented in alternative embodiments. Other methods for the predictor operation include neural networks, digital finite impulse response filters, and infinite impulse response filters. Regardless of the specific method, a preferred tracking strategy relies on the absolute difference between the predicted background and the current frame to determine the foreground mask.
Referring to
Classifier Operation
There are several decisions performed by the classifier operation 88, including: identifying which pixels do not belong to the background mask for a current frame; which pixels in the foreground mask are to be updated for the current frame; which background pixels (if any) were observed incorrectly in the current frame, and which background pixels were observed in the background for the first time. By first time it is meant that the pixel has been observed in the background for three consecutive frames and is now to be included in the background model. By incorrectly observed, it is meant that the value of the pixel has changed significantly from the prior frame to the current frame, such that it is possible that the pixel actually is not a background pixel. (The background is assumed to be generally stable). For embodiments which account for background motion this change in value is identified after accounting for background motion.
The classifier operation 88 examines pixels in frames n−1, n and n+1 to accurately detect motion for frame n. According to a preferred embodiment, the absolute difference between images is calculated for each of three color components (e.g., YUV) of each pixel. The following absolute difference images are calculated:
between the current frame (n) and the foreground model, (AD_FG);
between the current frame (n) and the previous frame (n−1), (AD_previous);
between the current frame (n) and the predicted background estimate, (AD_predicted); and
between the current frame (n) and the next frame (n+1), (AD_future).
It has been found that color components U and V exhibit differences even when the intensity component (Y) does not. Conversely, pixels with low intensity often vary little in the U and V components, so it is desirable to use thresholds to enable detection of differences under a variety of lighting and texture conditions. The four absolute difference images are used to detect a variety of events for a given pixel, including: whether the pixel belongs to the background; whether there is low motion in the immediate past; whether there is low motion in the immediate future; whether there is some motion in the immediate past; whether there is some motion in the immediate future; whether the pixel is a candidate for a foreground mask/model update; when a background pixel, whether the pixel should be updated in the background model. Table 1 below lists the event with the relevant absolute difference image.
TABLE 1
Detection of various events using the absolute difference for each color
component.
Relevant
Pixel
Logical Combination
Event Description
AD image
value
of Color Thresholds
Pixel may belong
AD_previous OR
small
AND
to background
AD_future;
AD_predicted
small
Low motion in
AD_previous
small
AND
immediate past
Low motion in
AD_future
small
AND
immediate future
Some motion in
AD_previous
significant
OR
immediate past
Some motion in
AD_future
significant
OR
immediate future
Pixel is candidate
AD_FG
significant
OR
for foreground
AD_future
small
AND
update
Background pixel
AD_previous
significant
OR
should not be
AD_predicted
significant
OR
updated
Referring to table 1, an AND color combination is implemented where the event occurs for all three color components of a pixel. An OR color combination is implemented when the event occurs for any color component. The events in Table 1 are used in combination to make decisions, including: which pixels do not belong to the background; which pixels in the foreground (based on the original image) are to be updated; which pixels in the background were observed incorrectly in the current frame; and which background pixels are being observed for the first time. Some of these decisions need not be mutually exclusive of the other decisions. Decision logic for one embodiment is listed in the pseudocode section MainThreshold (initial detections of hanged pixels).
The result of the classifier operation 88 is: an updated background model and foreground model; and, for the current image frame, an updated background mask and foreground mask.
Mask Filtering and Model Updating
After the classifier operation 88 is performed on the current image frame, there may be small errors, islands or other aberrations. For example,
A mask filtering operation is performed in various steps 90, 94, 98 to correct the small errors, to eliminate small islands, and maintain a spatial and temporal coherency of the background mask and foreground mask of the current image frame with the background and foreground mask of the prior image frame. At step 90, filtering is performed to identify the largest island of foreground pixels in the foreground mask. In one embodiment a connected components analysis is performed to identify and retain the largest island. At step 92 the foreground mask for the current image frame is updated by removing the remaining islands and spots 126. In some embodiments morphological processing also is performed on the largest island 124 to obtain the foreground mask. This leaves only the area 124 as the foreground mask for the current image.
At step 94 mask filtering is performed on the background mask of the current image frame. In one embodiment a mask erosion operation is performed. The erosion operation includes both temporal differences and spatial similarities between pixels to erode the foreground pixels using a flooding procedure, (FloodFG).
In one embodiment the erosion operation includes a flooding procedure in which a FIFO queue is filled using the background pixels at the interface with the foreground mask. Each pixel is examined in the queue, until the queue is empty. If any pixel of the foreground mask neighboring pixels is sufficiently similar to a parent pixel at the foreground background interface, and such pixel has low future motion (as determined by the classifier operation 88), the pixel is added to the queue and is relabeled as a background pixel (i.e., added to the background mask for the current frame). Note that pixels in the queue inherit the YUV values of the parent pixel at the background foreground interface rather than the immediate ancestor. This prevents major erosion of the foreground mask when a pixel in a nearly homogeneous region is erroneously detected as a background pixel. In other embodiments, more rigorous testing is performed by gathering statistics from a window of pixels surrounding the pixel being evaluated.
After the flooding procedure a binary morphological closing is performed to smooth the background mask and correct any small errors introduced by the flooding procedure. For example, in one embodiment a 5×5 structuring element is used in the morphological processing. Because the mask filtering operation performed at step 94 may introduce small islands of background pixels within the border of the foreground mask, morphological and connected component analysis is preferably implemented to detect and change these small islands to part of the foreground mask. Islands of significant size (exceeding a threshold defined for the morphological operation) remain in the background mask. Such procedure is beneficial to fill in chunks of the foreground mask that may have been incorrectly missing.
The result of the mask erosion operation is a new background mask. The background model then is updated at step 96. Specifically, at step 96 the pixels in the background mask are examined to determine if there are any previously unobserved pixels. If so, then those pixels are stored, but not yet added to the background model. Once any one of such pixels have observed in three consecutive frames, the observed pixel(s) are added to the background model.
After updating the background model at step 96, additional mask filtering is performed at step 98 to remove any remaining fragments or features in the background mask for the current frame that are less than a select number of pixels wide, (e.g., 3 pixels, although another number is used in other embodiments). For example, in one embodiment the mask is morphologically opened using a 3×3 structuring element to remove the fragments less than 3 pixels wide.
At step 100, the background mask and foreground mask for each of the frames n, n−1 and n−2 (where n is the current image frame) are examined to edit and interpolate the mask pixels. As previously discussed, new background pixels are to be observed in three consecutive frames to be included in the background model. Thus, if a new background pixel observed at frame n−2 is NOT observed in either frame n−1 or n, then the corresponding background mask pixel is reset to a foreground mask pixel for frame n−2, and the background pixel is not updated. In addition, if the temporal pattern for a pixel in frames n−2, n−1, and n is unobserved, observed, unobserved, then the pixel at frame n−1 is relabeled as unobserved. By looking ahead to frame n+1 and looking back to frame n−2, the final output value for the pixel is actually delayed for a total of three frames. However, a preliminary result is available after one frame.
Referring to
Referring to
Tracking Process 80 Logic
The decision-making operations occur at several abstraction levels. These are described procedurally in pseudocode fragments as follows, with deeper levels labeled with larger numbers. FG=foreground, BG=background. Equivalent labels are UNOBSV (unobserved) and OBSV (observed), respectively. Multiple criteria in the same image are assumed to be ordered Y,Cr,Cb. The criteria are AND'd together unless otherwise specified (e.g., AD_previous<=5,3,3 is equivalent to AD_previous_Y<=5 AND AD_previous_Cr<=3 AND AD_previous_Cb<=3).
Following is a cross reference of the process 80 steps (shown in
An advantage of the invention is that objects having rapidly changing shapes are accurately tracked. Information in prior and future frames is used to detect object motion. The object can change internally and even be self-occluding. Another advantage is that previously unrevealed (i.e., occluded) portions of the background are identified, improving object estimation accuracy. Another advantage is that holes in objects also are tracked accurately.
The tracking strategy described works best under specific conditions. When those conditions are not met, tracking still occurs, but there are potential instances of partial inaccuracy. Various filtering operations, however, limit those potential inaccuracies. Exemplary conditions, include:
the background is constant or changes very gradually with little or no object-background interaction;
the intensity (Y) component of a background pixel may vary widely from frame to frame, but the U and V components are generally consistent;
the user provides a fairly good initial separation of the foreground object from the background (although incorrectly labeled background pixels derived from that separation in the initial frame can be detected in the next frame by pixel-wise absolute difference);
background pixels revealed in subsequent frames are visible for more than a prescribed number of frames (e.g., 3 frames);
candidates for a revealed background pixel have a large absolute difference between the current pixel and the foreground estimates, but little difference from values of the background pixel in subsequent frames; and
the scene has good contrast.
In some embodiments, however, a correlation algorithm or another process is implemented to estimate and account for background motion.
Although a preferred embodiment of the invention has been illustrated and described, various alternatives, modifications and equivalents may be used. Therefore, the foregoing description should not be taken as limiting the scope of the inventions which are defined by the appended claims.
Kim, Yongmin, Schoepflin, Todd, Haynor, David R., Sahr, John D.
Patent | Priority | Assignee | Title |
10096118, | Jan 13 2009 | Futurewei Technologies, Inc. | Method and system for image processing to classify an object in an image |
10152645, | May 16 2016 | AXIS AB | Method and apparatus for updating a background model used for background subtraction of an image |
10373015, | Jan 19 2015 | HANWHA VISION CO , LTD | System and method of detecting moving objects |
10839517, | Feb 21 2019 | Sony Corporation | Multiple neural networks-based object segmentation in a sequence of color image frames |
11200678, | Sep 17 2019 | SONY GROUP CORPORATION; Sony Corporation of America | Image-based mask frame interpolation |
11544855, | Mar 18 2020 | Samsung Electronics Co., Ltd. | Method and apparatus for tracking target |
7016411, | Jul 04 2001 | Matsushita Electric Industrial Co. Ltd. | Image signal coding method, image signal coding apparatus and storage medium |
7072512, | Jul 23 2002 | Microsoft Technology Licensing, LLC | Segmentation of digital video and images into continuous tone and palettized regions |
7088845, | Sep 10 1998 | Microsoft Technology Licensing, LLC | Region extraction in vector images |
7362374, | Aug 30 2002 | Altera Corporation | Video interlacing using object motion estimation |
7369682, | Jul 09 2004 | HONDA MOTOR CO , LTD | Adaptive discriminative generative model and application to visual tracking |
7428314, | Dec 03 2003 | ENVYSION, INC | Monitoring an environment |
7463754, | Nov 13 2003 | HONDA MOTOR CO | Adaptive probabilistic visual tracking with incremental subspace update |
7623731, | Jun 20 2005 | HONDA MOTOR CO , LTD | Direct method for modeling non-rigid motion with thin plate spline transformation |
7650011, | Jul 09 2004 | HONDA MOTOR CO , LTD | Visual tracking using incremental fisher discriminant analysis |
7652721, | Aug 22 2003 | Altera Corporation | Video interlacing using object motion estimation |
7688997, | Nov 21 2001 | iOmniscient Pty Ltd | Non-motion detection |
7724971, | Apr 26 2004 | Chunghwa Picture Tubes, Ltd | Image processing method for a TFT LCD |
7783118, | Jul 13 2006 | Seiko Epson Corporation | Method and apparatus for determining motion in images |
7801328, | Mar 31 2005 | Honeywell International Inc.; Honeywell International Inc | Methods for defining, detecting, analyzing, indexing and retrieving events using video image processing |
7809207, | Aug 13 2003 | Apple Inc. | Pre-processing method and system for data reduction of video sequences and bit rate reduction of compressed video sequences using spatial filtering |
7859564, | Aug 07 2007 | Model Software Corporation | Video surveillance system |
7957592, | Nov 30 2006 | Industrial Technology Research Institute | Video object segmentation method and system |
8107680, | Dec 03 2003 | ENVYSION, INC | Monitoring an environment |
8150155, | Feb 07 2006 | Qualcomm Incorporated | Multi-mode region-of-interest video object segmentation |
8194134, | Oct 27 2006 | Panasonic Corporation | Target moving object tracking device |
8208565, | Aug 13 2003 | Apple Inc. | Pre-processing method and system for data reduction of video sequences and bit rate reduction of compressed video sequences using temporal filtering |
8265349, | Feb 07 2006 | Qualcomm Incorporated | Intra-mode region-of-interest video object segmentation |
8265392, | Feb 07 2006 | Qualcomm Incorporated | Inter-mode region-of-interest video object segmentation |
8311273, | Jun 05 2006 | NEC Corporation | Object detection based on determination of pixel state |
8340464, | Sep 16 2005 | Fujitsu Limited | Image processing method and image processing device |
8538062, | Aug 28 2008 | Nvidia Corporation | System, method, and computer program product for validating an aspect of media data processing utilizing a signature |
8582834, | Aug 30 2010 | Apple Inc | Multi-image face-based image processing |
8605945, | Feb 07 2006 | Qualcomm, Incorporated | Multi-mode region-of-interest video object segmentation |
8615042, | Aug 13 2000 | Apple Inc. | Pre-processing method and system for data reduction of video sequences and bit rate reduction of compressed video sequences using spatial filtering |
8760464, | Feb 16 2011 | Apple Inc. | Shape masks |
8831287, | Jun 09 2011 | Utah State University | Systems and methods for sensing occupancy |
8891864, | Feb 16 2011 | Apple Inc. | User-aided image segmentation |
8948516, | Dec 21 2009 | TELEFONAKTIEBOLAGET L M ERICSSON PUBL | Method for regenerating the background of digital images of a video stream |
9269154, | Jan 13 2009 | Futurewei Technologies, Inc.; FUTUREWEI TECHNOLOGIES, INC | Method and system for image processing to classify an object in an image |
9286681, | Jun 05 2014 | Leica Microsystems CMS GmbH | Edit guided processing method for time-lapse image analysis |
Patent | Priority | Assignee | Title |
5491517, | Mar 14 1994 | PVI Virtual Media Services, LLC | System for implanting an image into a video stream |
5526053, | Oct 26 1993 | Sony Corporation; Sony United Kingdom Limited | Motion compensated video signal processing |
5710602, | Sep 29 1995 | Intel Corporation | Gain correction for encoding video images |
5852475, | Jun 06 1995 | Cisco Technology, Inc | Transform artifact reduction process |
6400831, | Apr 02 1998 | Microsoft Technology Licensing, LLC | Semantic video object segmentation and tracking |
6545706, | Jul 30 1999 | DIGIMEDIA TECH, LLC | System, method and article of manufacture for tracking a head of a camera-generated image of a person |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Apr 24 2001 | SCHOEPFLIN, TODD | Washington, University of | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 011881 | /0657 | |
Apr 25 2001 | HAYNOR, DAVID R | Washington, University of | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 011881 | /0657 | |
Jun 01 2001 | SAHR, JOHN D | Washington, University of | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 011881 | /0657 | |
Jun 01 2001 | KIM, YONGMIN | Washington, University of | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 011881 | /0657 | |
Jun 04 2001 | University of Washington | (assignment on the face of the patent) | / |
Date | Maintenance Fee Events |
Sep 29 2008 | REM: Maintenance Fee Reminder Mailed. |
Mar 22 2009 | EXP: Patent Expired for Failure to Pay Maintenance Fees. |
Date | Maintenance Schedule |
Mar 22 2008 | 4 years fee payment window open |
Sep 22 2008 | 6 months grace period start (w surcharge) |
Mar 22 2009 | patent expiry (for year 4) |
Mar 22 2011 | 2 years to revive unintentionally abandoned end. (for year 4) |
Mar 22 2012 | 8 years fee payment window open |
Sep 22 2012 | 6 months grace period start (w surcharge) |
Mar 22 2013 | patent expiry (for year 8) |
Mar 22 2015 | 2 years to revive unintentionally abandoned end. (for year 8) |
Mar 22 2016 | 12 years fee payment window open |
Sep 22 2016 | 6 months grace period start (w surcharge) |
Mar 22 2017 | patent expiry (for year 12) |
Mar 22 2019 | 2 years to revive unintentionally abandoned end. (for year 12) |