METHOD OF CONVERTING 2D VIDEO TO 3D VIDEO USING MACHINE LEARNING
Machine learning method that learns to convert 2D video to 3D video from a set of training examples. Uses machine learning to perform any or all of the 2D to 3D conversion steps of identifying and locating objects, masking objects, modeling object depth, generating stereoscopic image pairs, and filling gaps created by pixel displacement for depth effects. Training examples comprise inputs and outputs for the conversion steps. The machine learning system generates transformation functions that generate the outputs from the inputs; these functions may then be used on new 2D videos to automate or semi-automate the conversion process. Operator input may be used to augment the results of the machine learning system. Illustrative representations for conversion data in the training examples include object tags to identify objects and locate their features, Bézier curves to mask object regions, and point clouds or geometric shapes to model object depth.
Latest LEGEND3D, INC. Patents:
This application is a continuation in part of U.S. Utility patent application Ser. No. 14/857,704, filed 17 Sep. 2015, the specification of which is hereby incorporated herein by reference.
BACKGROUND OF THE INVENTIONField of the Invention
One or more embodiments of the invention are related to the field of image processing. More particularly, but not by way of limitation, one or more embodiments of the invention enable a method of converting 2D video to 3D video using machine learning. Embodiments of the invention train a machine learning system to perform one or more 2D to 3D conversion steps. The machine learning system is trained on a training set that includes 2D to 3D conversion examples; it derives generalized 2D to 3D transformation functions from this training set. Embodiments of the invention may also obtain 3D models of objects, such as characters, and process the frames of a video to locate and orient these models in the frames. Depth maps and stereoscopic 3D video may then be generated from the 3D models. Embodiments of the invention may convert 3D scanner data to a set of rotated planes associated with masked areas of the data, thus forming a 3D object model. This enables the planes to be manipulated independently or as part of a group, and eliminates many problems associated with importing external 3D scanner data including minimization of errors that frequently exist in external 3D scanner data.
Description of the Related Art
Two-dimensional images contain no depth information and hence appear the same to an observer's left and right eye. Two-dimensional images include paper photographs or images displayed on a standard computer monitor. Two-dimensional images however may include shading and lighting that provide the observer a sense of depth for portions of the image, however, this is not considered a three-dimensional view of an image. Three-dimensional images on the other hand include image information that differs for each eye of the observer. Three-dimensional images may be displayed in an encoded format and projected onto a two-dimensional display. This enables three-dimensional or stereoscopic viewing for example with anaglyph glasses or polarized glasses. Other displays may provide different information based on the orientation with respect to the display, e.g., autostereoscopic displays that do not require special glasses for viewing three-dimensional images on a flat two-dimensional display. An example of such as display is a lenticular display. Alternatively, two images that are shown alternately to the left and right eyes may be viewed with shutter glasses. Regardless of the type of technology involved, conversion of two-dimensional images to stereoscopic images requires the addition of depth information to the two-dimensional input image.
Current solutions for conversion of two-dimensional images to stereoscopic images generally require large amounts of manual labor for highly accurate results. These manual masking systems generally operate by accepting manually created masks in order to define areas or regions in the image that have different depths and which generally represent different human observable objects. Depth information is then accepted by the system as input from artists for example, which results in nearer objects being shifted relatively further horizontally to produce left and right eye viewpoints or images, or Red/Blue anaglyph single image encodings, either of which may be utilized for stereoscopic viewing. By shifting objects in the foreground, hidden or background information may be exposed. If the missing image data is not shown in any other images in a scene, then the “gap” must be filled with some type of image data to cover the artifact. If the hidden image data does not exist in any other image in a scene, then this prohibits borrowing of pixels from the areas in other images that do contain the missing information. Various algorithms exist for filling gaps, which are also known as occlusion filling algorithms, to minimize the missing information with varying success. Generally, the depth artist gains visual clues from the image and applies depth to masks using artistic input.
The 2D to 3D conversion processes described above require large amount of manual labor. There are no known systems that automate the conversion process. However, because some organizations have performed hundreds or thousands of 2D to 3D conversions, there is a considerable database of conversion examples. In principle, machine learning techniques can be applied to develop generalized 2D to 3D conversion methods from such a historical database of conversion examples. Machine learning techniques are known in the art, but they have not been applied to 2D to 3D conversion. There are no known systems that apply machine learning techniques to develop 2D to 3D conversion methods using a database of conversion examples.
For at least the limitations described above there is a need for a method to convert 2D video to 3D video using machine learning.
BRIEF SUMMARY OF THE INVENTIONOne or more embodiments described in the specification are related to a method of converting of 2D video to 3D video using 3D object models that provides increased artistic and technical flexibility and rapid conversion of movies for stereoscopic viewing. Embodiments of the invention convert a large set of highly granular depth information inherent in a depth map associated with a two-dimensional image to a smaller set of rotated planes associated with masked areas in the image. This enables the planes to be manipulated independently or as part of a group and eliminates many problems associated with importing external depth maps including minimization of errors that frequently exist in external depth maps
Embodiments of the invention may utilize any type of depth map including Z-Depth associated with images that are generated through rendering from a Computer Generated Imagery or CGI application such as MAYA® or HOUDINI®, depth maps obtained after conversion of a disparity map from a stereoscopic pair of images to a Z-Depth, Z-Depth extraction from of a light-field image, time-of-flight imaging systems, LIDAR, or any other type of depth map associated with a two-dimensional image.
Embodiments of the invention include a number of inherent advantages over simply using the Z-Depths as is currently performed in automated or semi-automated 2D to 3D conversion processes.
For example, embodiments of the invention transform the large set of depth map depths or Z-Depth into a manageable number of parts. Thus, the system enables an artist to manipulate individual or groups of parts for artistic purposes, as opposed to pixel-by-pixel editing. So, for example, an artist may independently adjust the angle, and hence depth of a robot's arm so the resulting stereoscopic image appears to reach out of the screen.
In addition, by transforming the Z-Depth into a manageable number of parts, the system enables an artist to group these parts and apply separate RGB image layers to these groups. This enables more efficient occlusion filling in the 2D to 3D conversion workflow.
Furthermore, embodiments of the invention mold depth data to eliminate depth errors by transforming large numbers of depth values to smaller number of plane rotations. In one embodiment, the system may calculate the normal and position for a specific region, for example to form an average, rotation value associated with a plane that represents a large group of depth values, some of which may be erroneous. Hence, issues associated with imperfect depth map data are often averaged out, or otherwise eliminated. In some extreme cases of noisy depth data, these issues may not be fully resolved, however, embodiments of the invention reduce the problem to a manageable number of editable parts, and enable the issues to be rapidly and easily corrected automatically or by accepting inputs from an artist. One or more embodiments of the invention may utilize a normal vector algorithm. Other algorithms may be utilized alone or in combination with the normal vector method to achieve similar or advantageous results. For example, embodiments of the invention may treat each pixel as a point in space, e.g., wherein X and Y represent the position of the pixel and Z represents the Z-Depth value of that pixel, and isolate only the points within the defined region, and calculate the “best-fit” plane for that group of points, and/or a normal vector representation of the plane. The normal vector in this embodiment is orthogonal to the plane and may be encoded into separate RGB channels in order to provide a viewable representation of the planar angles with respect to the optical display. Embodiments of the invention may utilize any type of plane fitting algorithm including, but not limited to, regression plane, orthogonal distance regression plane, etc. Embodiments of the invention may utilize any type of filtering as part of the transformation processing including but not limited to dilation and erosion.
One or more embodiments of the invention implement a method on a computer for example wherein the method includes obtaining an external depth map associated with a two-dimensional image, obtaining at least one mask associated with at least one area within the two-dimensional image, calculating a fit or best fit for a plane using a computer based on depth associated with the at least one area associated with each of the at least one mask, applying depth associated with the plane having the fit to the at least one area to shift pixels in the two-dimensional image horizontally to produce a stereoscopic image or stereoscopic image pair.
Embodiments of the method may also include obtaining of the external depth map associated with a two-dimensional image by obtaining a disparity map, or a depth map of lower resolution than the two-dimensional image from a pair of witness cameras, or a depth map from time-of-flight system, or a depth map from a triangulation system.
Embodiments of the invention may also include obtaining at least one mask associated with at least one area within the two-dimensional image by automatically generating the at least one mask comprising the at least one area wherein the at least one area is over a predefined size and within a predefined depth range, or automatically generating the at least one mask comprising the at least one area wherein the at least one area comprises a boundary having a difference in luminance values over a predefined threshold, or both methods of size, depth range and boundary or any combination thereof.
Embodiments of the invention may also include calculating the best fit for a plane using a computer based on depth associated with the at least one area associated with each of the at least one mask by calculating a normal vector for the plane, or a regression fit for the plane, or an orthogonal distance regression fit for the plane, or in any other known manner regarding fitting a plane to particulars points in three-dimensional space.
Embodiments of the invention generally also include applying depth associated with the plane having the best fit to the at least one area to shift pixels in the two-dimensional image horizontally to produce a stereoscopic image or stereoscopic image pair.
Embodiments may also include grouping two or more of the planes in order to provide a piecewise masked surface area. The grouping may include a link of a predefined minimum and maximum distance, which enables moving one plane to move other grouped planes if the maximum values are hit. The minimum values may be zero or negative to allow to precise joining of planes or slight overlap for example. In one or more embodiments, the grouping may include a link having a spring constant, this enables the movement of planes relative to one another to self align with respect to the other planes to minimize the overall spring force on three or more of the corner points of the plane. Alternatively or in combination, embodiments of the invention may include altering automatically any combination of position, orientation, shape, depth or curve of said plane in order to fit edges or corners of the plane with another plane. This enables a plane to be positioned in three-dimensional space, rotated in three-dimensions, reshaped by moving a corner point, warped in effect by adding depth or a curve to the plane, for example to add depth to the plane itself to match the underlying image data. Embodiments of the invention may also include accepting an input to alter any combination of position, orientation, shape, depth or curve of the plane, for example to artistically fit the underlying image data, correct errors or artifacts from the automated fitting process for touch up, etc.
One or more embodiments of the invention use one or more 3D object models to convert all or portions of a 2D video to a 3D video. A 3D object model may be obtained from any source and in any format for any object or objects that appear in one or more frames of a 2D video. For a scene of the 2D video containing the object, a 3D space may be defined for example with coordinate axes for the location of the scene. A 3D object model may then be positioned and oriented in this 3D space for each frame in which the corresponding object appears. From this positioned and oriented 3D object model, a depth map for the object in the frame may be generated. Embodiments may augment the depth map with depth information for other elements in the frame. A stereoscopic image pair may then be generated from the depth map and from the 2D frame using techniques known in the art for 2D to 3D conversion.
One or more embodiments may obtain 3D scanner data for an object, and convert this scanner data into a 3D model for the object. 3D data may be obtained using any 3D scanning technology, including for example laser systems using time-of-flight or triangulation, or systems using structured light fields. 3D data may be obtained from stereo cameras or systems with witness cameras. Any technique for obtaining 3D data describing an object is in keeping with the spirit of the invention.
Conversion of 3D data to a 3D object model may for example include retopologizing the 3D data to a lower polygon count model or to a model with parameterized surfaces. One or more embodiments may use retopologizing techniques to reduce model complexity. Conversion may for example include fitting one or more planes to the 3D data and generating a 3D object model from these planes. Any of the techniques described above for fitting and adjusting planes or other surfaces may be used in one or more embodiments to generate a 3D object model. For example, one or more planes may be defined using regression fit, orthogonal distance regression fit, or calculation of normal vectors to the planes. One or more embodiments may combine multiple planes into groups of planes with links between the planes; links may for example define constraints between the edges or corners of the planes. One or more embodiments may employ link constraints that define maximum or minimum values for distances or angles. One or more embodiments may employ link constraints that use spring constants for the links and that for example minimize a potential energy of the model using the spring constants. One or more embodiments may define masks for selected areas of the model, using for example areas of predefined size or predefined depth, or areas with boundaries determined by changes in luminance or other image features over predefined thresholds.
One or more embodiments may adjust the planes or surfaces fit to 3D data, for example by altering one or more of position, orientation, shape, depth or curve of the more planes in order to fit edges or corners of said the planes with one another. Adjustments may be made manually or may be made automatically using a computer. The adjusted planes or surfaces may be used to generate a 3D object model.
One or more embodiments may locate and orient a 3D model in a frame using one or more model features. Features on the 3D object model may be aligned with pixel locations in the frame, and the 3D object model position and orientation in the 3D space of the scene may be calculated using techniques known in the art to minimize errors between observed pixel coordinates and the projection of the 3D feature points onto the image plane. One or more embodiments may align 3D object models with images in a frame in one or more key frames, and automatically determine the alignment in non-key frames using automated feature tracking.
In one or more embodiments one or more objects may be non-rigid in that they comprise multiple parts that may move relative to one another. One or more embodiments may generate or obtain rigged 3D object models with degrees of freedom between the parts of the models. Locating and orienting these rigged models in frames may include determining values for the degrees of freedom of the rigged models. These values may be determined manually, automatically, or using a combination of manual and automated techniques. One or more embodiments may determine the location and orientation of each part of a rigged 3D object model by aligning features of the parts with pixels in an image of the object in a frame. Values for degrees of freedom may be interpolated automatically between key frames. One or more embodiments may manually locate and orient an object and define values for degrees of freedom in key frames, and may use feature tracking to automatically determine the object location and orientation and the values of the degrees of freedom in non-key frames.
One or more embodiments of the invention use machine learning for conversion of 2D video to 3D video. A machine learning system may be trained on a training set comprising conversion examples. A conversion example describes the conversion of a 2D scene to 3D. It may for example contain a 3D conversion dataset that includes the inputs and outputs from one or more 2D to 3D conversion steps. 2D to 3D conversion steps may include, for example locating and identifying one or more objects in one or more 2D frames, generating object masks for these objects, generating depth models for these objects, generating a stereoscopic image pair for each 2D frame, and filling gaps in the image pair with pixel values for the missing pixels. A machine learning system may learn to perform any or all of these steps using the training set to develop the machine learning algorithms and functions. The machine learning system may then be used to perform 2D to 3D conversion on a new 2D video. In one or more embodiments some 2D to 3D conversion steps may be performed automatically by a machine learning system; other steps may be performed, completed, or modified by an operator.
One or more embodiments may use machine learning to perform object masking. For example, a 3D conversion dataset associated with a conversion example in the training set may include a masking input and a masking output. The masking input may include, for example, an object identity and a location of one or more feature points of the object in one or more frames. The masking output may include, for example, a path defining a boundary of a masked region for the object. The path may comprise, for example, one or more segments, each of which may be a curve defined by one or more control points. The machine learning system may learn a function that maps these masking inputs to these masking outputs.
One or more embodiments may use machine learning to generate an object depth model. For example, a 3D conversion dataset associated with a conversion example in the training set may include an object depth model input, and an object depth model output. The object depth model input may include, for example, an object mask. The corresponding output may include any information that assigns depth to one or more points within the mask. For example, an object depth model output may include a 3D point cloud giving 3D coordinates for points within the mask. An object depth model output may include a geometric model comprising regions within the mask, and associating each region with a planar or curved surface in 3D space. The machine learning system may learn a function that maps object depth model inputs, such as a mask, into the corresponding object depth model outputs.
One or more embodiments may use machine learning to perform gap filling. One method of gap filling used by one or more embodiments is to generate a clean plate frame from one or more 2D frames, and to use pixels from the clean plate frame to fill missing pixels. A 3D conversion dataset associated with a conversion example in the training set may include a clean plate input and a clean plate output. The clean plate input may include for example a series of 2D frames; collectively these frames may contain all of the clean plate pixels, but the machine learning system needs to learn how to extract them from the individual frames. The clean plate output may include the clean plate frame. The machine learning system may learn a function that maps 2D frames into the corresponding clean plate frame.
One or more embodiments may use machine learning to perform all of the steps of object masking, object depth modeling, and clean plate generation for gap filling.
One or more embodiments may use a 3D object model to perform object masking, object depth modeling, or both. A 3D object model may be obtained, for example, from 3D scanner data. One or more embodiments may combine machine learning methods with the use of 3D object models to perform 2D to 3D conversion.
The patent or application file contains at least one drawing executed in color. Copies of this patent or patent application publication with color drawing(s) will be provided by the Office upon request and payment of the necessary fee.
The above and other aspects, features and advantages of the invention will be more apparent from the following more particular description thereof, presented in conjunction with the following drawings wherein:
A method for converting 2D video to 3D video using machine learning will now be described. In the following exemplary description numerous specific details are set forth in order to provide a more thorough understanding of embodiments of the invention. It will be apparent, however, to an artisan of ordinary skill that embodiments of the invention may be practiced without incorporating all aspects of the specific details described herein. In other instances, specific features, quantities, or measurements well known to those of ordinary skill in the art have not been described in detail so as not to obscure the invention. Readers should note that although examples of the invention are set forth herein, the claims, and the full scope of any equivalents, are what define the metes and bounds of the invention.
Embodiments of the method may also include obtaining of the external depth map associated with a two-dimensional image by obtaining a disparity map, or a depth map of lower resolution than the two-dimensional image from a pair of witness cameras, or a depth map from time-of-flight system, or a depth map from a triangulation system. Embodiments of the invention may also include obtaining any type of depth map at 201 including Z-Depth associated with images that are generated through rendering from a Computer Generated Imagery or CGI application such as MAYA® or HOUDINI® as shown for example in
Embodiments of the invention include a number of inherent advantages over simply using the Z-Depths as is currently performed in automated or semi-automated 2D to 3D conversion processes.
For example, embodiments of the invention transform the large set of depth map depths or Z-Depth into a manageable number of parts. Thus, the system enables artist 160 to manipulate individual or groups of parts for artistic purposes, as opposed to pixel-by-pixel editing. So, for example, the artist may independently adjust the angle, and hence depth of a robot's arm so the resulting stereoscopic image appears to reach out of the screen. In one or more embodiments, the planes may be grouped and movement or reshaping of a plane in two or three dimensions may move or reshape other grouped or otherwise coupled planes.
In addition, by transforming the Z-Depth into a manageable number of parts, the system enables an artist to group these parts and apply separate RGB image layers to these groups. This enables more efficient occlusion filling in the 2D to 3D conversion workflow.
Whether using a perfect depth map that is error free or not, embodiments of the invention may also include calculating the best fit for a plane using a computer based on depth associated with the at least one area associated with each of the at least one mask by calculating a normal vector for the plane, or a regression fit for the plane, or an orthogonal distance regression fit for the plane, or in any other known manner regarding fitting a plane to particulars points in three-dimensional space. Specifically, embodiments of the invention mold depth data to eliminate depth errors by transforming large numbers of depth values to smaller number of plane rotations. In one embodiment, the system may calculate the normal and position for a specific region, for example to form an average, rotation value associated with a plane that represents a large group of depth values, some of which may be erroneous. Hence, issues associated with imperfect depth map data are often averaged out, or otherwise eliminated. In some extreme cases of noisy depth data, these issues may not be fully resolved, however, embodiments of the invention reduce the problem to a manageable number of editable parts, and enable the issues to be rapidly and easily corrected automatically or by accepting inputs from an artist. Although embodiments of the invention may utilize a normal vector approach, other algorithms may be utilized alone or in combination to achieve similar or advantageous results. For example, embodiments of the invention may treat each pixel as a point in space, e.g., wherein X and Y represent the position of the pixel and Z represents the Z-Depth value of that pixel, and isolate only the points within the defined region, and calculate the “best-fit” plane for that group of points. Embodiments of the invention may utilize any type of plane fitting algorithm including but not limited to regression plane, orthogonal distance regression plane, etc. Commonly available statistics toolboxes include orthogonal regression using principal components analysis for example that may be utilized as off the shelf software components for calculation of best fitting planes to a number of points for example to minimize the perpendicular distances from each of the points to a plane. Embodiments of the invention may utilize any type of filtering as part of the transformation processing including but not limited to dilation and erosion. In one or more embodiments, an algorithm that iterates over a set of depth slopes and averages the slopes over an area for example is one example of an algorithm that may be utilized to calculate the normal vector for a particular area of the depth map.
Alternatively or in combination, embodiments of the invention may include altering automatically any combination of position, orientation, shape, depth or curve of said plane in order to fit edges or corners of the plane with another plane. This enables a plane to be positioned in three-dimensional space, rotated in three-dimensions, reshaped by moving a corner point, warped in effect by adding depth or a curve to the plane, for example to add depth to the plane itself to match the underlying image data. Embodiments of the invention may also include accepting an input to alter any combination of position, orientation, shape, depth or curve of the plane, for example to artistically fit the underlying image data, correct errors or artifacts from the automated fitting process for touch up, etc.
Embodiments of the invention generally also include applying depth associated with the plane having the best fit to the at least one area to shift pixels in the two-dimensional image horizontally to produce a stereoscopic image or stereoscopic image pair. Any type of output that is capable of providing different left and right eye information is in keeping with the spirit of the invention.
One or more embodiments of the invention may use external depth information incorporated into a 3D model of one more objects that appear in a scene. A 3D object model may for example provide depth for the portions of an object, rather than for an entire image or an entire sequence of frames in a video. By locating and orienting the 3D object model in each image or frame, one or more embodiments may simplify the task of generating a depth map for an entire image or for an entire video.
In step 1030 the frames containing the object are identified. For example, in
One or more embodiments may obtain one or more 3D object models from any source or sources and in any format or formats. One potential source for 3D object models is 3D scanner data. 3D scanner data may for example be obtained from an object and converted into a 3D object model used for 2D to 3D conversion. Any object may be used to generate a 3D object model, such as for example, without limitation, a person, a group of persons, an animal, an inanimate object, a machine, a building, a vehicle, a computer-generated figure, or a physical model of any other object.
One or more embodiments may use any technique or techniques to determine the position and orientation of a 3D object model in a frame. These techniques may be manual, automated, or a combination of manual and automated techniques.
One or more embodiments may locate 3D object model features in one or more frames manually, automatically, or using a combination of manual and automated methods.
With a rigged 3D object model, aligning the object model with an image in a frame involves positioning and orienting each part of the model. In general, this alignment determines an overall position and orientation for the model, along with values for each degree of freedom. One or more embodiments may use manual, automated, or mixed methods to determine the model orientation and position and the values of each degrees of freedom in any frame. One or more embodiments may manually set the values for each degree of freedom in one or more key frames, and use automated or semi-automated methods to determine these values in non-key frames. For example, one or more embodiments may automatically interpolate values for degrees of freedom between key frames. One or more embodiments may use features on each or a subset of the model parts, and use automated feature tracking for the parts to determine values for the degrees of freedom.
In converting 3D scan data to a 3D object model, one or more embodiments may fit one or more planes to the scan data using any or all of the techniques described above.
One or more embodiments may use machine learning to execute any or all conversion steps in converting a 2D video to a 3D video. In the art, these steps for 2D to 3D conversion are often performed manually, sometimes with assistance from specialized tools. One or more embodiments of the invention enable a method for performing one or more of these steps using a machine learning system. This system may dramatically reduce the time and cost of 2D to 3D conversion. A machine learning system may also be used to track complexity, costs, budgets, status, capacity, and workload, and to forecast these variables for projects or tasks.
Generation of stereo images by 2D-3D Conversion process 1940 may in some cases create gaps in images as objects are shifted left and right based on depth. The Machine Learning System 1900 may perform Gap Filling 1960 to fill these gaps. For example, the system may generate Clean Plate images that contain background elements only, and extract pixels from the Clean Plate to fill the gaps. Clean Plates may be generated for example using Object Tracking 1950, which allows the system to identify moving objects and to separate stationary objects from moving objects in each frame.
Centralized Machine Learning System 1900 may also perform project planning, budgeting, tracking, and forecasting. For example, users may input preliminary estimates for budgets and project complexity 1980. As the conversion process proceeds, the system may generate and update forecasts 1990 for project variables, such as for example required capacity, costs, and bid times.
Machine learning systems and methods for training these systems are known in the art. One or more embodiments may use any of these machine learning techniques to design and train machine learning system 1900. For example, without limitation, machine learning system 1900 may include neural networks, deep learning systems, support vector machines, regression models, classifiers, decision trees, ensembles, genetic algorithms, hidden Markov models, and probabilistic models. One or more embodiments may use supervised learning, unsupervised learning, semi-supervised learning, deep learning, or combinations thereof. One or more embodiments may preprocess training data in any desired manner, for example using feature vector selection, dimensionality reduction, or clustering. One or more embodiments may use any optimization technique or techniques to select and refine parameters for the machine learning system.
After machine learning system 1900 is trained, it may be applied to convert a 2D video 2220 to a 3D video 2221. The conversion steps may include, for example, without limitation, any or all of the steps 2010, 2020, 2030, 2040, and 2050 described in
We now describe embodiments of a machine learning system applied to the steps 2020 (Mask Object), 2030 (Model Depth), and 2050 (Fill Gaps). These embodiments are illustrative; one or more embodiments may use any machine learning techniques applied to any or all of the steps required to convert a 2D video to a 3D video. Machine learning techniques to learn any desired function from an input space to an output space are known in the art. The discussion below therefore describes illustrative representations for the inputs and outputs of the 2D to 3D conversion steps. Well-known machine learning techniques may be used to train a machine learning system using a set of training examples comprising these inputs and outputs.
In the illustrative embodiment of
As illustrated in
In one or more embodiments machine learning methods may be combined with other automated or semi-automated processes to perform a 2D to 3D conversion. For example, a 3D object model may be available for one or more objects in a 2D scene. In this case it may not be necessary or desirable to use a machine learning system to perform the Model Depth step 2030 for those objects, since the 3D object models already contain the depth values for the objects. The machine learning system may be used to model depth for other objects in a scene for which there is not 3D object model. It may also be used for other steps, such as for example the Fill Gaps step 2050.
While the invention herein disclosed has been described by means of specific embodiments and applications thereof, numerous modifications and variations could be made thereto by those skilled in the art without departing from the scope of the invention set forth in the claims.
Claims
1. A machine learning method of converting 2D video to 3D video, comprising:
- obtaining a training set comprising a plurality of conversion examples, each conversion example comprising a 2D scene example comprising one or more 2D frame examples; a corresponding 3D conversion dataset example that describes conversion of said 2D scene example to 3D, comprising inputs and outputs for 2D to 3D conversion steps, said 2D to 3D conversion steps comprising obtaining one or more 2D frames; locating and identifying an object in one or more object frames within said one or more 2D frames, each object frame containing an image of at least a portion of said object; generating an object mask for said object in said one or more object frames, said object mask identifying one or more masked pixels representing said object in said one or more object frames; generating an object depth model that assigns a pixel depth to one or more of said one or more masked pixels; generating a stereoscopic image pair for each of said one or more object frames based on said object depth model, said stereoscopic image pair comprising a left image and a right image; and, generating one or more gap filling pixel values for one or more missing pixels in said left image or in said right image;
- training a machine learning system on said training set;
- obtaining a 2D video;
- applying said machine learning system to said 2D video to perform one or more of said 2D to 3D conversion steps on said 2D video; and,
- accepting input from an operator to modify or complete one or more of said 2D to 3D conversion steps on said 2D video.
2. The method of claim 1 wherein
- said machine learning system performs said generating an object mask for said object in said one or more object frames; and,
- said corresponding 3D conversion dataset example comprises a masking input comprising an identity of said object; and, a location of one or more feature points of said object in said one or more object frames; and a masking output comprising a path comprising one or more segments, each segment comprising a curve defined by one or more control points, wherein said path is a boundary of said object mask.
3. The method of claim 1 wherein
- said machine learning system performs said generating an object depth model; and,
- said corresponding 3D conversion dataset example comprises an object depth model input comprising said object mask; and, an object depth model output comprising one or more regions within said object mask; and, a planar or curved 3D surface associated with each of said one or more regions.
4. The method of claim 1 wherein
- said machine learning system performs said generating an object depth model; and,
- said corresponding 3D conversion dataset example comprises an object depth model input comprising said object mask; and, an object depth model output comprising a point cloud of 3D points, each of said 3D points associated with a pixel within said object mask.
5. The method of claim 1 wherein
- said machine learning system performs said generating one or more gap filling pixel values;
- said generating one or more gap filling pixel values comprises generating a clean plate frame from one or more of said one or more 2D frames; and, copying pixel values from said clean plate frame to said one or more missing pixels; and,
- said corresponding 3D conversion dataset example comprises a clean plate input comprising one or more of said one or more 2D frames; and, a clean plate output comprising said clean plate frame associated with said one or more 2D frames.
6. The method of claim 1 wherein
- said machine learning system performs said generating an object mask for said object in said one or more object frames; said generating an object depth model; said generating one or more gap filling pixel values; and, wherein said generating one or more gap filling pixel values comprises generating a clean plate frame from one or more of said one or more 2D frames; and, copying pixel values from said clean plate frame to said one or more missing pixels; and,
- said corresponding 3D conversion dataset example comprises a masking input comprising an identity of said object; and, a location of one or more feature points of said object in said one or more object frames; a masking output comprising a path comprising one or more segments, each segment comprising a curve defined by one or more control points, wherein said path is a boundary of said object mask; an object depth model input comprising said object mask; an object depth model output comprising one or more of a region model comprising one or more regions within said object mask; a planar or curved 3D surface associated with each of said one or more regions; and, a point cloud of 3D points, each of said 3D points associated with a pixel within said object mask; a clean plate input comprising one or more of said one or more 2D frames; and, a clean plate output comprising said clean plate frame associated with said one or more 2D frames.
7. The method of claim 1, wherein
- said generating an object mask for said object in said one or more object frames comprises defining a 3D space associated with said one or more object frames; obtaining a 3D object model of said object; and, defining a position and orientation of said 3D object model in said 3D space that aligns said 3D object model with said image of at least a portion of said object in said one or more object frames; and,
- said assigns a pixel depth to one or more of said one or more masked pixels comprises associates a point in said 3D object model in said 3D space with each masked pixel; and, assigns a depth of said point in said 3D space to said pixel depth for the associated masked pixel.
8. The method of claim 7, wherein said obtaining a 3D object model of said object comprises
- obtaining 3D scanner data captured from said object; and,
- converting said 3D scanner data into said 3D object model.
9. The method of claim 8, wherein said obtaining said 3D scanner data comprises obtaining data from a time-of-flight system or a light-field system.
10. The method of claim 8, wherein said obtaining said 3D scanner data comprises obtaining data from a triangulation system.
11. The method of claim 8, wherein said converting said 3D scanner data into said 3D object model comprises
- retopologizing said 3D scanner data to form said 3D object model from a reduced number of polygons or parameterized surfaces.
12. The method of claim 7, further comprising
- dividing said 3D object model into object parts, wherein said object parts may have motion relative to one another;
- augmenting said 3D object model with one or more degrees of freedom that reflect said motion relative to one another of said object parts; and,
- determining values of each of said one or more degrees of freedom that align said image of said at least a portion of said object in a plurality of frames of said one or more object frames with said 3D object model modified by said values of said one or more degrees of freedom.
13. The method of claim 12, wherein said determining values of each of said one or more degrees of freedom comprises
- selecting one or more features in each of said object parts, each having coordinates in said 3D object model;
- determining pixel locations of said one or more features in said one or more object frames; and,
- calculating a position and orientation of one of said object parts and calculating said values of each of said one or more degrees of freedom to align a projection of said coordinates in said 3D model onto a camera plane with said pixel locations in said one or more object frames.
14. The method of claim 13, wherein said determining pixel locations of
- said one or more features in said one or more object frames comprises
- selecting said pixel locations in one or more key frames; and,
- tracking said features across one or more non-key frames using a computer.
Type: Application
Filed: Dec 14, 2015
Publication Date: Mar 23, 2017
Applicant: LEGEND3D, INC. (Carlsbad, CA)
Inventors: Anthony LOPEZ (Carlsbad, CA), Jacqueline McFARLAND (Carlsbad, CA), Tony BALDRIDGE (Carlsbad, CA)
Application Number: 14/967,939