CROSS-REFERENCES TO RELATED APPLICATIONS  
       [0001]     This application claims priority of U.S. provisional patent application Ser. No. 60/477,933 filed Jun. 13, 2003. 
     
    
     BACKGROUND OF THE INVENTION  
       [0002]     1. Field of the Invention  
         [0003]     This invention relates to the field of three-dimensional imaging systems, and more particularly to a method and apparatus for creating three-dimensional models of objects from sets of arbitrary three-dimensional curves obtained from a target surface.  
         [0004]     2. Description of Prior Art  
         [0005]     Three-dimensional digitization and modeling systems are commonly used in many industries and their applications are numerous. A few examples of such applications are: inspection and measurement of shape conformity in industrial production systems, digitization of clay models for industrial design and styling applications, reverse engineering of existing parts, interactive visualization of objects in multimedia applications, and three-dimensional documentation of artwork and artifacts.  
         [0006]     The shape of an object is digitized using a ranging sensor that measures the distance between the sensor and a set of points on the surface. From these measurements, three-dimensional coordinates of points on the target surface are obtained in the sensor reference frame. Prom a given point of view, the ranging sensor can only acquire distance measurements on the visible portion of the surface. To digitize the whole object, the sensor must therefore be moved to a plurality of viewpoints in order to acquire sets of range measurements that cover the entire surface. A model of the object is built by merging and registering the sets of range measurements in a common reference frame. Creating the three-dimensional model of an object is a multistep process usually comprising: (a) acquiring sets of range measurements from a plurality of viewpoints, (b) roughly aligning the sets of range measurements in a common reference frame, (c) refining the registration of the sets of range measurements in the common reference frame, (d) merging the range measurements in a unique non-redundant model, and (e) building a model of the surface using geometric primitives such as triangles.  
         [0007]     Three types of ranging sensors are commonly used to digitize the surface of an object: (a) cloud of points sensors which provide unorganized sets of range measurements, (b) range image sensors which provide sets of measurements organized into regular matrices, and (c) curve sensors which provide range measurements organized into sets of three-dimensional curves, e.g. profiles. Cloud of points and range image sensors offer the advantage of providing a high density of measurements from a single viewpoint. They are however bulky and cumbersome to move from one viewpoint to the next. Due to their greater simplicity and robustness, curve sensors are usually favored for digitizing the entire shape of objects. These sensors can be easily moved from one viewpoint to the next, by either a mechanical system or simply an operator holding the sensor in hand.  
         [0008]     Numerous examples of ranging sensor devices are described in the art. “Portable digital 3-d imaging system for remote sites” by J.-A. Beraldin et al., published in proceedings of the 1998 IEEE International Symposium on Circuit and Systems, Monterey, Calif., USA: 326-333. May 31-Jun. 3, 1998, describes a compact laser stripe range sensor that can be mounted, for instance on a translational or rotational stage. “A Self-Referenced Hand-Held Range Sensor” by P. Hebert, published in Proceedings of the IEEE International Conference on Recent Advances in 3-D Digital Imaging and Modeling, Quebec, pp. 5-12, May 2001, presents a hand-held range sensor gathering a set of curves issued from a crosshair laser projection pattern. In “A Review of 20 Years of Ranges Sensor Development” by F. Blais, published in, Videometrics VII, in Proceedings of SPIE-IS&amp;T Electronic Imaging, SPIE Volume 5013 (2003), pp 62-76, NRC 44965, several range sensors are described, among these a range scanner collecting both 3-D measurements and color (R,G,B) properties is further described in “Digital 3-D Imaging, theory and applications” by M. Rioux, published in Proceedings of Videometrics III, SPIE vol. 2350, pp. 2-15, 1994.  
         [0009]     Using curve sensors with current three-dimensional modeling systems requires that the sensor be moved in an organized and regular motion perpendicular to the direction of the measured profile. This, to simulate a range image that can be processed in the same way the output of a range image sensor would be. Since the range of motion is restricted to a single axis, the operation must be repeated multiple times to simulate the acquisition of range images from multiple viewpoints. In addition to imposing a regular unidirectional motion of the sensor, the main drawback with current systems that process data in this manner is that the alignment error of each curve cannot be individually corrected. As the set of curves acquired in a given motion sequence is processed as a rigid range image, only the global alignment error of the entire set of curves can be corrected by the modeling system, thus limiting the accuracy of the reconstructed surface.  
         [0010]     No method has been developed in the art for creating a surface model from arbitrary three-dimensional curves. U.S. Pat. No. 5,946,645 issued-Aug. 31, 1999 to Marc Rioux and Patrick Hebert describes a method for individually refining the alignment of arbitrary three-dimensional profiles. The method claimed relies on measuring the distance between each profile and every other profile in the set. Because of this combinatorial complexity, the method cannot currently be used in practice with the high number of curves typically needed to model an entire object. Furthermore, this patent does not describe any means for creating a model of the surface from the three-dimensional curves once their alignment has been refined. The use of this curve registration method on data acquired from a hand-held sensor is described in “Toward a hand-held laser range scanner: integrating observation-based motion compensation” by P. Hebert et al., published in Proceedings of SPIES, volume 3313, pages 2-13, January 1998.  
         [0011]     A volumetric method for reconstructing surface models from unorganized clouds of three-dimensional points is described in “Surface Reconstruction from Unorganized Points” by H. Hoppe et al., published in SIGGRAPH &#39;92 Proceedings, volume 26, pages 71-78, July 1992. The volumetric representation used by this method only contains the distance to the surface, which is sufficient to reconstruct the surface but does not contain enough information to refine alignment errors of data sets. This method is general and can be used to create a surface model for a set of arbitrary three-dimensional curves by converting it into an unorganized cloud of points. This process is difficult to implement in practice because it requires that the entire target surface be measured with a high and relatively uniform density. Doing so also eliminates the rigid arrangement of each curve in the set. This loss of information negatively impacts the quality and accuracy of the reconstructed surface because it becomes impossible to correct the alignment of curves. No method for refining the alignment of the three-dimensional data is described. A specialization of this surface reconstruction method for merging range images is described in “A Volumetric Method for Building Complex Models from Range Images” by B. Curless et al., published in SIGGRAPH &#39;96, Proceedings, pages 303-312, 1996. This is a volumetric method that reconstructs the surface incrementally by adding range images to the model. The method exploits the structure of the images and cannot be used with arbitrary three-dimensional curves. As with the more general approach described by Hoppe, no method for refining the alignment of the three-dimensional data is described.  
         [0012]     A method for reconstructing a surface from data acquired with a hand-held curve sensor is described in “Geometric Fusion for a Hand-Held 3D Sensor” by A. Hilton et al., published in Machine Vsion and Applications, 12:44-51, 2000. This method requires that the sensor is moved in a regular and organized motion in such a way to provide parallel curves that are merged into range images. Instead of directly using the three-dimensional curves to build the surface, this method must combine the curves into simulated range images. The main drawback of the method is that it poses severe constraints on the range of motion of the sensor. Also, since the curves are merged into images, the alignment error of each curve cannot be individually corrected.  
         [0013]     “Registration and Integration of Multiple Range Images by Matching Signed Distance Fields for Object Shape Modeling” by T. Masuda published in Computer Vision and Image Understanding 87, pages 51-65, 2002 describes a volumetric method for surface reconstruction and alignment refinement based on signed distance fields. This method is however specific to range images and cannot be generalized to arbitrary three-dimensional curves because signed distance fields cannot be constructed from single curves.  
         [0014]     There therefore exists a need for new methods for creating three-dimensional models of objects from sets of arbitrary three-dimensional entities obtained from a target surface and eliminating the need for moving the sensor in organized and regular motions to simulate the creation of range images.  
       SUMMARY OF THE INVENTION  
       [0015]     It is an object of the present invention to overcome the problems mentioned previously.  
         [0016]     In a preferred embodiment, the present invention provides a method for ascertaining the three-dimensional shape of a target surface using a hand-held ranging sensor to obtain a plurality of arbitrary overlapping profiles.  
         [0017]     The present invention relates to a method for creating three-dimensional models of objects from sets of arbitrary three-dimensional entities obtained from target surfaces. It also provides an efficient method for individually refining the alignment of curves to improve the accuracy of the surface model with a linear complexity with respect to the number of curves. The principle behind the invention is that a set of three-dimensional entities, at their approximate positions, creates a field from which the surface can be extracted. The field is constructed in a manner such that the three-dimensional entities are attracted toward the extracted surface. This attraction is used to accurately register each three-dimensional entity with respect to extracted surface. Through iterations, both the field and the entity positions are refined,  
         [0018]     According to one broad aspect of the present invention, there is provided a method for reconstructing surfaces from a single or a plurality of arbitrary three-dimensional entities obtained from a target surface. The method comprises: obtaining a set of at least one three-dimensional entity, each entity being a set of three-dimensional points, each three-dimensional point containing at least the three-dimensional coordinate of the point on the target surface; constructing a volumetric implicit representation of the target surface in the form of a vector field, each vector in the vector field containing at least the distance to the reconstructed surface and the direction toward the reconstructed surface; placing each three-dimensional entity in the vector field and updating the vector field accordingly; and Reconstructing the target surface from the information contained in the vector field.  
         [0019]     Preferably, at least one of the three-dimensional entities is an organized set of three-dimensional points that are part of one or a plurality of three-dimensional curves.  
         [0020]     According to another broad aspect of the present invention, there is provided a method for refining the alignment of arbitrary three-dimensional entities obtained from a target surface. The method comprises: 
        (a) obtaining a set of at least two three-dimensional entities, each entity being a set of three-dimensional points, each three-dimensional point containing at least the three-dimensional coordinate of the point on the target surface;     (b) constructing a volumetric implicit representation of the target surface in the form of a vector field, each vector in the vector field containing at least the distance to the reconstructed surface and the direction toward the reconstructed surface;     (c) placing at least two three-dimensional entities in the vector field and updating the vector field accordingly;     (d) selecting at least one three-dimensional entity placed in the vector field and obtaining a subset of three-dimensional points on each of the selected three-dimensional entities, three-dimensional points in these subsets being called control points;     (e) for each control point in each selected three-dimensional entity, computing a contribution to a cost function, this contribution being a function of at least the vector field and the three-dimensional coordinate of the control point;     (f) for each selected three-dimensional entity, computing a new position that optimizes its corresponding cost function; and     (g) placing each selected three-dimensional entity in the vector field at its newly computed position and updating the vector field accordingly.        
 
         [0028]     According to a further aspect of the present invention, the steps (c) and (d) of the previous method can be modified for: 
        (c) placing at least one three-dimensional entity in the vector field and updating the vector field accordingly;     (d) selecting at least one of the three-dimensional entities not yet placed in the vector field, placing the selected three-dimensional entities in the vector field without updating the field and obtaining a subset of three-dimensional points on each of the selected entities, three-dimensional points in these subsets being called control points.        
 
         [0031]     According to still another broad aspect of the present invention, there is provided a method for ascertaining the three-dimensional shape of a target surface. The method comprises using a ranging sensor to produce a set of three-dimensional entities, a method according to present invention to reconstruct the target surface, and a method according to the present invention to improve the quality and accuracy of the reconstructed surface.  
         [0032]     According to another broad aspect of the present invention, there is provided a system for reconstructing surfaces from a single or a plurality of arbitrary three-dimensional entities obtained from a target surface comprising: a three-dimensional entity provider for obtaining a set of at least one three-dimensional entity, each entity being a set of three-dimensional points, each three-dimensional point containing at least the three-dimensional coordinates of the point on the target surface; an implicit representation constructor for constructing a volumetric implicit representation of the target surface in the form of a vector field, each vector in the vector field containing at least the distance to the reconstructed surface and the direction toward the reconstructed surface; for placing each three-dimensional entity in the vector field; and for updating the vector field accordingly; and a target surface reconstructor for reconstructing the target surface from the information contained in the vector field.  
         [0033]     According to a further broad aspect of the present invention, there is provided a system for refining an alignment of arbitrary three-dimensional entities obtained from a target surface, comprising: a three-dimensional entity provider for obtaining a set of at least two three-dimensional entity, each entity being a set of three-dimensional points, each three-dimensional point containing at least the three-dimensional coordinates of the point on the target surface; an implicit representation constructor for constructing a volumetric implicit representation of the target surface in the form of a vector field, each vector in the vector field containing at least the distance to the reconstructed surface and the direction toward the reconstructed surface; for placing at least two three-dimensional entity in the vector field; and for updating the vector field accordingly; and a control point selector for selecting at least one three-dimensional entity placed in the vector field and obtaining a subset of three-dimensional points on each of the selected three-dimensional entities, three-dimensional points in these subsets being called control points; a cost function calculator for computing, for each control point in each selected three-dimensional entity, a contribution to a cost function, the contribution being a function of at least the vector field and the three-dimensional coordinate of the control point; a new position calculator for computing, for each selected three-dimensional entity, a new position that optimizes its corresponding cost function; wherein the implicit representation constructor places each selected three-dimensional entity in the vector field at its newly computed position and updates the vector field accordingly.  
         [0034]     According to still a further broad aspect of the present invention, there is provided a system for refining an alignment of arbitrary three-dimensional entities obtained from a target surface, comprising: a three-dimensional entity provider for obtaining a set of at least two three-dimensional entity, each entity being a set of three-dimensional points, each three-dimensional point containing at least the three-dimensional coordinates of the point on the target surface; an implicit representation constructor for constructing a volumetric implicit representation of the target surface in the form of a vector field, each vector in the vector field containing at least the distance to the reconstructed surface and the direction toward the reconstructed surface; for placing at least one three-dimensional entity in the vector field; and for updating the vector field accordingly; and a control point selector for selecting at least one of the three-dimensional entities not yet placed in the vector field, wherein the implicit representation constructor places the selected three-dimensional entities in the vector field without updating the field, and obtaining a subset of three-dimensional points on each of the selected three-dimensional entities, three-dimensional points in these subsets being called control points; a cost function calculator for computing, for each control point in each selected three-dimensional entity, a contribution to a cost function, the contribution being a function of at least the vector field and the three-dimensional coordinate of the control point; a new position calculator for computing, for each selected three-dimensional entity, a new position that optimizes its corresponding cost function; wherein the implicit representation constructor places each selected three-dimensional entity in the vector field at its newly computed position and updates the vector field accordingly.  
         [0035]     In a preferred embodiment, the invention is used to process three dimensional curves obtained from a hand held sensor such as that described in “A Self-Referenced Hand-Held Range Sensor” by P. Hebert, published in Proceedings of the IEEE International Conference on Recent Advances in 3-D Digital Imaging and Modeling, Quebec, pp. 5-12, May 2001. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0036]     These and other features, aspects and advantages of the present invention will become better understood with regard to the following description and accompanying drawings wherein:  
         [0037]      FIG. 1  represents a flowchart describing the method for surface reconstruction from arbitrary three-dimensional curves followed by a registration of three-dimensional curves to the reconstructed surface;  
         [0038]      FIG. 2  represents the initialization step;  
         [0039]      FIG. 3  represents the preprocessing step;  
         [0040]      FIG. 4  represents the model reconstruction step;  
         [0041]      FIG. 5  represents the integration of a single curve into the volumetric structure as a step for model reconstruction;  
         [0042]      FIG. 6  represents the determination of the distance d between a voxel and a line segment in the integration of a single curve step;  
         [0043]      FIG. 7  represents the curve registration step;  
         [0044]      FIG. 8  represents the registration procedure for a single curve;  
         [0045]      FIG. 9  represents the extrapolation of the matching point m j  for the control point c j  in the registration procedure for a single curve;  
         [0046]      FIG. 10  represents a flowchart where each curve is registered prior to its integration to the  
         [0047]     volumetric structure;  
         [0048]      FIG. 11  represents a flowchart of the main steps of one embodiment of the invention;  
         [0049]      FIG. 12  represents a flowchart of the main steps of a second embodiment of the invention;  
         [0050]      FIG. 13  represents a flowchart of the main steps of a third embodiment of the invention; and  
         [0051]      FIG. 14  represents a block diagram of the main components of the present invention. 
     
    
     DESCRIPTION OF PREFERRED EMBODIMENT  
       [0052]     The present invention now will be described more fully hereinafter. However, this invention may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.  
         [0053]      FIG. 1  shows a flowchart describing the functioning of the method for surface reconstruction from arbitrary 3D curves as well as for registration of 3D curves to the reconstructed surface.  
         [0000]     Initialisation  
         [0054]     Initialization step  100 , illustrated in  FIG. 2 , requires two user-supplied parameters: bounding box of the object to be reconstructed and the resolution of the volumetric lattice of points (volumetric structure).  
         [0055]     The bounding box is defined as coordinates b min =[x min ,y min ,z min ] T  and b max =[x max , y max , z max ] T  of two opposite corners of the box that completely contains the object, such that x min &lt;x max , y min &lt;y max  and z min &lt;z max .  
         [0056]     Resolution Δ of the volumetric structure is defined as the distance between two neighbouring lattice points.  
         [0057]     Volumetric lattice V of points is defined-202 as a set V of points (voxels)  
         V   =     {             [       x   i     ,     y   j     ,     z   k       ]     T     |     x   i       =       x   min     +     i   ⁢           ⁢   Δ         ,       y   j     =       y   min     +     j   ⁢           ⁢   Δ         ,       z   k     =       z   min     +     k   ⁢           ⁢   Δ           }       ,     
     ⁢     i   =   0     ,   …   ⁢           ,     N   x     ,     j   =   0     ,   …   ⁢           ,     N   y     ,     k   =   0     ,   …   ⁢           ,     N   z     ,   where       
           N   x     =     ⌈         x   max     -     x   min       Δ     ⌉       ,       N   y     =         ⌈         y   max     -     y   min       Δ     ⌉     ⁢           ⁢   and   ⁢           ⁢     N   z       =       ⌈         z   max     -     z   min       Δ     ⌉     .             
 
 Operator [x] represents smallest integer greater than x. 
 
         [0058]     A 3×3 matrix K (covariance matrix) is attached to each lattice point and all elements of the matrix K are initialized to zero  203 . Also, to each lattice point, a vector g (distance vector) is attached as well as a weighting factor ω both initialized to zero. This volumetric structure represents implicitly the reconstructed surface.  
         [0000]     Input Data  
         [0059]     Input  101  to the reconstruction and registration algorithm is a set C={C 1 , C 2 , . . . , C N } of 3D curves measured on the surface of an object. A curve C i  is defined as a set of 3D points C i ={p 1 ,p 2 , . . . , p M     i   }, p k =[x k  y k  z k ] T  such that the real surface curve can be approximated as a set of line segments {p 1 p 2 ,p 2 p 3 , . . . ,p M     i     −1 p M     i   }.  
         [0000]     Preprocessing  
         [0060]     The only preprocessing step  102 ,  FIG. 3 , is the estimation of tangents at each point of all curves  304 . At a point p k  of curve C i ={p 1 ,p 2 , . . . ,p M     i   } the tangent t k  can be estimated as:  
         t   k     =       1   2     ⁡     [           p   k     -     p     k   -   1                  p   k     -     p     k   -   1                +         p     k   +   1       -     p   k                p     k   +   1       -     p   k                ]           
 
         [0061]     Optionally, the tangents can be filtered by averaging them with tangents at neighbouring points:  
         t   k     ←       1   3     ⁡     [       t     k   -   1       +     t   k     +     t     k   +   1         ]           
 
         [0062]     After the preprocessing step, a set of tangents T i ={t 1 , t 2 , . . . ,t M     i   } is assigned to each curve C .i    307 . To distinguish the tangents belonging to different curves, the box  304  specifies t ik  as a single tangent, where i is the curve index.  
         [0000]     Model Reconstruction  
         [0063]     Model reconstruction  103 ,  FIG. 4 , consists of the integration of each curve independently into the volumetric structure  404 . The order in which the curves are integrated is not important. The final result is the same regardless the order of the curves.  
         [0000]     Integration of a Single Curve into the Volumetric Structure  
         [0064]     The integration of a single curve into the volumetric structure  404  is depicted as a flowchart diagram in  FIG. 5 . For the purpose of integration of curves into the volumetric structure, a curve C i ={p 1 ,p 2 , . . . ,p M     i   } is considered as a set of line segments {p 1 p 2 ,p 2 p 3 , . . . ,p M     i     −1 p M     i   }. A curve is always integrated one line segment at the time  504 . In the following, the computation is explained for a single line segment p k p k+1 . The same procedure is repeated for all other line-segments contained in the curve  514 .  
         [0065]     The integration procedure consists in updating the covariance matrices and the distance vectors in the neighbourhood of the line segment. The size of the neighbourhood ε is a user-specified parameter and cannot be smaller then the √{square root over (3)}Δ, where Δ is the resolution of the volumetric structure, as defined above.  
         [0066]     The first step of integration  404  is to compute the bounding box B for the line segment. The bounding box is defined as coordinates b min =[x min , y min , z min ] T  and b max =[x max ,y max ,Z max ] T  of two opposite corners of a rectangular box such that 
 
x min &lt;x max , 
 
Y min &lt;Y max  and 
 
Z min &lt;Z max , 
 
 where 
 
 x   min =min( x   k   −ε,x   k+1 −ε),  x   max =max( x   k   +ε,x   k+1 +ε) 
 
 y   min =min( y   k   −ε,y   k+1 −ε),  y   max =max( y   k   +ε,y   k+1 +ε) 
 
 z   min =min( z   k   −ε,z   k+1 −ε),  z   max =max( z   k   +ε,z   k+1 +ε) 
 
         [0067]     Let L be the set of all lattice points (voxels) within the bounding box B L={v j ΕV|v j ΕB,j=1, . . . ,Q}, where V is the set of lattice points  202 . For each voxel v j  Ε L it is first verified that the voxel v j  is in-between two planes Π 1  and Π 2  defined as planes that contain points p k  and p k+1  and whose normals are equal to tangents t k  and t k+1  respectively  510 . If not, the next voxel is selected  507 .  
         [0068]     To compute the distance, a line segment p k p k+1  is parameterized as: 
 
1( u )= p   k   +u ( p   k+1   −p   k ),0≦ u≦ 1. 
 
         [0069]     The tangents at the two end points are then interpolated as: 
 
 t ( u )= t   k   +u ( t   k+1   −t   k ),0≦ u≦ 1. 
 
         [0070]     The normal n(u) at each point of a line segment is defined as the vector being contained in the plane p k p k+1 v j  and perpendicular to the tangent t(u). The normal n(u) and is also interpolated over the line segment in the same manner: 
 
 n ( u )= n   k   +u ( n   k+1   −n   k ),0≦ u≦ 1. 
 
         [0071]     Normals n k  and n k+1  are unit vectors perpendicular to tangents t k  and t k+1  respectively and contained in plane p k p k+1 v j .  
         [0072]     The distance d between voxel v j  and the line segment p k p k+1  is defined as the distance between v j  and the point p c  whose normal n c  passes through v j . This is illustrated in  FIG. 6 . The distance is computed as the distance for which the area of the triangle q k q k+1 v j  is zero, i.e. that the cross-product of q k −v j  and q k+1 −v j  is zero, where 
 
 q   k   =dn   k   +p   k , 
 
 q   k+1   =dn   k+1   +p   k+1 . 
 
         [0073]     The distance d is obtained from the equation 
 
 a+db+d   2   c =0, 
 
 where 
 
 a =( p   k   −v   j )×( p   k+1   −v   j ), 
 
 b=n   k+1 ×( p   k   v   j )+n k ×( p   k+1   −v   j ), 
 
 a+db+d   2   c= 0. 
 
         [0074]     Preceding equation is a system of three quadric equations with a single unknown d. Any of these equations can be used to compute d after making sure that the chosen parameters a,b, c do not vanish altogether. The chosen equation can have up to two real roots. If the number of roots is zero, the voxel v j  is rejected and next voxel is selected  507 . If there are two real roots, the root of interest is the one with the smallest positive value.  
         [0075]     Using the distance computed above, parameter u c  is computed as:  
         u   c     =                q   k     -     v   j                     q     k   +   1       -     q   k              .         
 
         [0076]     Next, it is verified whether the distance d is smaller then the maximal allowed distance ε. If not, next voxel is selected  507 .  
         [0077]     Finally, the covariance matrix K j  at voxel v j  is updated as follows: 
 
 K   j   ←K   j   +t ( u   c ) t ( u   c ) T  
 
         [0078]     Vector g j  is updated as:  
         g   j     ←       g   j     +       ⅇ     -       d   2       0.5   ⁢   Δ           ⁡     (       v   j     -     p   c       )             
 
         [0079]     Weighting value ω j  is updated as:  
         ω   j     ←       ω   j     +     ⅇ     -       d   2       0.5   ⁢   Δ                 
 
         [0080]     The whole procedure is repeated for the remaining voxels  514  as well as for the remaining line segments  515 .  
         [0081]     The resulting volumetric structure contains an implicit representation of the reconstructed surface (reconstructed model). The covariance matrices K, and distance vectors g, represent implicitly a vector field whose value is the direction and the distance toward the closest point on the reconstructed model.  
         [0000]     Curve Registration  
         [0082]     Each curve is registered independently  604  to the reconstructed model that is implicitly represented in the volumetric structure. Flowchart in  FIG. 7  illustrates the overall procedure.  
         [0000]     Registration of a Single Curve  
         [0083]      FIG. 8  shows registration procedure for a single curve C i ={p 1 ,p 2 , . . . ,p M     i   }. First a subset W i  of points in C k  is chosen  702  as a set of control points 
   W   i     ⊂ C   i   ={c   1   ,c   2   , . . . c   Qj } 
 (The set W i  can be equal to C i ) 
 
         [0084]     The following procedure is repeated for all control points c j . First the closest voxel v c  to the control point c j  is found. Then the direction f from point c j  toward the reconstructed model is computed using the covariance matrix K c  at voxel v c . The direction f is the eigenvector associated with the smallest eigenvalue of matrix K c /ω c , where ω c  is the weighting factor at voxel v c . The distance e to the reconstructed model is obtained as          f,g c           /ω c . The matching point m j  for the control point c j  is extrapolated as 
 
 m   j   =c   j   +f└e+&lt;f, ( v   c   −c   j )&gt;┘
 
 which is illustrated in  FIG. 9 . The value ef is a vector that indicates the direction and the distance toward the closest point on the reconstructed model from the voxel v c . Once the matching point is obtained for all control points, a rigid transformation Φ that best aligns two sets of points {c 1 ,c 2 , . . . ,c j } and {m 1 ,m 2 , . . . ,m j } is computed. This is accomplished using standard techniques, for example quaternions. The transformation matrix Φ is then applied to all curve points: 
 
p l ←Φp l , l=0, . . . ,M i . 
 
         [0085]     An example of a cost function Ψ that can be used to compute the rigid transformation Φ is a sum of squared distances between corresponding points, i.e.  
       Ψ   =       ∑     k   =   1     J     ⁢              c   i     -     m   i            2           
 
         [0086]     The cost function can be modified to exploit surface proprieties to improve the quality of registration. For example, the following cost function utilises color Γ=[R G B] T  associated with each point:  
           Ψ   ′     =       ∑     k   =   1     J     ⁢       λ   k     ⁢              c   k     -     m   k            2           ,       
 
 where λ k  is a weighting factor dependent on similarity of colors:  
         λ   k     =       {         1         if   ⁢           ⁢   colors   ⁢           ⁢     Γ   ck     ⁢           ⁢   and   ⁢           ⁢     Γ   mk     ⁢           ⁢   are   ⁢           ⁢   similar             0       otherwise         }     .         
 
 Γ ck  and Γ mk  are colors associated with points c k  and m k  respectively. 
 
         [0087]     Prior to computing matching points it has to be verified whether the eigenvalues λ 1 &lt;λ 2 &lt;λ 3  of matrix K c /ω c  satisfy the following relation λ 2 &gt;0.05 and λ 1 &lt;0.5λ 2 . These values are provided as indications. They mean that the local distribution of tangents is nearly planar. If not, both control point c j  and matching point m j  are rejected. When more than a given number of points are rejected (for example 70%) then the whole curve is rejected.  
         [0088]     If the average displacement of curve points after the transformation has been applied is larger then a threshold (for example 1% of the grid resolution Δ) the whole procedure is repeated  710 .  
         [0000]     Surface Extraction  
         [0089]     The surface extraction proceeds by converting the implicit surface representation in the volumetric structure into scalar distance field. This is performed by computing the direction f j  and distance e from each voxel v j  toward the reconstructed model if the ω&gt;0 at voxel v j . The direction f is eigenvector associated with the smallest eigenvalue of matrix K j /ω j , where K j  is covariance matrix and ω is the weighting factor at voxel v j . The distance e to the reconstructed model is obtained as          f j ,g j           /ω j . Distance e at each voxel represents a scalar field. A Marching Cubes algorithm, for instance, is applied to this scalar field in order to obtain a triangulated surface (represented as a set of triangles).  
       Alternative Embodiments and Applications  
       [0000]     Reconstruction of Additional Surface Properties  
         [0090]     Presented method can be used to reconstruct not only model geometry, but also different surface properties including but not limited to color, intensity, texture and temperature.  
         [0091]     To allow reconstruction of additional object properties the following modifications are required:  
         [0092]     Each curve is assumed to have a surface property assigned to each curve point, i.e. for a curve C i ={p 1 ,p 2 , . . . ,p M     i   } a property h i  is assigned to each point p i .  
         [0093]     During the initialization step  100  a single or multiple zero valued properties H are attached to each lattice point. Surface properties can be either scalar or vector valued. During the integration of curves  404 , property value H j  at voxel v j  is updated as: 
 
 H   j   ←H   j + j ( h   i   +u   c ( h   i+1   −h   i )). 
 
         [0094]     During the extraction of the triangulated surface (by Marching Cubes), property value interpolated between two voxels closest to each triangle vertex.  
         [0095]     Alternative configuration: Incremental registration The two basic building blocks of the method, curve integration  404  and curve registration  604  can be rearranged into a different configuration to accomplish incremental registration where each curve is registered prior to its integration. The flowchart in FIG.  10  illustrates the principle of functioning. All building blocks remain the same as for the configuration in  FIG. 1 .  
         [0000]     Modeling from Different Surface Entities  
         [0096]     The method presented above accepts as input a set of non-parallel 3D curves which generates organized set of three-dimensional points. However, the same method can be used to build and update the volumetric structure from various arbitrary three-dimensional entities such as partial surfaces (range images), parallel curves, unorganized clouds of points or any combination of these. Moreover, the three-dimensional points can be measured in a single plane and the coordinate system can be reduced to a two-dimensional system. Required modification for each one of these cases is discussed below.  
         [0000]     Modeling from Partial Surfaces (Range Images)  
         [0097]     Range images are matrices of points measured on the surface of an object in such a way as to allow an approximation of the real surface by a set of connected triangles. Such a surface S is defined as a set of O triangles S={Λ 1 ,Λ 2 , . . . ,Λ O }, where each triangle Λ i  is defined by three vertices p i1 , P i2  and p i3 . It is also assumed that a normal n ij  is estimated at each vertex, which can be easily accomplished using standard techniques. The surface is integrated into the volumetric structure one triangle at the time. As for the line segments, a bounding box is estimated for the triangle and for each voxel v j  within bounding box the closest point p c  on the triangle is found. The elements attached at the voxel are then updated as follows: 
 
 K   j   ←K   j   +t   1   t   2   T  
 
         [0098]     Vector g j  is updated as:  
         g   j     ←       g   j     +       ⅇ     -       d   2       0.5   ⁢   Δ           ⁡     (       v   j     -     p   c       )             
 
         [0099]     Weighting value ω j  is updated as.  
         ω   j     ←       ω   j     +     ⅇ       d   2       0.5   ⁢   Δ               
 
 where d=∥v j −P c ∥, and t 1  and t 2  are two vectors, perpendicular to each other as well as to the normal at p c . 
 
         [0100]     Surface is registered to the reconstructed model by choosing a subset of (or all) vertices of the input surface.  
         [0000]     Modeling from Parallel Curves  
         [0101]     In order to allow the reconstruction from parallel curves, the elements attached at each voxel v j  are updated as follows: 
 
 K   j   ←K   j   +t   1   t   2   T +( v   j   −p   c )( v   j   −p   c ) T  
 
         [0102]     Vector g j  is updated as:  
         g   j     ←       g   j     +       ⅇ       d   2       0.5   ⁢   Δ         ⁡     (       v   j     -     p   c       )             
 
         [0103]     Weighting value ω j  is updated as:  
         ω   j     ←       ω   j     +       ⅇ       d   2       0.5   ⁢   Δ         .           
 
         [0104]     Prior to the registration, or surface extraction the covariance matrix K c  is changed to 
 
 K   c   ←K   c   −g   j   g   j   T  
 
 Modeling for Unorganized Sets of Points 
 
         [0105]     An unorganized P set of points is simply a set of 3D Points P={p 1 ,p 2 , . . . ,p M     i   }. Model reconstruction is performed one point at a time. For a point p i , a set of voxels contained in the sphere centered at p i  is found first. Radius of sphere is ε. Then the elements attached at each voxel v j  are updated as follows: 
 
 K   j   ←K   j +( v   j   −p   i )( v   j   −p   i ) T  
 
         [0106]     Vector g j  is updated as:  
         g   j     ←       g   j     +       ⅇ       d   2       0.5   ⁢   Δ         ⁡     (       v   j     -     p   i       )             
 
         [0107]     Weighting value ω j  is updated as.  
         ω   j     ←       ω   j     +     ⅇ       d   2       0.5   ⁢   Δ               
 
 where d=∥v j −p i ∥. 
 
         [0108]     As shown in  FIG. 11 , one embodiment of the preferred invention, namely a method for reconstructing surfaces from a single or a plurality of arbitrary three-dimensional entities obtained from a target surface, comprises the following steps: obtaining a set of at least one three-dimensional entity  1100 , each entity being a set of three-dimensional points, each three-dimensional point containing at least the three-dimensional coordinates of the point on the target surface; constructing a volumetric implicit representation of the target surface in the form of a vector field  1101 , each vector in the vector field containing at least the distance to the reconstructed surface and the direction toward the reconstructed surface; placing each three-dimensional entity in the vector field and updating the vector field accordingly  1102 ; and reconstructing the target surface from the information contained in the vector field  1103 .  
         [0109]     In a method for ascertaining the three-dimensional shape of a target surface, an additional step of using a ranging sensor to produce a set of three-dimensional entities  1104  is carried out.  
         [0110]     As shown in  FIG. 12 , another embodiment of the preferred invention, namely a method for refining the alignment of arbitrary three-dimensional entities obtained from a target surface, comprises the following steps: obtaining a set of at least two three-dimensional entities  1200 , each entity being a set of three-dimensional points, each three-dimensional point containing at least the three-dimensional coordinate of the point on the target surface; constructing a volumetric implicit representation of the target surface in the form of a vector field  1201 , each vector in the vector field containing at least the distance to the reconstructed surface and the direction toward the reconstructed surface; placing at least two three-dimensional entities in the vector field and updating the vector field accordingly  1202 ; selecting at least one three-dimensional entity placed in the vector field and obtaining a subset of three-dimensional points on each of the selected three-dimensional entities, three-dimensional points in these subsets being called control points  1203 ; for each control point in each selected three-dimensional entity, computing a contribution to a cost function  1204 , the contribution being a function of at least the vector field and the three-dimensional coordinate of the control point; for each selected three-dimensional entity, computing a new position  1205  that optimizes its corresponding cost function; and placing each selected three-dimensional entity in the vector field at its newly computed position and updating the vector field accordingly  1206 .  
         [0111]     As shown in  FIG. 13 , another embodiment of the preferred invention, namely a method for refining the alignment of arbitrary three-dimensional entities obtained from a target surface, comprises the following steps: obtaining a set of at least two three-dimensional entities  1300 , each entity being a set of three-dimensional points, each three-dimensional point containing at least the three-dimensional coordinate of the point on the target surface; constructing a volumetric implicit representation of the target surface in the form of a vector field  1301 , each vector in the vector field containing at least the distance to the reconstructed surface and the direction toward the reconstructed surface; placing at least one three-dimensional entity in the vector field and updating the vector field accordingly  1302 ; selecting at least one of the three-dimensional entities not yet placed in the vector field  1303 , placing the selected three-dimensional entities in the vector field without updating the field  1304  and obtaining a subset of three-dimensional points on each of the selected three-dimensional entities, three-dimensional points in these subsets being called control points  1305 ; for each control point in each selected three-dimensional entity, computing a contribution to a cost function  1306 , the contribution being a function of at least the vector field and the three-dimensional coordinate of the control point; for each selected three-dimensional entity, computing a new position  1307  that optimizes its corresponding cost function; and placing each selected three-dimensional entity in the vector field at its newly computed position and updating the vector field accordingly  1308 .  
         [0112]     As shown in  FIG. 14 , a preferred embodiment of the system for reconstructing surfaces from a single or a plurality of arbitrary three-dimensional entities obtained from a target surface comprises the following main components: a three-dimensional entity provider  1401  for obtaining a set of at least one three-dimensional entity, each entity being a set of three-dimensional points, each three-dimensional point containing at least the three-dimensional coordinates of the point on the target surface; an implicit representation constructor  1402  for constructing a volumetric implicit representation of the target surface in the form of a vector field, each vector in the vector field containing at least the distance to the reconstructed surface and the direction toward the reconstructed surface; for placing each three-dimensional entity in the vector field and for updating the vector field accordingly; and a target surface reconstructor  1403  for reconstructing the target surface from the information contained in the vector field. Preferably, if the system is used to ascertain the three-dimensional shape of a target surface, a ranging sensor  1400  is used to produce the set of three-dimensional entities.  
         [0113]     If the system is used to refine the alignment of arbitrary three-dimensional entities obtained from a target surface, the following components are provided: a control point selector  1404  for selecting at least one three-dimensional entity placed in the vector field and obtaining a subset of three-dimensional points on each of the selected three-dimensional entities, three-dimensional points in these subsets being called control points; a cost function calculator  1405  for computing, for each control point in each selected three-dimensional entity, a contribution to a cost function, the contribution being a function of at least the vector field and the three-dimensional coordinate of the control point; for each selected three-dimensional entity, a new position calculator  1406  for computing a new position that optimizes its corresponding cost function. The implicit representation constructor  1402  is then used to place each selected three-dimensional entity in the vector field at its newly computed position and updating the vector field accordingly.  
         [0114]     If the system is used to refine the alignment of arbitrary three-dimensional entities obtained from a target surface, the following components are provided: a control point selector  1404  for selecting at least one of the three-dimensional entities not yet placed in the vector field, using the implicit representation constructor  1402  to place the selected three-dimensional entities in the vector field without updating the field and obtaining a subset of three-dimensional points on each of the selected three-dimensional entities, three-dimensional points in these subsets being called control points; a cost function calculator  1405  for computing, for each control point in each selected three-dimensional entity, a contribution to a cost function, the contribution being a function of at least the vector field and the three-dimensional coordinate of the control point; a new position calculator  1406  for computing, for each selected three-dimensional entity, a new position that optimizes its corresponding cost function; and using the implicit representation constructor  1402  to place each selected three-dimensional entity in the vector field at its newly computed position and updating the vector field accordingly.  
         [0115]     While illustrated in the block diagrams as groups of discrete components communicating with each other via distinct data signal connections, it will be understood by those skilled in the art that the preferred embodiments are provided by a combination of hardware and software components, with some components being implemented by a given function or operation of a hardware or software system, and many of the data paths illustrated being implemented by data communication within a computer application or operating system. The structure illustrated is thus provided for efficiency of teaching the present preferred embodiment.  
         [0116]     It will be understood that numerous modifications thereto will appear to those skilled in the art. Accordingly, the above description and accompanying drawings should be taken as illustrative of the invention and not in a limiting sense. It will further be understood that it is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains and as may be applied to the essential features herein before set forth, and as follows in the scope of the appended claims.
The present invention relates to a method and a system for creating three-dimensional models of objects from sets of arbitrary three-dimensional entities obtained from target surfaces. It also provides an efficient method for individually refining the alignment of curves to improve the accuracy of the surface model with a linear complexity with respect to the number of curves. The principle behind the invention is that a set of three-dimensional entities, at their approximate positions, creates a field from which the surface can be extracted. The field is constructed in a manner such that the three-dimensional entities are attracted toward the extracted surface. This attraction is used to accurately register each three-dimensional entity with respect to extracted surface. Through iterations, both the field and the entity positions are refined.