System and method for processing video images

Some representative embodiments are directed to creating a “virtual world” by processing a series of two dimensional images to generate a representation of the physical world depicted in the series of images. The virtual world representation includes models of objects that specify the locations of the objects within the virtual world, the geometries of the objects, the dimensions of the objects, the surface representation of the objects, and/or other relevant information. By developing the virtual world representation, a number of image processing effects may be applied such as generation of stereoscopic images, object insertion, object removal, object translation, and/or other object manipulation operations.

TECHNICAL FIELD

The present invention is generally directed to processing graphical images.

BACKGROUND

A number of technologies have been proposed and, in some cases, implemented to perform a conversion of one or several two dimensional images into one or several stereoscopic three dimensional images. The conversion of two dimensional images into three dimensional images involves creating a pair of stereoscopic images for each three dimensional frame. The stereoscopic images can then be presented to a viewer's left and right eyes using a suitable display device. The image information between respective stereoscopic images differ according to the calculated spatial relationships between the objects in the scene and the viewer of the scene. The difference in the image information enables the viewer to perceive the three dimensional effect.

An example of a conversion technology is described in U.S. Pat. No. 6,477,267 (the '267 patent). In the '267 patent, only selected objects within a given two dimensional image are processed to receive a three dimensional effect in a resulting three dimensional image. In the '267 patent, an object is initially selected for such processing by outlining the object. The selected object is assigned a “depth” value that is representative of the relative distance of the object from the viewer. A lateral displacement of the selected object is performed for each image of a stereoscopic pair of images that depends upon the assigned depth value. Essentially, a “cut-and-paste” operation occurs to create the three dimensional effect. The simple displacement of the object creates a gap or blank region in the object's background. The system disclosed in the '267 patent compensates for the gap by “stretching” the object's background to fill the blank region.

The '267 patent is associated with a number of limitations. Specifically, the stretching operations cause distortion of the object being stretched. The distortion needs to be minimized to reduce visual anomalies. The amount of stretching also corresponds to the disparity or parallax between an object and its background and is a function of their relative distances from the observer. Thus, the relative distances of interacting objects must be kept small.

Another example of a conversion technology is described in U.S. Pat. No. 6,466,205 (the '205 patent). In the '205 patent, a sequence of video frames is processed to select objects and to create “cells” or “mattes” of selected objects that substantially only include information pertaining to their respective objects. A partial occlusion of a selected object by another object in a given frame is addressed by temporally searching through the sequence of video frames to identify other frames in which the same portion of the first object is not occluded. Accordingly, a cell may be created for the full object even though the full object does not appear in any single frame. The advantage of such processing is that gaps or blank regions do not appear when objects are displaced in order to provide a three dimensional effect. Specifically, a portion of the background or other object that would be blank may be filled with graphical information obtained from other frames in the temporal sequence. Accordingly, the rendering of the three dimensional images may occur in an advantageous manner.

SUMMARY

Some representative embodiments are directed to creating a “virtual world” by processing a series of two dimensional images to generate a representation of the physical world depicted in the series of images. The virtual world representation includes models of objects that specify the locations of the objects within the virtual world, the geometries of the objects, the dimensions of the objects, the surface representation of the objects, and/or other relevant information. By developing the virtual world representation, a number of image processing effects may be applied.

In one embodiment, stereoscopic images may be created. To create a pair of stereoscopic images, two separate views of the virtual world are rendered that correspond to the left and right eyes of the viewer using two different camera positions. Rendering stereoscopic images in this manner produces three dimensional effects of greater perceived quality than possible using known conversion techniques. Specifically, the use of a three dimensional geometry to perform surface reconstruction enables a more accurate representation of objects than possible when two dimensional correlation is employed.

In one embodiment, the algorithm analysis and manual input are applied to a series of two dimensional images using an editing application. A graphical user interface of the editing application enables an “editor” to control the operations of the image processing algorithms and camera reconstruction algorithms to begin the creation of the object models. Concurrently with the application of the algorithms, the editor may supply the user input to refine the object models via the graphical user interface. By coordinating manual and autonomous image operations, a two dimensional sequence may be converted into the virtual world representation in an efficient manner. Accordingly, further image processing such as two to three dimension conversation may occur in a more efficient and more accurate manner than possible using known processing techniques.

DETAILED DESCRIPTION OF THE INVENTION

Referring now to the drawings,FIG. 1depicts sequence100of video images that may be processed according to some representative embodiments. Sequence100of video images includes key frames101-104. Multiple other frames may exist between these key frames.

As shown inFIG. 1, sphere150possesses multiple tones and/or chromatic content. One half of sphere150is rendered using first tone151and the other half of sphere150is rendered using second tone152. Sphere150undergoes rotational transforms through video sequence100. Accordingly, in key frame102, a greater amount of tone151is seen relative to key frame101. In key frame103, sufficient rotation has occurred to cause only tone151of sphere150to be visible. In key frame104, tone152becomes visible again on the opposite side of sphere150as compared to the position of tone152in key frame101.

Box160is subjected to scaling transformations in video sequence100. Specifically, box160becomes smaller throughout video sequence100. Moreover, box160is translated during video sequence100. Eventually, the motion of box160causes box160to be occluded by sphere150. In key frame104, box160is no longer visible.

According to known image processing techniques, the generation of stereoscopic images for key frame103would occur by segmenting or matting sphere150from key frame103. The segmented or matted image data for sphere150would consist of a single tone (i.e., tone151). The segmented or matted image data may be displaced in the stereoscopic views. Additionally, image filling or object stretching may occur to address empty regions caused by the displacement. The limitations associated with some known image processing techniques are seen by the inability to accurately render the multi-tone surface characteristics of sphere150. Specifically, because the generation of stereoscopic views according to known image processing techniques only uses the matted or segmented image data, known techniques would render sphere150as a single-tone object in both the right and left images of a stereoscopic pair of images. However, such rendering deviates from the views that would be actually produced in a three dimensional scene. In an actual three dimensional scene, the right view may cause a portion of tone152to be visible on the right side of sphere150. Likewise, the left view may cause a portion of tone152to be visible on the left side of sphere150.

Representative embodiments enable a greater degree of accuracy to be achieved when rendering stereoscopic images by creating three dimensional models of objects within the images being processed. A single three dimensional model may be created for box160. Additionally, the scaling transformations experienced by box160may be encoded with the model created for box160. Representations201-204of box160as shown inFIG. 2correspond to the key frames101-104. Additionally, it is noted that box160is not explicitly present in key frame104. However, because the scaling transformations and translations can be identified and encoded, representation204of box160may be created for key frame104. The creation of a representation for an object that is not visible in a key frame may be useful to enable a number of effects. For example, an object removal operation may be selected to remove sphere150thereby causing box160to be visible in the resulting processed image(s).

In a similar manner, a three dimensional model may be selected or created for sphere150. The rotational transform information associated with sphere150may be encoded in association with the three dimensional model.

Using the three dimensional models and camera reconstruction information, a three dimensional scene including the locations of the objects within the scene may be defined.FIG. 3depicts an “overhead” view of scene300including three dimensional model301of sphere150and three dimensional model302of box160that correspond to key frame103. As shown inFIG. 3, tone152is generally facing away from the viewing perspectives and tone151is generally facing toward the viewing perspectives. However, because the right view is slightly offset, a portion of tone152is visible. Also, a smaller amount of three dimensional model302of box160is occluded by three dimensional model301of sphere150.

Using three dimensional scene300, left image400and right image500may be generated as shown inFIGS. 4 and 5. Specifically, three dimensional scene300defines which objects are visible, the position of the objects, and the sizes of the objects for the left and right views. The rendering of the objects in the views may occur by mapping image data onto the three dimensional objects using texture mapping techniques. The encoded transform information may be used to perform the texture mapping in an accurate manner. For example, the rotation transform information encoded for sphere150enables the left portion of sphere150to include tone152in left image400. The transform information enables the right portion of sphere150to include tone152in right image500. Specifically, image data associated with tone152in key frames102and104may be mapped onto the appropriate portions of sphere150in images400and500using the transform information. Likewise, the surface characteristics of the portion of box160that has become visible in image500may be appropriately rendered using information from key frame102and the transform information.

To further illustrate the operation of some embodiments, reference is made toFIG. 9.FIG. 9depict a set of video frames in which a box is rotating in two axes. Using conventional matte modeling techniques, an object matte would be created for each of frames901-904, because the two dimensional representation of the box is different in each of the frames. The creation of respective object mattes for each of frames901-904may then be a time consuming and cumbersome process. However, according to one representative embodiment, an object model is created for frame901. Because the three dimensional characteristics of the box do not change, only the rotation information may be defined for frames902-904. The surface characteristics of the box can then be autonomously extracted from frames902-904using the object model and the transform information. Thus, some representative embodiments provide a more efficient process for processing video frames than conventional techniques.

FIG. 6depicts an interrelated set of processes for defining three dimensional objects from video images according to one representative embodiment. In process601, outlines of objects of interest are defined in selected frames. The outline of the objects may occur in a semi-autonomous manner. The user may manually select a relatively small number of points of the edge of a respective object. An edge tracking algorithm may then be used to identify the outline of the object between the user selected points. In general, edge tracking algorithms operate by determining the least path cost between two points where the path cost is a function of image gradient characteristics. Domain-specific information concerning the selected object may also be employed during edge tracking. A series of Bezier curves or other parametric curves may be used to encode the outlines of the objects. Further user input may be used to refine the curves if desired.

In process602, camera reconstruction may be performed. Camera reconstruction refers to the process in which the relationship between the camera and the three dimensional scene(s) in the video sequence is analyzed. During this process, the camera's focal length, the camera's relative angular perspective, the camera's position and orientation relative to objects in the scene, and/or other suitable information may be estimated.

In process603, three dimensional models are created or selected from a library of predefined three dimensional models for the objects. Any number of suitable model formats could be used. For example, Constructive Solid Geometry models could be employed in which each object is represented as a combination of object primitives (e.g., blocks, cylinders, cones, spheres, etc.) and logical operations on the primitives (e.g., union, difference, intersection, etc.). Additionally or alternatively, nonuniform rational B-splines (NURBS) models could be employed in which objects are defined in terms of sets of weighted control points, curve orders, and knot vectors. Additionally, “skeleton” model elements could be defined to facilitate image processing associated with complex motion of an object through a video sequence according to kinematic animation techniques.

In process664, transformations and translations are defined as experienced by the objects of interest between key frames. Specifically, the translation or displacement of objects, the scaling of objects, the rotation of objects, morphing of objects, and/or the like may be defined. For example, an object may increase in size between key frames. The increase in size may result from the object approaching the camera or from the object actually become larger (“ballooning”). By accurately encoding whether the object has been increased in size as opposed to merely moving in the three dimensional scene, subsequent processing may occur more accurately. This step may be performed using a combination of autonomous algorithms and user input. For example, motion compensation algorithms may be used to estimate the translation of objects. If an object has experienced scaling, the user may identify that scaling has occurred and an autonomous algorithm may calculate a scaling factor by comparing image outlines between the key frames.

In process605, using the information developed in the prior steps, the positions of objects in the three dimensional scene(s) of the video sequence are defined. The definition of the positions may occur in an autonomous manner. User input may be received to alter the positions of objects for editing or other purposes. Additionally, one or several objects may be removed if desired.

In process606, surface property data structures, such as texture maps, are created.

FIG. 7depicts a flowchart for creating texture map data for a three dimensional object for a particular temporal position according to one representative embodiment. The flowchart for creating texture map data begins in step701where a video frame is selected. The selected video frame identifies the temporal position for which the texture map generation will occur. In step702, an object from the selected video frame is selected.

In step703, surface positions of the three dimensional model that correspond to visible portions of the selected object in the selected frame are identified. The identification of the visible surface positions may be performed, as an example, by employing ray tracing from the original camera position to positions on the three dimensional model using the camera reconstruction data. In step704, texture map data is created from image data in the selected frame for the identified portions of the three dimensional model.

In step706, surface positions of the three dimensional model that correspond to portions of the object that were not originally visible in the selected frame are identified. In one embodiment, the entire remaining surface positions are identified in step706thereby causing as much texture map data to be created for the selected frame as possible. In certain situations, it may be desirable to limit construction of the texture data. For example, if texture data is generated on demand, it may be desirable to only identify surface positions in this step (i) that correspond to portions of the object not originally visible in the selected frame and (ii) that have become visible due to rendering the object according to a modification in the viewpoint. In this case, the amount of the object surface exposed due to the perspective change can be calculated from the object's camera distance and a maximum inter-ocular constant.

In step706, the surface positions identified in step705are correlated to image data in frames prior to and/or subsequent to the selected frame using the defined model of the object, object transformations and translations, and camera reconstruction data. In step707, the image data from the other frames is subjected to processing according to the transformations, translations, and camera reconstruction data. For example, if a scaling transformation occurred between frames, the image data in the prior or subject frame may be either enlarged or reduced depending upon the scaling factor. Other suitable processing may occur. In one representative embodiment, weighted average processing may be used depending upon how close in the temporal domain the correlated image data is to the selected frame. For example, lighting characteristics may change between frames. The weighted averaging may cause darker pixels to be lightened to match the lighting levels in the selected frame. In one representative embodiment, light sources are also modeled as objects. When models are created for light sources, lighting effects associated with the modeled objects may be removed from the generated textures. The lighting effects would then be reintroduced during rendering.

In step708, texture map data is created for the surface positions identified in step705from the data processed in step707. Because the translations, transformations, and other suitable information are used in the image data processing, the texture mapping of image data from other frames onto the three dimensional models occurs in a relatively accurate manner. Specifically, significant discontinuities and other imaging artifacts generally will not be observable.

In one representative embodiment, steps704-707are implemented in association with generating texture data structures that represent the surface characteristics of an object of interest. A given set of texture data structures define all of the surface characteristics of an object that may be recovered from a video sequence. Also, because the surface characteristics may vary over time, a texture data structure may be assigned for each relevant frame. Accordingly, the texture data structures may be considered to capture video information related to a particular object.

The combined sets of data (object model, transform information, camera reconstruction information, and texture data structures) enables construction of a three dimensional world from the video sequence. The three dimensional world may be used to support any number of image processing effects. As previously mentioned, stereoscopic images may be created. The stereoscopic images may approximately correspond to the original two dimensional viewpoint. Alternatively, stereoscopic images may be decoupled from the viewpoint(s) of the original video if image data is available from a sufficient number of perspectives. Additionally, object removal may be performed to remove objects from frames of a video sequence. Likewise, object insertion may be performed.

FIG. 8depicts system800for processing a sequence of video images according to one representative embodiment. System800may be implemented on a suitable computer platform. System800includes conventional computing resources such as central processing unit801, random access memory (RAM)802, read only memory (ROM)803, user-peripherals (e.g., keyboard, mouse, etc.)804, and display805. System800further includes non-volatile storage806.

Non-volatile storage806comprises data structures and software code or instructions that enable conventional processing resources to implement some representative embodiments. The data structures and code may implement the flowcharts ofFIGS. 6 and 7as examples.

As shown inFIG. 8, non-volatile storage806comprises video sequence807. Video sequence807may be obtained in digital form from another suitable medium (not shown). Alternatively, video sequence807may be obtained after analog-to-digital conversation of an analog video signal from an imaging device (e.g., a video cassette player or video camera). Object matting module814defines outlines of selected objects using a suitable image processing algorithm or algorithms and user input. Camera reconstruction algorithm817processes video sequence807to determine the relationship between objects in video sequence807and the camera used to capture the images. Camera reconstruction algorithm817stores the data in camera reconstruction data811.

Model selection module815enables model templates from model library810to be associated with objects in video sequence807. The selection of models for objects are stored in object models808. Object refinement module816generates and encodes transformation data within object models808in video sequence807using user input and autonomous algorithms. Object models808may represent an animated geometry encoding shape, transformation, and position data over time. Object models808may be hierarchical and may have an associated template type (e.g., a chair).

Texture map generation module821generates textures that represent the surface characteristics of objects in video sequence807. Texture map generation module821uses object models808and camera data811to generate texture map data structures809. Preferably, each object comprises a texture map for each key frame that depicts as much surface characteristics as possible given the number of perspectives in video sequence807of the objects and the occlusions of the objects. In particular, texture map generation module821performs searches in prior frames and/or subsequent frames to obtain surface characteristic data that is not present in a current frame. The translation and transform data is used to place the surface characteristics from the other frames in the appropriate portions of texture map data structures809. Also, the transform data may be used to scale, morph, or otherwise process the data from the other frames so that the processed data matches the characteristics of the texture data obtained from the current frame. Texture refinement module822may be used to perform user editing of the generated textures if desired.

Scene editing module818enables the user to define how processed image data820is to be created. For example, the user may define how the left and right perspectives are to be defined for stereoscopic images if a three dimensional effect is desired. Alternatively, the user may provide suitable input to create a two dimensional video sequence having other image processing effects if desired. Object insertion and removal may occur through the receipt of user input to identify objects to be inserted and/or removed and the frames for these effects. Additionally, the user may change object positions.

When the user finishes inputting data via scene editing module818, the user may employ rendering algorithm819to generate processed image data820. Processed image data820is constructed using object models808, texture map data structures809, and other suitable information to provide the desired image processing effects.