This invention relates generally to the extraction of objects from source video, and more particularly to such extraction that is substantially automatic in nature.
An increasingly common use of computers and computerized devices is the processing of video, such as video captured in real-time, or video captured or otherwise input from a storage, such as a hard disk drive, a digital video disc (DVD), a video cassette recorder (VCR) tape, etc. For the processing of video, objects within the video usually need to be extracted. Objects can correspond to, for example, semantic objects, which are objects as defined perceptually by the viewer. For example, a video of a baseball game may have as its objects the various players on the field, the baseball after it is thrown or hit, etc. Object extraction is useful for object-based coding techniques, such as MPEG-4, as known within the art; for content-based visual database query and indexing applications, such as MPEG-7, as also known within the art; for the processing of objects in video sequences; etc.
Prior art object extraction techniques generally fall into one of two categories: automatic extraction and semi-automatic extraction. Automatic extraction is relatively easy for the end user to perform, since he or she needs to provide little or no input for the objects to be extracted. Automatic extraction is also useful in real-time processing of video, where user input cannot be feasibly provided in real time. The primary disadvantage to automatic extraction, however, is that as performed within the prior art the objects are not defined precisely. That is, only rough contours of objects are identified. For example, parts of the background may be included in the definition of a given object.
Conversely, semi-automatic object extraction from video requires user input. Such user input can provide the exact contours of objects, for example, so that the objects are defined more precisely as compared to prior art automatic object extraction. The disadvantage to semi-automatic extraction, however, is that user input is in fact necessary. For the lay user, this may be at best inconvenient, and at most infeasible in the case where the user is not proficient in video applications and does not know how to provide the necessary optimal input. Furthermore, semi-automatic extraction is ill-suited for real-time processing of video, even where a user is proficient, since typically the user cannot identify objects in real time.
Therefore, there is a need to combine the advantages of automatic and semi-automatic video object extraction techniques. That is, there is a need to combine the advantageous precise definitions afforded objects by semi-automatic techniques, with the advantageous ability to perform the object extraction in real-time, as is allowed with automatic techniques. For these and other reasons, there is a need for the present invention.
The invention relates to automatic video object extraction. In one embodiment, color segmentation and motion segmentation are performed on a source video. The color segmentation segments the video by substantially uniform color regions thereof. The motion segmentation segments the video by moving regions thereof. The color regions and the moving regions, referred to as masks in one embodiment of the invention, are then combined to define the video objects.
Embodiments of the invention provide for advantages not found within the prior art. Specifically, at least some embodiments of the invention provide for object extraction from video in a substantially automatic manner, while resulting in objects that are substantially precisely defined. The motion segmentation mask defines the basic contours of the objects, while the color segmentation mask provides for more precise boundaries of these basic contours. Thus, combined, the motion and color segmentation masks allow for video object extraction that is substantially automatic, but which still yields substantially precisely defined objects.
The invention includes computer-implemented methods, machine-readable media, computerized systems, and computers of varying scopes. Other aspects, embodiments and advantages of the invention, beyond those described here, will become apparent by reading the detailed description and with reference to the drawings.
In the following detailed description of exemplary embodiments of the invention, reference is made to the accompanying drawings which form a part hereof, and in which is shown by way of illustration specific exemplary embodiments in which the invention may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice the invention, and it is to be understood that other embodiments may be utilized and that logical, mechanical, electrical and other changes may be made without departing from the spirit or scope of the present invention. The following detailed description is, therefore, not to be taken in a limiting sense, and the scope of the present invention is defined only by the appended claims.
Some portions of the detailed descriptions which follow are presented in terms of algorithms and symbolic representations of operations on data bits within a computer memory. These algorithmic descriptions and representations are the means used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. An algorithm is here, and generally, conceived to be a self-consistent sequence of steps leading to a desired result. The steps are those requiring physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated.
It has proven convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, or the like. It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise as apparent from the following discussions, it is appreciated that throughout the present invention, discussions utilizing terms such as processing or computing or calculating or determining or displaying or the like, refer to the action and processes of a computer system, or similar electronic computing device, that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission or display devices.
Operating Environment
Referring to
Moreover, those skilled in the art will appreciate that the invention may be practiced with other computer system configurations, including hand-held devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, network PC's, minicomputers, mainframe computers, ASICs (Application Specific Integrated Circuits), and the like. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.
The exemplary hardware and operating environment of
The system bus 23 may be any of several types of bus structures including a memory bus or memory controller, a peripheral bus, and a local bus using any of a variety of bus architectures. The system memory may also be referred to as simply the memory, and includes read only memory (ROM) 24 and random access memory (RAM) 25. A basic input/output system (BIOS) 26, containing the basic routines that help to transfer information between elements within the computer 20, such as during start-up, is stored in ROM 24. The computer 20 further includes a hard disk drive 27 for reading from and writing to a hard disk, not shown, a magnetic disk drive 28 for reading from or writing to a removable magnetic disk 29, and an optical disk drive 30 for reading from or writing to a removable optical disk 31 such as a CD ROM or other optical media.
The hard disk drive 27, magnetic disk drive 28, and optical disk drive 30 are connected to the system bus 23 by a hard disk drive interface 32, a magnetic disk drive interface 33, and an optical disk drive interface 34, respectively. The drives and their associated computer-readable media provide nonvolatile storage of computer-readable instructions, data structures, program modules and other data for the computer 20. It should be appreciated by those skilled in the art that any type of computer-readable media which can store data that is accessible by a computer, such as magnetic cassettes, flash memory cards, digital video disks, Bernoulli cartridges, random access memories (RAMs), read only memories (ROMs), and the like, may be used in the exemplary operating environment.
A number of program modules may be stored on the hard disk, magnetic disk 29, optical disk 31, ROM 24, or RAM 25, including an operating system 35, one or more application programs 36, other program modules 37, and program data 38. A user may enter commands and information into the personal computer 20 through input devices such as a keyboard 40 and pointing device 42. Other input devices (not shown) may include a microphone, joystick, game pad, satellite dish, scanner, video camera, or the like. These and other input devices are often connected to the processing unit 21 through a serial port interface 46 that is coupled to the system bus, but may be connected by other interfaces, such as a parallel port, game port, an IEEE 1394 port (also known as FireWire), or a universal serial bus (USB). A monitor 47 or other type of display device is also connected to the system bus 23 via an interface, such as a video adapter 48. In addition to the monitor, computers typically include other peripheral output devices (not shown), such as speakers and printers.
The computer 20 may operate in a networked environment using logical connections to one or more remote computers, such as remote computer 49. These logical connections are achieved by a communication device coupled to or a part of the computer 20, the invention is not limited to a particular type of communications device. The remote computer 49 may be another computer, a server, a router, a network PC, a client, a peer device or other common network node, and typically includes many or all of the elements described above relative to the computer 20, although only a memory storage device 50 has been illustrated in
When used in a LAN-networking environment, the computer 20 is connected to the local network 51 through a network interface or adapter 53, which is one type of communications device. When used in a WAN-networking environment, the computer 20 typically includes a modem 54, a type of communications device, or any other type of communications device for establishing communications over the wide area network 52, such as the Internet. The modem 54, which may be internal or external, is connected to the system bus 23 via the serial port interface 46. In a networked environment, program modules depicted relative to the personal computer 20, or portions thereof, may be stored in the remote memory storage device. It is appreciated that the network connections shown are exemplary and other means of and communications devices for establishing a communications link between the computers may be used.
Overview
In this section of the detailed description, an overview of object extraction, such as can be performed by embodiments of the invention, is provided. The objects extracted in at least some embodiments of the invention are semantic objects. Semantic objects represent meaningful entities in a source video, from a perceptual standpoint of users.
For example, in the diagram of
Thus, applying embodiments of the invention to perform object extraction on the source video 200 of
Color Segmentation
In this section of the detailed description, color segmentation as performed in accordance with an embodiment of the invention is described. The color segmentation in one embodiment is performed on a frame of a source video, to segment the video by substantially uniform color regions thereof. That is, a color segmentation mask is generated that defines substantially precise boundaries of the objects extracted from the source video. Those of ordinary skill within the art can appreciate that many techniques exist within the prior art to perform color segmentation, such as edge detection, region techniques, Maximum A posteriori Probability (MAP) techniques, etc., and that the invention itself is not limited to a particular technique. The embodiment of the invention described herein utilizes a technique that extends and is based on the technique described in the reference Chuang Gu and Ming-Chieh Lee, Tracking of Multiple Semantic Video Objects for Internet Applications, SPIE, Visual Communications and Image Processing 1999, volume 3653, as known within the art.
Referring to
In 508, the seed pixel is grown by a neighbor pixel or a neighborhood of pixels. The seed pixel is grown by a neighborhood of pixels surrounding the pixel as governed by the constraint that a substantially homogenous color region is to be generated. In one embodiment, the homogeneity of a region is controlled by the difference of the maximum and minimum values within a region. For example, for a color image, the value of a pixel in one embodiment is a vector including the red, green and blue color channels in the form {r, g, b}. Thus, the maximum and minimum values of a region are {max {r}, max{g}, max{b}}, and {min{r}, min{g}, min{b}}, respectively. If the difference of the maximum and minimum values of a region does not exceed a predetermined threshold, then it is deemed a uniform region.
Therefore, in 510, after the region has been grown in 508, it is determined whether the region is still of substantially uniform color. If not, then the method proceeds back to 506, to obtain a new seed from the buffer, and to start the process of obtaining substantially uniform color regions over again. Otherwise, the neighboring pixel or pixels of the seed pixel is placed into the seed buffer in 512, to continue growing the same substantially uniform color region by also proceeding back to 506. The same substantially uniform color region is continued to be grown by virtue of the fact that the neighboring pixel or pixels of the seed pixel have been placed into the seed buffer in 512.
Once all the substantially uniform color regions have been determined, and there are no seeds left in the buffer, nor can further seeds be found within the frame of the source video, then the method proceeds from 502 to 514. In 514, smaller substantially uniform color regions are merged into larger substantially uniform color regions. This merging removes relatively smaller regions by integrating them into relatively larger regions. In one embodiment, this is accomplished by merging all the regions with the number of pixels less than a certain threshold (<10 pixels) to its neighbor regions. The method then ends in 516.
As has been noted, color segmentation can be performed on one or more frames of the source video. The invention is not limited, however, by the manner which is followed to select the frame that will ultimately be used as the color segmentation mask. In one embodiment, the frame is selected by the user, either before or after color segmentation has been performed (i.e., the user selects a frame on which color segmentation is performed, or color segmentation is performed on a number of frames, and the user selects one of these frames). In another embodiment, the frame is predetermined. For example, for off-line processing of captured video, the first frame may be always selected. As another example, for real-time processing of video, the last frame may always be selected.
Motion Segmentation and Combination of Multiple Frames
In this section of the detailed description, motion segmentation as performed in accordance with an embodiment of the invention is described, as well as the combination of multiple frames for such motion segmentation to generate a cleaner motion segmentation mask. The motion segmentation in one embodiment is performed on a plurality of frames of a source video, such as two frames, as will be described, although the invention itself is not so limited. Those of ordinary skill within the art can appreciate that many techniques exist within the prior art to perform motion segmentation, such as optical flow techniques, block-based matching techniques, Maximum A posteriori Probability (MAP) techniques, simultaneous motion estimation and segmentation techniques, etc., and that the invention itself is not limited to a particular technique. The motion segmentation segments a source video by moving regions thereof, and defines approximate boundaries of objects extracted from the source video.
In one embodiment, motion segmentation is obtained as follows. First, a motion vector is first obtained by region matching. For each uniform region generated from the color segmentation described in the preceding paragraph, prior to combining the smaller regions with the larger regions, a motion vector is obtained by determining the best match in a next frame of the source video. This is particularly described in the reference noted in the preceding section of the detailed description. This region-based motion estimation technique substantially ensures that each color-segmented region has the same motion vector.
In one embodiment, the matching window is set to a sixteen-by-sixteen pixel window, and the matching criterion is to determine the least matching error of the region. The matching error is defined as:
ERROR(n, i) is the matching error for region n with motion vector V_(n, i). I_t and I_t+1 represent the current and next frame, respectively. R_n denotes region n. Operator ||*|| denotes the sum of absolute difference between two vectors. Finally, V_(n, i)<=V_max, where V_max is the searching range. The motion vector of region n is defined as:
After obtaining a motion vector for each region, a motion mask can then be obtained:
V(i, j) is the motion vector of pixel (i, j), and V_x(i,j) and V_y(i,j) are the projection of V(i, j) on the x and y coordinates, respectively. M(i, j) represents each pixel in the motion mask, where T1 is the predetermined threshold set according to the motion. In one embodiment, T1 is set to one for slow motion, and to anywhere from two to three for fast motion.
In one embodiment, the frame interval is adapted according to the estimated motion. Most motion estimation is based on two continuous frames. However, this is not always valid in some sequences, where the motion of moving objects is minimal, and leads to a sparse motion field. Therefore, the interval of two frames is adapted. For a fast motion field, the interval can be set small, while for slow motion, the interval can be set large.
In one embodiment, multiple frames are combined to decrease errors associated with the assignment of regions incorrectly assigned to a moving object due to noise. In other words, the incorrect motion caused by random noise is removed by checking multiple motion masks to generate the final motion mask, since random noise will not be constant across multiple frames. Furthermore, the uncovered background can be distinguished from true moving regions.
This combination of multiple frames is accomplished in one embodiment as follows. First, the frequency of a pixel is assigned to a moving object in a number of motion masks, such as ten or more. If the frequency is higher than a predetermined threshold, then this pixel is determined as a moving pixel. Otherwise, it is designated as background and is removed from the final motion mask. In one embodiment, the threshold is fifty percent. Thus,
M_s(i,j) represents each motion mask being combined, S denotes the number of total motion masks used in combination, C(i,j) denotes the total number of times pixel (i,j) is assigned as a moving pixel in S motion masks, and T2 is the threshold.
Methods
In this section of the detailed description, methods according to varying embodiments of the invention are described. The description is made with reference to
Referring to
Next, in 604, color segmentation is performed. Color segmentation can be accomplished in one embodiment as described in a preceding section of the detailed description, although the invention is not so limited. The resulting mask of the color segmentation is then optimized in one embodiment by merging smaller regions into larger regions in 606, and such that a certain frame of the color segmented source video is selected in 608, as has also been described in a preceding section of the detailed description. The final color segmentation mask is then used as input in 616.
In the embodiment of
In 614, a third mask used as input in 616 is generated, which is referred to as a frame difference mask. In one embodiment, the frame difference mask is generated from two successive frames of the source video, and is generated to provide for correction of errors that may result from the motion segmentation mask. The difference mask is obtained in one embodiment as follows:
The difference mask is DM(i, j), where I_x represents frame x, and T4 is a predetermined threshold, such as ten to twenty pixels.
In 616, the resulting color segmentation, motion segmentation, and frame difference masks are combined to define the objects of the source video in an automatic and substantially precise manner. In one embodiment, the median result of color segmentation and motion segmentation is first determined. The frame difference mask is then combined with this median result to generate the final mask which defines the objects of the source video.
Thus, while color segmentation identifies the exact edges of objects, it typically results in over segmentation. Furthermore, while motion segmentation generates a coarse mask of moving objects, the boundaries identified are too rough to provide for exact object extraction. Therefore, the color segmentation and motion segmentation masks are combined, to extract moving objects with substantially pixel-wise accuracy.
In one embodiment, this initial combination of motion and color segmentation masks is accomplished by a mapping operation. For each region generated by color segmentation, the corresponding region is found in the motion segmentation mask. If the percent of the region that is assigned to a moving object exceeds a predetermined threshold, then the whole region is deemed to be part of the moving object. In one embodiment, this threshold is between fifty and sixty percent.
Thus,
N represents the color segmented region, A(N) is the area of region N, M(i, j) is the pixel in the combined motion mask, and FM(I,j) is the pixel in the final mapped mask. T3 is the threshold.
The combined motion and color segmentation mask is then combined with the frame difference mask, as follows:
F(i, j) is the final mask in which the color segmentation, motion segmentation, and frame-difference masks have been combined. FD(i, j) is the frame-difference mask such that the mask has been mapped in the same manner as FM(i, j) has been mapped, so that the two can be compared to generate F(i, j).
As can be appreciated by those of ordinary skill within the art, the frame-difference mask, while providing for more precise automatic extraction of video objects, is not required in one embodiment of the invention. Thus, in one embodiment, F(i, j) can be obtained simply by setting it equal to FM(i, j), which is the interim result of combining the color and the motion segmentation masks. That is, combining the moving regions resulting from the motion segmentation and the substantially uniform color regions resulting from the color segmentation can be used in one embodiment to define the objects of the source video.
Furthermore, other masks can be introduced into 616 in addition to and/or in lieu of any of the color segmentation, motion segmentation, and frame difference masks. Such masks can include a depth mask, providing for information relating to the depth of the objects of the source video, a texture mask, providing for information relating to the texture of the objects of the source video, etc. In such embodiments, all of the masks to be used are combined to generate the final mask that identifies the objects extracted from the source video.
Next, in one embodiment, post-processing of the mask generated in 616 is performed in 618, for example, to remove noise from the mask. Post-processing can include in one embodiment removing small holes from the objects identified to generate integrated objects, and can in another embodiment also include removing small regions from background areas of the source video to generate cleaner objects. In one embodiment, this is accomplished by first merging smaller regions with larger regions, as described in a preceding section of the detailed description in the context of color segmentation. Then, a morphological operator(s), such as open and/or close, as known within the art, is applied. However, as can be appreciated by those of ordinary skill within the art, post-processing is not required by the invention itself. The method of
Systems and Computers
In this section of the detailed description, systems and computers according to varying embodiments of the invention are described. The description is made with reference to
The medium 702 stores data representing at least one frame 706 of the source video, which itself has a number of frames, and is obtained from the source 704, such as a video camera, a video cassette recorder (VCR) tape, a digital video disc (DVD), etc. The medium 702 also stores data representing the objects 708 extracted from the source video. The medium 702 can in one embodiment correspond to a means for storing data representing the frame(s) 706 and the objects 708. The objects are extracted by a computer program 710, which is executed by the processor 700 from the medium 702.
The program 710 is thus designed to extract the objects 708 from the video by generating and then combining a number of masks from the video, in one embodiment, as has been described in preceding sections of the detailed description. In one embodiment, the program 710 can correspond to a means for generating and combining the masks. These masks can include a color segmentation mask, a motion segmentation mask, a frame difference mask, a texture mask, and/or a depth mask, as has been described in the preceding section of the detailed description. The color mask can be used to define substantially precise boundaries of the objects, the motion segmentation mask to define approximate boundaries, and the frame difference mask to correct errors within the motion segmentation mask.
Furthermore, the program 710 can either pre-process one or more frames of the source video to remove noise, post-process the objects extracted in the finally generated mask to remove noise, or both, although the invention is not so limited. Pre-processing and post-processing can be performed as has been described in the preceding section of the detailed description. In one embodiment, the program 710 also corresponds to the means for pre-processing and/or post-processing.
Although specific embodiments have been illustrated and described herein, it will be appreciated by those of ordinary skill in the art that any arrangement which is calculated to achieve the same purpose may be substituted for the specific embodiments shown. This application is intended to cover any adaptations or variations of the present invention. Therefore, it is manifestly intended that this invention be limited only by the following claims and equivalents thereof.
This U.S. Nonprovisional Application for Letters Patent claims priority from, and is a Continuation Application of, U.S. Nonprovisional application for Letters patent No. 09/468,985, filed on Dec. 21, 1999, and entitled “Automatic Video Object Extraction”, now issued as U.S. Pat. No. 6,785,329 on Aug. 31, 2004.
Number | Name | Date | Kind |
---|---|---|---|
5479218 | Etoh | Dec 1995 | A |
5608458 | Chen et al. | Mar 1997 | A |
5936671 | Van Beek et al. | Aug 1999 | A |
5995668 | Corset et al. | Nov 1999 | A |
6005625 | Yokoyama | Dec 1999 | A |
6035060 | Chen et al. | Mar 2000 | A |
6075875 | Gu | Jun 2000 | A |
6141434 | Christian et al. | Oct 2000 | A |
6266443 | Vetro et al. | Jul 2001 | B1 |
6337917 | Onural et al. | Jan 2002 | B1 |
6348918 | Szeliski et al. | Feb 2002 | B1 |
6400846 | Lin et al. | Jun 2002 | B1 |
6421090 | Jiang et al. | Jul 2002 | B1 |
6625333 | Wang et al. | Sep 2003 | B1 |
7143434 | Paek et al. | Nov 2006 | B1 |
Number | Date | Country |
---|---|---|
WO 9833323 | Jul 1998 | WO |
Number | Date | Country | |
---|---|---|---|
20040252886 A1 | Dec 2004 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 09468985 | Dec 1999 | US |
Child | 10890355 | US |