# Patent

## Title
Photometric three-dimensional facial capture and relighting

## Abstract

Embodiments disclosed herein relate to a method and apparatus for generating a three-dimensional surface. In one embodiment, there is a method for generating a three-dimensional surface. The method includes capturing a plurality of images of a target object with at least two cameras, the target object illuminated by at least two sets of red-green-blue (RGB) lights positioned in an array about the target object and generating a three-dimensional surface of the target object by iteratively reconstructing a surface estimate of the target object and aligning images of the target object using motion estimation until the images converge, wherein the images are processed in n-frame intervals.

## Background
BACKGROUND
High-resolution geometry and appearances are invaluable assets in the movie and video game industries. A geometry generally refers to an (three-dimensional) object's structure, i.e., the triangles, lines, or points that compose the object, while an appearance generally refers to the object's shading, including its vertex and fragment shaders, and render state. The quality of a three-dimensional model can make or break the perceived realism of an animation. When it comes to facial models, people have a remarkably low threshold for inaccuracies. Even the smallest details in geometry and appearance are important. A variety of computer vision techniques have been developed for reconstructing high-detail geometry and appearances of real objects. However, each technique for constructing 3D models has its own particular limitations. Even when combined as independent processing stages, the combination of techniques can exacerbate errors introduced by early regularization, such as a smoothness constraint introduced by the early regularization.
SUMMARY
According to one embodiment, a method for generating a three-dimensional surface is disclosed herein. The method includes capturing a plurality of images of a target object with at least two cameras, the target object illuminated by at least three sets of red-green-blue (RGB) lights positioned in an array about the target object and generating a three-dimensional surface of the target object by iteratively reconstructing a surface estimate of the target object and aligning images of the target object using motion estimation until the images converge, wherein the images are processed in three-frame intervals.
According to one embodiment, a method for generating a three-dimensional surface is disclosed herein. The method includes capturing an image of a target object with two cameras, one camera positioned to a left of the target object, one camera position to a right of the target object, wherein the target object is illuminated by three sets of red-green-blue (RGB) lights positioned in an array about the target object processing the image in three frame intervals. Processing the image in three frame intervals includes recovering an unknown surface at each frame within the three-frame interval and recovering a backward motion and forward motion within the three-frame interval.
According to another embodiment, a system for reconstructing a three-dimensional surface is disclosed herein. The system includes at least two cameras, at least three sets of red-green-blue (RGB) lights, and a controller. A first camera is positioned to capture a right image of the target object. A second camera is positioned to capture a left image of the target object. The RGB lights are positioned in an array about the target object. The controller is configured to generate a three-dimensional surface of the target object by iteratively reconstructing a surface estimate of the target object and aligning images of the target object using motion estimation until the images converge, wherein the images are processed in three-frame intervals.



BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS
FIG. 1 is a block diagram depicting a system for acquiring image data of an object and generating a three-dimensional geometry and appearance of that object, according to one embodiment of the present disclosure.
FIG. 2 is a flow diagram illustrating a method for generating a three-dimensional geometry and appearance, according to one embodiment.
FIG. 3 is a block diagram illustrating a three flame sliding window of images taken from a left camera and a right camera, according to one embodiment.
FIG. 4 is a flow diagram illustrating a method for generating a three-dimensional surface, according to one embodiment of a present disclosure.
FIG. 5 is a block diagram illustrating an example computing system configured according to an embodiment.



DETAILED DESCRIPTION
A variety of computer vision techniques have been developed for reconstructing high-detail geometry and appearances of real objects. Photometric stereo is one technique for estimating surface normal of objects by observing the objects under different illumination conditions. Multi-view stereo is another technique that reconstructs a 3D object model from a collection of images taken from known camera viewpoints. Photometric stereo is generally used to enhance the detail of an initial low-resolution geometry, most often obtained via the multi-view stereo technique. Although previously computed independently, photometric stereo and multi-view stereo techniques are complementary in nature. Photometric stereo provides continuous depth values even for textureless three-dimensional surfaces. However, photometric stereo suffers from integration drift, or relative depth. Multi-view stereo provides absolute depth, but the technique's estimates can suffer from matching errors, and spatial regularization further smooths fine detail. Regularization is a method that enables learning of mid-scale details without describing random error or noise but instead describing the underlying relationship. When photometric stereo and multi-view stereo are computed independently, the complementary nature of the two are under-explored. In dynamic photometric stereo reconstruction, object motion introduces an additional need to align images taken under significant changes in illumination, which remains a challenging problem. In other approaches, optical flow, which refers to a pattern of apparent motion of objects, surfaces, and edges in a visual scene caused by the relative motion between a camera and the scene, is used as a third independent component. However, the use of optical flow can lead to residual misalignment leading to a loss of detail.
Accordingly, embodiments of the present disclosure provides an approach for dynamic 3D capture of real objects that simultaneously computes photometric stereo, multi-view stereo, and optical flow in a coupled manner. In this approach, the photometric stereo technique not only benefits from, but also facilitates the computation of multi-view stereo and optical flow. Together, the described approach can provide highly-detailed 3D geometry, appearances, and instantaneous 3D motion (flow). The described technique, referred to herein as photogeometric scene flow, can provide dense estimates of 3D motion but at an increased level of geometric detail and with re-lightable, full-color object appearance.
The capture of dynamic events, such as 3D facial expressions, is restricted by a short time window to sample instantaneous surface geometry and appearance (e.g., a smile appears quickly). Accordingly, embodiments of the present disclosure provide a Lambertian model with five degrees of freedom (normal and RGB albedo). Thus, highlights and shadows are outliers that can be detected and ignored. Highlights can also be filtered out by cross-polarizing light and sensor.
To fit the Lambertian model, each surface patch (pixel) of a target object is observed under at least five different illumination conditions. Using color- and time-multiplexed illumination, at least two consecutive video frames (i.e., 6 color channels) are used. The use of video frames introduces the need for adequate motion compensation. Still, due to self-shadows, just two frames can be insufficient to provide enough samples for many surface patches of non-convex shapes, i.e., regions around the nose and cheeks on a human face. Furthermore, using a minimal number of observations can make the results more sensitive to image degradations and pixel noise.
FIG. 1 illustrates one embodiment of a system 100 for acquiring image data of an object and generating a three-dimensional geometry and appearance of that object. The system 100 includes a plurality of colored light sources 102 configured to illuminate a target object 104. In one example, the target object 104 is a human face, although other objects may be captured by the system 100. The system 100 further includes at least two cameras 106 configured to capture video of the target object 104. In some embodiments, the colored light sources 102 and cameras 106 are configured for sampling reflectance of the target object 104 under a set of directional illumination, within an n-frame time window.
In one embodiment, the system 100 includes a controller 110 configured to control operations of the colored light sources 102 and the cameras 106 and capture image data of the target object 104 for processing. The controller 110 is further configured to process the image data to reconstruct a 3D geometry and appearance corresponding to the target object. For simplicity of explanation, the controller 110 is described herein as performing capturing and processing functions. In alternative embodiments, the controller 110 can provide the captured image data to a separate processing system, which then generates a 3D geometry and appearance.
In one embodiment, the plurality of colored light sources 102 is positioned in an array about the target object 104. Each of the colored light sources 102 might be comprised of a cluster of LEDs of a single color—referred to using the labels red, green, and blue—approximately matching the peak wavelength sensitivity of each of the sensors of the cameras 106 (which are typically RGB camera sensors). In the embodiment depicted in FIG. 1, the colored light sources 102 are mounted in a light rig 108 in a substantially circular configuration. The light rig 108 has a radius R, for example, 60 cm radius. In one embodiment, the cameras 106 are disposed proximate to the center of the light rig 108 and are positioned at a distance X from the target object, for example, 200 cm away from the target object.
The colored light sources 102 are organized into sets (e.g., triplets) of RGB sources. The arrangement of sets is selected so as to spread out light sources (in time and space) to reduce the interaction of the lights' shadow areas on the target object. For example, a first triplet is comprised of the lights labelled R5, G6, B1, a second triplet is comprised of lights R2, G9, B4, and a third triplet is comprised of R8, G3, B7, although it is understood that the triplets of lights may be defined in other ways.
In one embodiment, the cameras 106 are configured as part of a binocular setup in which the cameras 106 are synchronized to observe the target object 104 under the same illumination conditions (i.e., light sources 102), which varies over time. One of the cameras 106 is positioned to capture a plurality of images from a left side perspective of the target object (referred to herein as “left images”) and the other of the cameras is positioned to capture a plurality of images from the right side perspective of the object (“right images”). It is understood that embodiments of the present disclosure can be extended to utilize more than two cameras for capturing images from a variety of perspectives of the target object 104.
FIG. 2 illustrates a method 200 for generating a three-dimensional geometry and appearance, according to one embodiment disclosed herein. While the method 200 is described in conjunction with the system 100 of FIG. 1, it is understood that other suitable systems can be utilized to perform the described technique.
The method 200 begins at step 202. At step 202, the controller 110 operates the plurality of colored light sources 102 and the at least two cameras 106 to capture a plurality of images of a target object 104. The colored light sources 102 are organized into sets (e.g., triplets) of RGB sources. The controller 110 turns on each set of colored light sources 102 to illuminate the target object 104, one at a time, in a sequential manner, each for the duration of one video frame.
For example, while capturing a first video frame with both cameras 106, the controller 110 turns on the first triplet of lights (R5, G6, B1) and illuminates the target object 104. At a next video frame, the controller 110 captures images of the target object with cameras 106 while illuminating the target object using the second triplet of lights (R2, G9, B4). At a next video frame, the controller 110 turns on the third triplet of lights (R8, G3, B7) and captures image data of the target object under this sample of illumination. Accordingly, for every three-frame video interval, the controller 110 has captured image data of the target object in nine different illumination conditions. For purposes of discussion herein, captured video data may be considered a sequence of images, also referred herein as image data, frames, video frames, and so forth.
Referring back to FIG. 2, at step 204, a three-dimensional surface of the target object is generated. A controller, such as controller 110, may generate the three-dimensional surface by iteratively reconstructing a surface estimate of the target object and aligning images of the target object using motion estimation until the images converge.
The approach of method 200 is to recover the three-dimensional geometry and RGB albedo of the target object at each time t. To do this, step 204 is performed sequentially within a three-frame sliding window centered at the current frame tw in both camera views. Image alignment aids in making full use of constraints in this time window. The controller estimates the surface motion between frames (tw,tw+1) and (tw,tw−1). Due to nonrigid motion, possible occlusion and the discrete nature of images, the backwards motion (tw,tw−1) is differentiated from the forwards motion (tw=1, tw). Alignment warps images in the direction opposite to motion.
FIG. 3 illustrates a three-frame sliding window 300 of images taken from a left camera and a right camera. Row 302 represents three frames 304, 306, 308 taken at time tw−1, tw,tw+1 respectively, from the left camera. The circles depicted in each frame 304, 306, 308 represent which of the lights from the colored light sources 102 (seen in FIG. 1) were used to illuminate the target object in that respective frame. Row 310 represents three frames 312, 314, 316 taken at time tw−1, tw,tw+1 respectively, from the right camera. The image frames 304, 306, 308, 312, 314, and 316 are taken from a plurality of images 301 captured by the plurality of cameras. The frames 304, 312 at time tw−1 are illuminated by a first set of RGB lights. The frames 306, 314 at time tw are illuminated by a second set of RGB lights. The frames 308, 316 at time tw+1 are illuminated by a third set of RGB lights.
Unknowns are encoded simply and effectively on image grids of each view, both left view and right view, at time tw. The three-dimensional surface of the target object is parameterized by depth maps ZL and ZR between the row 302 of left image frames and the row 310 of right image frames. Forwards and backwards three-dimensional motions between image frames are each encoded by two two-dimensional optical flow fields (one per view) with cross-view consistency constraints to account for an extra degree of freedom. The forwards and backwards vector fields are denoted VLF, VRF, and VLB, VRB, respectively.
The three-dimensional surface of the target object is generated by iteratively reconstructing a surface estimate of the target object and aligning images of the target using motion estimation until the images converge. Reconstructing a surface estimate of the target object is defined in terms of the surface energies of the target object, i.e. Esurf(XL,XR), where Xc={Zc, VcB, VcF), for cΣ{L,R}. Aligning images of the target object is defined in terms of the flow energies of the target object, i.e. Eflow(XL,XR). The three-dimensional surface and motion of the target object is generated by minimizing Esurf and Eflow in a coupled manner, and in alternation, following a coarse-to-fine approach with Gaussian image pyramids. This can be represented by Equation (1).

minXLL,XREsurf(XL,XR)+Eflow(XL,XR).  (1)

Estimating the parameters in the surface energy and the flow energy requires establishing pixel correspondences across time and views. Because changes in illumination are rapid and significant, the traditional assumption of constant pixel brightness needed to be revised.
To derive the surface and flow energies, a Lambertian model and basic albedo constraint is first defined herein. First, consider a Lambertian surface patch p with RGB albedo αp=[αpr, αpg, αpb] and normal vector p at a particular time t. The patch p is simultaneously illuminated by three directional lights of distinct colors Tt, such as the three sets of RGB lights in FIG. 1. Let r′g′bε3 denote their light direction vectors scaled by the corresponding light intensity. For simplicity of notation, the normal and light vectors are represented within a camera's local coordinate system. The surface patch p is depicted by an RGB pixel p=[ipr, ipg, ipb]T,




  
    
      
        
          
                        p
          
          =
          
            
              
                M
                
                  -
                  1
                
              
              ⁢
              
                
                  ι
                  ^
                
                p
              
            
            =
            
              
                
                  [
                  
                    
                      
                        
                          α
                          p
                          r
                        
                      
                      
                        
                          
                        
                      
                      
                        
                          
                        
                      
                    
                    
                      
                        
                          
                        
                      
                      
                        
                          α
                          p
                          g
                        
                      
                      
                        
                          
                        
                      
                    
                    
                      
                        
                          
                        
                      
                      
                        
                          
                        
                      
                      
                        
                          α
                          p
                          b
                        
                      
                    
                  
                  ]
                
                ⁡
                
                  [
                  
                    
                      
                        
                          
                            l
                            ⇀
                          
                          r
                          T
                        
                      
                    
                    
                      
                        
                          
                            l
                            ⇀
                          
                          g
                          T
                        
                      
                    
                    
                      
                        
                          
                            l
                            ⇀
                          
                          b
                          T
                        
                      
                    
                  
                  ]
                
              
              ⁢
              
                                p
              
            
          
        
        ,
      
    
    
      
        (
        2
        )
      
    
  




where îp has the captured, raw pixel values. Each column of the mixing matrix M=[{circumflex over (m)}r, {circumflex over (m)}g, {circumflex over (m)}b] ε3×3 encodes the RGB color of a light source as seen by a camera. Here, illumination parameters M,îr,îg,îb are pre-calibrated for each triplet of LEDs, such as the light sources 102 in FIG. 1, using a white diffuse sphere and mirrored sphere. The unknowns in Equation (2) are therefore the RGB albedo p and normal vector p.

To derive the albedo consistency constraint, consider a pair of corresponding pixels (p, p′) from two images (1,2) across time or cameras. For example, consider a right view image and a left view image. The value of each pixel is denoted ip,1λ, and ip′,2λ for each color channel λε{r, g, b}. From Equation (2), the basic pairwise image relation in photogeometric scene flow is defined in Equation (3).




  
    
      
        
          
            α
            
              p
              ,
              1
            
            λ
          
          ≈
          
            α
            
              
                p
                ′
              
              ,
              2
            
            λ
          
        
        ⇒
        
          
            
              i
              
                p
                ,
                1
              
              λ
            
                      
          ≈
          
            
              i
              
                
                  p
                  ′
                
                ,
                2
              
              λ
            
                      
        
      
    
    
      
        (
        3
        )
      
    
  




To simplify notation, λ is omitted in the following equations, but it is noted that pairs of the same color channel are always considered in the present disclosure. When two images are taken from adjacent time instants (t,t′), this relation also implies the standard assumption in time multiplexed photometric stereo that p,t≈p′,t′. This assumption corresponds to an as-rigid-as-possible, small motion model that is common in optical/scene flow methods.
The pairwise image relation in Equation (3) is completely defined by motion (correspondence) and geometry ({circumflex over (n)}p), without actually requiring explicit albedo estimates. This fact eliminates a large number of unknowns, because per-pixel RGB albedo does not need to be computed to obtain a solution to the three-dimensional surface reconstruction. Having defined the Lambertian model and basic albedo constraint, the present disclosure now turns to the technique for surface reconstruction.
FIG. 4 is a flow diagram illustrating a method 400 for generating a three-dimensional surface, according to an embodiment of the present disclosure. At step 402, the cameras capture a plurality of images of a target object. At step 404, the controller generates a three-dimensional surface of the target object. Step 404 utilizes Equation (1) to generate the three-dimensional surface of the target object. Steps 402 and 404 of method 400 may be performed similar to the steps 202 and 204 of method 200.
At step 406, the controller retrieves three frames of images from the plurality of images of the target object captured by the plurality of cameras. The three frames of images will represent images at time frames tw+1, tw,tw−1. Each frame will have both a left image and a right image.
At step 408, the controller uses motion estimation to align the three frames of images in each camera view. Motion estimation is used to obtain optical flow under an illumination change. The idea is to take advantage of known surface normal, and illumination to relight input images to closely resemble each other. Given depth map estimates, an unary and binary motion energy is defined in Equation (4) in terms of the four two-dimensional flows Vcδ for cε{L,R} and direction δε{B,F}.

Eflow(XL,XR)=Σc,δEPF(Vcδ)+β3ETV(Vcδ)+Σδβ4ESF(VLδ,VRδ),  (4)

where β3, β4 are fixed energy weights. The energy ETV (Vcδ) represents a typical total variation regularizer. The photometric flow EPF and scene flow ESF energies are derived as follows.

Photometric Flow Energy
Consider the basic pairwise image relation in Equation (3) for pairs of images in the same view but at different times with t=tw and t′ε{tw−1, tw+1} having known illumination and normal vectors, shading terms in the denominators of Equation (3) as the scalar spt=. Using the basic pairwise image relation of Equation (3), relighting relation shown in Equation (5) can be obtained,

spt′it(p)≈sptit′(p) where p′=p+p′  (5)

defined between two cross-shaded images. The coordinates of p, are defined by the two-dimensional flow pεVcδ. Because the surface shading terms are already defined on the image grid at time t, only the image at time t′ is warped.

The relighting relation of Equation (5) can be understood as using the known illumination patterns to relight it and it′ to closely match each other. Relighting facilitates optical flow computation because differences in illumination are cancelled. Relighting also down-weights the influence of pixels with small shading values (i.e., high photometric foreshortening).
The relighting relation of Equation (5) incorporates an image warp (i.e., the two-dimensional flow field p) and reflects the fact that image alignment improves photometric reconstruction, and photometric reconstruction improves image alignment. For pεVcδ, the photometric flow energy defined in Equation (6) is the alignment error between cross-shaded images.

EPF(Vcδ)=Σp,λ(sptit′(p+p)−spt′it(p))2,  (6)

The image indexing operation results in nonlinear energy minimization. Linearizing the photometric flow energy of Equation (6) yields one constraint (per pixel) on the update Δpε2, shown in Equation (7).

spt∇it′(p′)Δp+(sptit′(p′)−spt′it(p))≈0,  (7)

The result of Equation (7) is a new, relit form of the space-time gradient in standard optical flow.

Scene Flow
The scene flow energy term encourages the two-dimensional flows VLδ and VRδ to be consistent with a three-dimensional vector field, thus fixing an extra degree of freedom (per pixel) in the parameterization, which could introduce errors into the estimated flows.
Let (p, p′) denote corresponding pixels across views, defined by the depth maps c. Their two-dimensional flow vectors are pεVLδ and p′εVRδ. The pixels and displacements are related by a projection that yields Equation (8),




  
    
      
        
                    =
          
            
              
                
                  
                    
                      A
                      ⁡
                      
                        [
                        
                          
                            
                              (
                              
                                
                                  
                                    u
                                    ⇀
                                  
                                  p
                                
                                +
                                
                                                                    p
                                
                              
                              )
                            
                            T
                          
                          ⁢
                          1
                        
                        ]
                      
                    
                    T
                  
                  ⁢
                  
                    (
                    
                      
                        z
                        p
                      
                      +
                      
                        w
                        p
                        z
                      
                    
                    )
                  
                
                +
                
                  b
                  ⇀
                
              
              
                
                  
                    
                      
                        
                          c
                          ⇀
                        
                        T
                      
                      ⁡
                      
                        [
                        
                          
                            
                              (
                              
                                
                                  
                                    u
                                    ⇀
                                  
                                  p
                                
                                +
                                
                                  
                                    w
                                    ⇀
                                  
                                  p
                                
                              
                              )
                            
                            T
                          
                          ⁢
                          1
                        
                        ]
                      
                    
                    T
                  
                  ⁢
                  
                    (
                    
                      
                        z
                        p
                      
                      +
                      
                        w
                        p
                        z
                      
                    
                    )
                  
                
                +
                d
              
            
            -
            
                            
                p
                ′
              
            
          
        
        ,
        
          M
          =
          
            [
            
              
                
                  A
                
                
                                  
              
              
                
                  
                                        T
                  
                
                
                  d
                
              
            
            ]
          
        
      
    
    
      
        (
        8
        )
      
    
  




where Mc′cε3×4 is a projection matrix from view c to view c′ (including camera intrinsics), and Aε2×3.

Equation (8) provides two linear constraints on the unknown scalar wzp, the third component of the three-dimensional scene flow represented in view c. Therefore, after each update of the two-dimensional flows, the technique computes wpz and enforce that the two-dimensional flows are consistent with the projections of a single three-dimensional scene flow. This consistency is enforced symmetrically, on both views, by minimizing the scene flow energy shown in Equation (9).

ESF(VLδ,VRδ)=Σp,c∥p−P(p′,wpz)∥22γp  (9)

where P(•) is as in Equation (8) (i.e., a projection similar to M), and γp is an occlusion weight.

Referring back to FIG. 4, after motion estimation is used to align frames of images, at step 416, the controller 110 reconstructs a surface estimate of the target object. In some embodiments, the surface estimation step performs simultaneous photometric stereo and binocular stereo, given current estimates of the 2D flows (i.e., pre-aligned images). Thus, surface estimation at time t can be formulated as a rigid problem once motion has been removed from the input.
In one embodiment, reconstructing the surface estimate of the target object may include, at step 418, updating depth maps ZL,R in alteration. Surface estimation at a time t can be formulated by removing the motion factor between frames from the input. To emphasize that the motions between frames are treated as constants during surface updating, the surface energies in Equation (10) can be expressed only in terms of depth map Zc in each camera view.

Esurf(XL,XR)=Σc(Eps(Zc)+αESM(Zc))+βELR(ZL,ZR)  (10)

The different energies represent photometric stereo, stereo matching, and left/right consistency energies. All constraints are represented in terms of Zc to take advantage of the complementary nature of photometric stereo and multi-view stereo. This advantageously avoids the need to compute intermediary results (e.g., normal vectors and disparity) that can propagate errors.
Photometric Stereo
Using the basic pairwise image relation in Equation (3) and a pair of images t,t′ε(tw−1, tw,tw+1) in the same view c, by cross-multiplying the denominators, the basic pairwise image relation may be written as Equation (11)

ip′t′tT−iptt′T)≈0,  (11)

where ip′t′tT−iptt′T; corresponds to a constant vector [αptt′bptt′cptt′] that is orthogonal to p. The linear constraint can now be related to the gradient field ∇zp of depth values zp=Zc(up, vp) where (up, vp) are the coordinates of pixel p on the image grid of view c.

Equation (12) provides a model for p in perspective photometric stereo.




  
    
      
        
          
                        p
          
          ∝
          
            
              [
              
                
                  
                    1
                  
                  
                    
                      
                    
                  
                  
                    
                      
                    
                  
                
                
                  
                    
                      
                    
                  
                  
                    1
                  
                  
                    
                      
                    
                  
                
                
                  
                    
                      
                        u
                        p
                      
                      
                        f
                        c
                      
                    
                  
                  
                    
                      
                        v
                        p
                      
                      
                        f
                        c
                      
                    
                  
                  
                    
                      1
                      
                        f
                        c
                      
                    
                  
                
              
              ]
            
            ⁡
            
              [
              
                
                  
                    
                      ∇
                      
                        z
                        p
                      
                    
                  
                
                
                  
                    
                      z
                      p
                    
                  
                
              
              ]
            
          
        
        ,
      
    
    
      
        (
        12
        )
      
    
  




where fc is the focal distance of camera c and a denotes up-to-scale equality. Because the rewritten basic pairwise image relation in Equation (11) is up-to-scale as well, it can be combined with the perspective photometric stereo relation in Equation (12) to yield a photometric energy term in Equation (13) over all pixels p and pairs of images (t,t′).





  
    
      
        
          
            E
            PS
          
          ⁡
          
            (
            
              Z
              c
            
            )
          
        
        =
        
          
            ∑
            
              p
              ,
              t
              ,
              
                t
                ′
              
              ,
              λ
            
          
          ⁢
          
            
              (
              
                
                  
                    
                      [
                      
                        
                          
                            
                              a
                              
                                ptt
                                ′
                              
                            
                          
                        
                        
                          
                            
                              b
                              
                                ptt
                                ′
                              
                            
                          
                        
                        
                          
                            
                              c
                              
                                ptt
                                ′
                              
                            
                          
                        
                      
                      ]
                    
                    T
                  
                  ⁡
                  
                    [
                    
                      
                        
                          1
                        
                        
                          
                            
                          
                        
                        
                          
                            
                          
                        
                      
                      
                        
                          
                            
                          
                        
                        
                          1
                        
                        
                          
                            
                          
                        
                      
                      
                        
                          
                            
                              u
                              p
                            
                            
                              f
                              c
                            
                          
                        
                        
                          
                            
                              v
                              p
                            
                            
                              f
                              c
                            
                          
                        
                        
                          
                            1
                            
                              f
                              c
                            
                          
                        
                      
                    
                    ]
                  
                
                ⁡
                
                  [
                  
                    
                      
                        
                          ∇
                          
                            z
                            p
                          
                        
                      
                    
                    
                      
                        
                          z
                          p
                        
                      
                    
                  
                  ]
                
              
              )
            
            2
          
        
      
    
    
      
        (
        13
        )
      
    
  




Because ∇zp is a linear function of Zc (using forwards derivatives), minimalizing Equation (13) is equivalent to solving a large and sparse linear system of (homogenous) equations on the depth map Zc.
Considering all pairs of images in the three-frame window, and all three RGB color channels λ, there are six independent constraints on the two degrees of freedom of p or ∇zp. The overconstraint is welcoming because, in practice, the effective number of constraints may be reduced by self-shadowing in one or more color channels.
Stereo Matching
The basic pairwise constraint is now applied to image pairs (c,c′) at the same time t but across views. To simplify notation, time index t has been omitted. Both images present illumination Tt, so the denominators in the basic pairwise constraint of Equation (3) may be dropped. Let p=(up, vp) denote pixel coordinates of p. Equation (14) provides a stereo matching relation, such that at each time instant in the three-frame window,

ic(p)=ic′(p′), where p′=p+p′  (14)

and pε2 is a displacement along the epipolar line. By expressing =w(zp) in terms of zp=Zc(p) and camera calibration, stereo matching can be performed while solving directly for the depth map. The result is a set of non-linear constraints on Zc that are enforced iteratively. Nevertheless, this task can be incorporated naturally into the coarse-to-fine optimization strategy.

The described approach advantageously allows for both (1) direct triangulation of continuous depth values and (2) the new stereo matching constraints on zp (absolute depth) and the previous photometric constraints on ∇zp (relative depth, detail) complementing each other naturally. The constraints render it unnecessary to define a spatial smoothness term for stereo matching, which could blur surface detail.
The two dimensional displacement vector along the epipolar line is represented in Equation (15).




  
    
      
        
          
            w
            ⁡
            
              (
              
                z
                p
              
              )
            
          
          =
          
            
              
                
                  
                    
                      A
                      ⁡
                      
                        [
                        
                          
                                                        p
                            T
                          
                          ⁢
                          1
                        
                        ]
                      
                    
                    T
                  
                  ⁢
                  
                    z
                    p
                  
                
                +
                
                  b
                  ⇀
                
              
              
                
                  
                    
                      
                        
                          c
                          ⇀
                        
                        T
                      
                      ⁡
                      
                        [
                        
                          
                            
                              u
                              ⇀
                            
                            p
                            T
                          
                          ⁢
                          1
                        
                        ]
                      
                    
                    T
                  
                  ⁢
                  
                    z
                    p
                  
                
                +
                d
              
            
            -
            
              
                u
                ⇀
              
              p
            
          
        
        ,
        
          
            M
            
              
                c
                ′
              
              ⁢
              c
            
          
          =
          
            [
            
              
                
                  A
                
                
                                  
              
              
                
                  
                                        T
                  
                
                
                  d
                
              
            
            ]
          
        
        ,
      
    
    
      
        (
        15
        )
      
    
  




where Mc′cε3×4 is a projection matrix from view c to view c′ (including camera intrinsics), and Aε2×3.

The stereo matching energy term is therefore defined in Equation (16).

ESM(Zc)Σp,t,λ(ic′(p+w(zp))−ic(p))2γp,  (16)

where γp is an occlusion weight based on foreshortening and consistency of pairs (p, p′) given by ZL and ZR.

During optimization, the energy ESM(Zc) is linearized about the current estimate of each zp. This yields a linear update term (or gradient) for the surface update ∇zp, shown in Equation (17).

∇ic′(p′)TJwΔzp=ic(p)−ic′(p′),  (17)

where Jwε2 is the Jacobian of w(zp) in Equation (15), i.e., the two-dimensional displacement vector along the epipolar line.

Cross-View Consistency
To enforce that ZL and ZR provide a consistent representation for those surface patches that are visible on both views, the cross-view consistency energy term is defined in Equation (18).

ELR+Σc≠c′Σp(T[pT1]Tzpc+d−zpc′)2γp′  (18)

based on the projection matrices Mc′cε3×4 in Equation (15). By optimizing ZL and ZR in an alternating manner, the cross-view consistency energy in Equation (18) can also be treated as a set of linear constraints.

Referring back to FIG. 4, after the surface estimate of the target object is reconstructed, at decision block 420, the controller 110 determines whether the three frames of images have converged. Responsive to determining that the three frames of images have not converged, then the method reverts to step 408. Steps 408 through 416 are then performed iteratively until the three frames of images converge (energies achieve their minimum value).
Responsive to determining that the three frames of images have converged, the controller 110 deems that the generated geometry (surface) is sufficiently reconstructed at the time t. In some embodiments, the controller 110 determines the appearance of the generated geometry by computing the final RGB albedo at a time t using Equation (2). The controller can then proceed to a different three-frame window.
At decision block 422, the controller 110 determines whether there are any frames left in the plurality of images captured. If there are frames left in the plurality of images captured, then the method flow 400 reverts to step 406, and three frames of images are retrieved. For example, if there are twelve frames of images in the plurality of images captured (e.g. frames 1-12), and frames 1, 2, and 3 were initially chosen, then frames 2, 3, and 4, may be chosen next. If there are no remaining frames in the plurality of images captured, then the method 400 is complete.
FIG. 5 illustrates an example computing system 500 configured according to an embodiment disclosed herein. The computing system 500 includes a central processing unit (CPU) 502, a network interface 504, a bus 506, a memory 508, and storage 510. The computing system 500 also includes an I/O device interface 512, connecting the computing system 500 to I/O devices 514, such as lights 516 and cameras 518. The lights 516 may be the plurality of light sources 102 in FIG. 1. The cameras 518 may be the cameras 106 in FIG. 1. The computing system 500 provides a computing system, which allows a user to generate a three-dimensional surface of a target object, such as controller 110 in FIG. 1.
The CPU 502 retrieves and executes programming instructions stored in the memory 508. Similarly, the CPU 502 stores and retrieves application data residing in the memory 508. The bus 506 is used to transmit programming instructions and application data among the CPU 502, I/O devices interface 512, memory 508, network interface 504, and storage 510 having images 526 stored therein. CPU 502 is included to be representative of a single CPU, multiple CPUs, a single CPU having multiple processing cores, and the like. The memory 508 is generally included to be representative of a random access memory. The storage 510 may be a disk drive device. Although shown as a single unit, the storage 510 may be a combination of fixed and/or removable storage devices, such as magnetic disc drives, solid state drives (SSD), removable memory cards, optical storage, network attached storage (NAS), or a storage area-network (SAN).
The memory 508 includes an image capture module 520, an image processor 522, and images 524. The image capture module 520 provides a software application configured to receive a plurality of images of a target object taken by a system for generating three-dimensional surfaces, such as system 100 in FIG. 1. The image processor 522 is configured to generate a three-dimensional surface of a target object by iteratively using motion estimation to align frames of images, such as images 524 stored in memory, and reconstructing a surface estimate of the target object. For example, image processor 522 can perform the method 400 described in FIG. 4.
Embodiments disclosed herein relate to a method and apparatus for generating a three-dimensional surface. In one embodiment, there is a method for generating a three-dimensional surface. The method includes capturing a plurality of images of a target object with at least two cameras, the target object illuminated by at least three sets of red-green-blue (RGB) lights positioned in an array about the target object and generating a three-dimensional surface of the target object by iteratively reconstructing a surface estimate of the target object and aligning images of the target object using motion estimation until the images converge, wherein the images are processed in three-frame intervals.
While the foregoing is directed to embodiments of the present invention, other and further embodiments of the invention may be devised without departing from the basic scope thereof, and the scope thereof is determined by the claims that follow.

## Claims

1. A method for generating a three-dimensional surface, comprising:
capturing a plurality of images of a target object with at least two cameras, the target object illuminated by at least two sets of red-green-blue (RGB) lights positioned in an array about the target object; and
generating a three-dimensional surface of the target object by iteratively reconstructing a surface estimate of the target object and aligning images of the target object using motion estimation until the images converge, wherein the images are processed in n-frame intervals.

2. The method of claim 1, wherein at least one camera captures the plurality of images of the target object from a first side and at least one camera captures the plurality of images of the target object from a second side.

3. The method of claim 1, wherein aligning images of the target object using motion estimation comprises:
recovering a backward motion and forward motion within each respective n-frame interval.

4. The method of claim 1, wherein each frame in the n-frames recovered for the three-dimensional surface is taken from a right side and a left side of the target object.

5. The method of claim 1, wherein reconstructing the surface estimate comprises:
updating depth maps of the images processed in n-frame intervals.

6. The method of claim 1, wherein reconstructing the surface estimate of the target object is defined in terms of surface energies of the target object.

7. The method of claim 1, wherein aligning images of the target object using motion estimation is defined in terms of flow energies of the target object.

8. A method for generating a three-dimensional surface, comprising:
capturing an image of a target object with two cameras, one camera positioned to a left of the target object, one camera position to a right of the target object, wherein the target object is illuminated by three sets of red-green-blue (RGB) lights positioned in an array about the target object; and
processing the image in three frame intervals, wherein processing the image comprises:
recovering an unknown surface at each frame within a three-frame interval; and
recovering a backward motion and forward motion within the three-frame interval.

9. The method of claim 8, wherein each frame in the three frames recovered for the three-dimensional surface is taken from a right side and a left side of the target object.

10. The method of claim 8, wherein the image is iteratively processed three frames at a time until images in the three frames converge to a single image of the target object.

11. The method of claim 8, wherein recovering the unknown surface at each frame within the three-frame interval is defined in terms of surface energies of the target object.

12. The method of claim 8, wherein recovering the unknown surface at each frame within the three-frame interval comprises:
updating depth maps of the images processed in three frame intervals.

13. The method of claim 12, where the depth maps are updated between frames generated by the camera positioned to the left of the target object and the camera positioned to the right of the target object.

14. The method of claim 8, wherein recovering the backward motion and forward motion within the three-frame interval is defined in terms of flow energies of the target object.

15. A system for reconstructing a three-dimensional surface, comprising:
at least two cameras, wherein a first camera of the at least two cameras is positioned to capture a right image of a target object, and wherein a second camera is positioned to capture a left image of the target object;
at least three sets of red-green-blue (RGB) lights positioned in an array about the target object; and
a controller configured to generate a three-dimensional surface of the target object by iteratively reconstructing a surface estimate of the target object and aligning images of the target object using motion estimation until the images converge, wherein the images are processed in three-frame intervals.

16. The system of claim 15, wherein the three sets of RGB lights are mounted on a circular configuration.

17. The system of claim 15, wherein the cameras are positioned about 200 cm away from the three-dimensional surface.

18. The system of claim 15, wherein the sets of RGB lights are positioned about 60 cm away from the cameras.

19. The system of claim 15, wherein aligning images of the target object using motion estimation is defined in terms of flow energies of the target object.

20. The system of claim 15, wherein generating the surface estimate of the target object is defined in terms of surface energies of the target object.