Abstract:
A method for deforming an image using a physical model includes inputting the image, discretizing the image into a grid, applying forces to the grid upon receiving an input command for dragging the grid, updating a mesh deformation of the grid according to the forces, and wrapping the image according to a deformed mesh to produce a deformed image, wherein a wrapped image is displayed on an display device.

Description:
CROSS-REFERENCE TO RELATED APPLICATION 
       [0001]    This application claims priority to U.S. Provisional Application Ser. No. 60/889,657, filed on Feb. 13, 2007, which is herein incorporated by reference in their entirety. 
     
    
     BACKGROUND OF THE INVENTION 
       [0002]    1. Technical Field 
         [0003]    The present invention relates to deforming images, and more particularly to a system and method for deforming images using physical models. 
         [0004]    2. Discussion of Related Art 
         [0005]    As-rigid-as-possible image deformations produce intuitive results when a user wants to manually control the shape deformation of an image. As-rigid-as-possible transformations, introduced for the purpose of shape interpolation, are characterized by a minimum amount of scaling and shearing. Such transformations mimic the adaptation of the mechanical properties (e.g., the stiffness) of the transformation to enforce rigidity. 
         [0006]    In the context of image deformation as-rigid-as-possible transformations have been introduced to avoid undesirable effects like folding and non-uniform scaling typically perceived in previous methods. The particular properties of as-rigid-as-possible transformations have been enforced by minimizing the distortion of triangular elements in a 2D mesh. By separating the rotational part from the scaling the problem is decomposed into the solution of two least squares problems. In principle, this technique can be seen as a variant of constraint mesh deformation techniques, which pose the problem of shape deformation as an energy minimization problem. Such techniques 
         [0000]    have been used successfully for shape-preserving 3D mesh deformation, and in the context of image deformation. 
         [0007]    The idea of shape-preserving deformations has been built upon using a rotation invariant shape representation constraint by a set of angles and lengths relating a vertex to its immediate neighbors. Another method for inhomogeneous texture mapping is based on a classification of cells into rigid and elastic. Determining the global displacement field can then be posed as an optimization problem that takes into account the specific cell properties as additional constraints. 
         [0008]    Although as-rigid-as-possible transformations are well suited for the purpose of shape preservation they are not effective at following physics-based constraints like volume preservation or elastic deformations. As images are typically composed of parts, it is often desired to continuously adjust the stiffness of the transformation to permit larger displacements over parts that are known to be compliant and smaller displacements over parts that are known to be less compliant. 
         [0009]    Therefore, a need exists for an efficient image deformation method using physical models together with as-rigid-as-possible transformations. 
       SUMMARY OF THE INVENTION 
       [0010]    According to an embodiment of the present disclosure, a method for deforming an image using a physical model includes inputting the image, discretizing the image into a grid, applying forces to the grid upon receiving an input command for dragging the grid, updating a mesh deformation of the grid according to the forces, and wrapping the image according to a deformed mesh to produce a deformed image, wherein a wrapped image is displayed on an display device. 
         [0011]    According to an embodiment of the present disclosure, a system for deforming an image using a physical model includes a memory device storing a plurality of instructions embodying the system for deforming an image using a physical model and a processor for receiving an image and executing the plurality of instructions to perform a method comprising discretizing the image into a grid, applying forces to the grid upon receiving an input command for dragging the grid, updating a mesh deformation of the grid according to the forces, and wrapping the image according to a deformed mesh to produce a deformed image. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0012]    Preferred embodiments of the present invention will be described below in more detail, with reference to the accompanying drawings: 
           [0013]      FIGS. 1A-D  are exemplary views of a user interface for deforming an image according to an embodiment of the present disclosure; and 
           [0014]      FIG. 2  is an exemplary view of a user interface displaying an image discretized into finite elements according to an embodiment of the present disclosure; 
           [0015]      FIG. 3  is a flow chart of a method for image deformation using physical models according to an embodiment of the present disclosure; 
           [0016]      FIG. 4  is a diagram of a system according to an embodiment of the present disclosure. 
       
    
    
     DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS 
       [0017]    According to an embodiment of the present disclosure, image deformation using physically-based deformation models allows for the assignment of material stiffness on a per-pixel basis. On top of image deformation, a stiffness editor, a depth editor, a cut editor, and a key frame animation system allowing the user to record movies from a single image may be implemented. 
         [0018]    Physically-correct deformation models may be applied to images in real-time using simulation engines having multi-grid solvers. 
         [0019]    According to an embodiment of the present disclosure, by using the multi-grid solvers, material stiffness can be simulated realistically by assigning stiffness to each finite element of the simulation grid. Thus, material properties and tissue properties can be simulated realistically. Further, a user can drag any point in the image and drag it to a desired target location. The user does not need to set handles on the deformation mesh. Additionally, linear and non-linear simulation types, finite elements, physically correct and as-rigid-as-possible deformation constraints can be used and exchanged interactively for different kinds of deformation results. 
         [0020]    Referring to a physics-based deformation according to an embodiment of the present disclosure, a linear elasticity model is implemented with additional constraints are enforced to mimic plasticity, as an elastic material to resist a change in shape. For the linear elasticity model, it is assumed that the image is to be represented as a 2D triangular grid, where exactly one grid point is placed at each pixel center. Grid points are then connected to their one-ring neighbors via edges. Given such a grid in the reference configuration xεΩ, the deformed grid is modeled using a displacement function u(x),u:           2 →           2  yielding the deformed configuration x+u(x). Triangular finite elements may be replaced by quadrangular elements to further an optimization. 
         [0021]    If the object to be simulated obeys to the model of linear elasticity the dynamic behavior is governed by the Lagrangian equation of motion 
         [0000]        Mü+Cü+Ku=f   (1) 
         [0000]    where M, C, and K are respectively known as the mass, damping and stiffness matrices. u includes the linearized displacement vectors of all vertices and f are the linearized force vectors applied to each vertex. These vectors are either computed from mouse drags issued by the user or they are taken from pre-computed force templates as described below. The linear elasticity model only considers material that has a linear relationship between how hard it is squeezed or torn (stress) and how much it deforms (strain). This relationship is expressed by the material law, based on which the per-element contributions to the global stiffness matrix K are computed. 
         [0022]    Equipped with any suitable discretization, finite element methods build the aforementioned matrices by assembling all element matrices to yield a sparse system of linear equations. 
         [0023]    For numerical simulation, multi-grid methods provide a generalized means for constructing customized solvers for partial differential equations, and they give rise to scalable solvers exhibiting linear complexity in the number of supporting vertices. At the core of any geometric multi-grid scheme a hierarchy of meshes at different resolutions is employed. In a multi-grid V-cycle specific quantities are transferred across this hierarchy from fine to coarse and coarse to fine. Using the regular grid structures employed in this work, such a hierarchy can easily be built by regularly sub-sampling the grid vertices and connecting these vertices as described above. While vertex quantities are simply interpolated when going from the coarser to the finer resolution, the inverse step from fine to coarse essentially averages over the quantities at respective vertices in the fine mesh. 
         [0024]    Here, an implicit multi-grid solver for image deformations is amenable to the simulation of heterogeneous materials exhibiting a wide range of stiffness values. The lack of rotational invariants of the linear approximation of the strain tensor, which results in artificial forces once elements get rotated out of their reference configuration is addressed using co-rotated finite elements integrated into the multi-grid method. 
         [0025]    According to an embodiment of the present disclosure, a physics-based finite element simulation is extended to account for the particular needs in image deformation. One example of an extension is a modified material law that enables as-rigid-as-possible transformations. Additional exemplary extensions include algorithms to efficiently handle material updates and to fixate simulation vertices without sacrificing speed. 
         [0026]    Referring to the material laws; the stiffness matrix K accounts for the strain and stress energy, and it depends on the material laws and parameters used to couple stress and strain. In an isotropic and fully elastic body stress (Σ) and strain (ε) tensors are coupled through Hooke&#39;s law (linear material law) 
         [0000]    
       
         
           
             
               
                 
                   
                     ∑ 
                     
                       = 
                       
                         
                           
                             
                               E 
                                
                               
                                   
                               
                                
                               v 
                             
                             
                               
                                 ( 
                                 
                                   1 
                                   + 
                                   v 
                                 
                                 ) 
                               
                                
                               
                                 ( 
                                 
                                   1 
                                   - 
                                   
                                     2 
                                      
                                     
                                         
                                     
                                      
                                     V 
                                   
                                 
                                 ) 
                               
                             
                           
                            
                           
                             
                               ( 
                               
                                 
                                   ∑ 
                                   
                                     i 
                                     = 
                                     1 
                                   
                                   2 
                                 
                                  
                                 
                                     
                                 
                                  
                                 
                                   ɛ 
                                   u 
                                 
                               
                               ) 
                             
                             · 
                             
                               I 
                               22 
                             
                           
                         
                         + 
                         
                           
                             E 
                             
                               1 
                               + 
                               v 
                             
                           
                            
                           ɛ 
                         
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   2 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where E is the elastic modulus, v is the Poisson ratio and I 22  is the identity matrix. 
         [0027]    Shape deformations obeying Hooke&#39;s law are often not desired when manipulating images. Especially volume preservation as it is enforced by Hookes law is a physical phenomenon that contradicts shape preserving as-rigid-as-possible deformations. 
         [0028]    Volume preservation, on the other hand, can be avoided by prohibiting transversal contractions of the material being deformed. This is achieved by appropriately varying the Poisson ratio v in equation 2, which defines the ratio of transverse contraction to longitudinal stretching in the direction of the force. In particular, v is set to 0, thus also avoiding any curvature in a direction perpendicular to the direction of stretching or bending. 
         [0029]    To enable as-rigid-as-possible transformations, the physical simulation is enforced to respect an anisotropic material law. By doing so, the user is able to flexibly control the resulting deformations by continuously varying between rigid and highly elastic materials within one image. The anisotropic material law is simulated by adding a scaling factor α for the off-diagonal elements in the stress tensor, yielding the rigid material law 
         [0000]    
       
         
           
             
               
                 
                   ∑ 
                   
                     = 
                     
                         
                     
                      
                     
                       E 
                        
                       
                         ( 
                         
                           
                             
                               
                                 ɛ 
                                 11 
                               
                             
                             
                               
                                 α 
                                  
                                 
                                     
                                 
                                  
                                 
                                   ɛ 
                                   12 
                                 
                               
                             
                           
                           
                             
                               
                                 α 
                                  
                                 
                                     
                                 
                                  
                                 
                                   ɛ 
                                   21 
                                 
                               
                             
                             
                               
                                 ɛ 
                                 22 
                               
                             
                           
                         
                         ) 
                       
                     
                   
                 
               
               
                 
                   ( 
                   3 
                   ) 
                 
               
             
           
         
       
     
         [0030]    The modified material law allows for transformations minimizing the amount of shearing or rotation, respectively, and it can thus effectively be used to produce as-rigid-as-possible transformations. For a value of α=1 the material law is isotropic. By decreasing the value of α the internal stress is reduced into the direction of x 2  if strain is induced into the direction of x 1 , and vice versa. Consequently, such a setting favors shearing instead of rotation. Contrarily, by setting α to a value larger than 1 rotations instead of shearing will be favored. Note, that typically the rigid material law does not preserve volume. However, a larger value of α leads to volume growth if shearing forces are applied, while small values of α tend to preserve volume in this case. 
         [0031]    To improve simulation accuracy quadrangular finite elements have been integrated with bi-linear nodal basis functions into the multi-grid approach. Quadrangular elements include 4 supporting vertices v k , thus interpolating the deformation in the interior as 
         [0000]    
       
         
           
             
               
                 
                   
                     u 
                      
                     
                       ( 
                       x 
                       ) 
                     
                   
                   = 
                   
                     
                       ∑ 
                       
                         k 
                         = 
                         0 
                       
                       3 
                     
                      
                     
                         
                     
                      
                     
                       
                         
                           N 
                           k 
                         
                          
                         
                           ( 
                           x 
                           ) 
                         
                       
                        
                       
                         u 
                         k 
                       
                     
                   
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
             
               
                 where 
               
               
                 
                     
                 
               
             
             
               
                 
                   
                     
                       N 
                       k 
                     
                      
                     
                       ( 
                       x 
                       ) 
                     
                   
                   = 
                   
                     
                       c 
                       0 
                       k 
                     
                     + 
                     
                       
                         c 
                         1 
                         k 
                       
                        
                       
                         x 
                         1 
                       
                     
                     + 
                     
                       
                         c 
                         2 
                         k 
                       
                        
                       
                         x 
                         2 
                       
                     
                     + 
                     
                       
                         c 
                         3 
                         k 
                       
                        
                       
                         x 
                         1 
                       
                        
                       
                         
                           x 
                           2 
                         
                         . 
                       
                     
                   
                 
               
               
                 
                     
                 
               
             
           
         
       
     
         [0032]    u k  is the displacement of the k-th vertex, and the coefficients c i   k  are derived from N k (v k )=1 and N k (v i )=0 if k≠i. From the definition of the nodal basis functions as given the element matrices with respect to their reference configuration can now be pre-computed. 
         [0033]    By using quadrangular elements the following beneficial properties are achieved. The overall number of elements is significantly reduced, resulting in a faster assembly of the global system matrix for systems in which the system matrix is reassembled in every simulation frame. Semi-quadratic interpolation as supported by quadrangular elements improves the deformation behavior by increasing simulation accuracy. 
         [0034]    In image deformation, the user does not typically expect the image to move back into its reference configuration once the control handles are released. To avoid this behavior forces induced by the user are accumulated into a global force field, and the resulting displacements of grid points are computed just at the very end of the user interaction. This is advantageous because in order to account for the plasticity the system matrix does not have to be updated. Instead, we consider the linear system of equations in the form 
         [0000]        K ( u   plastic   +u )= f   plastic   +f    
         [0000]    where Ku plastic =f plastic  are the plastic deformations computed so far, and f are the forces applied by the current user input. 
         [0035]    For an image deformation tool according to an embodiment of the present disclosure that provides flexibly control for the deformation of different parts of the image, specific stiffness values are assigned to parts of the image. These values may be assigned interactively while the simulation is running, the simulation method reacts on such changes. 
         [0036]    It can be observed that element matrices do not have to be rebuilt if only the stiffness E of a single finite element is to be changed. This is because in equation (2) and (3) Σ is a multiple of E, and thus E can be factored out of the element matrix. This means that the element matrix only has to be scaled by the factor E new /E old , which can be performed in the reassembly of the global stiffness matrix at no additional cost. 
         [0037]    A segmentation algorithm is used for assigning specific properties to parts of an image. It should be noted that it is possible to assign these properties using a painting tool on a per-pixel basis. The image segmentation algorithm assigns the properties on a per-object basis. The segmentation algorithm extracts objects from the image automatically by single mouse clicks or strokes on top of the object. Once the object&#39;s boundaries are found the interior is filled with a user-defined property. 
         [0038]    Since stiffness is a quantity used to adjust the deformation behavior, and thus the kind of transformation performed, the segmentation algorithms assign stiffness to parts of an image. By using an interactive segmentation algorithm stiffness can be assigned to objects in a single mouse click. The real-time segmentation algorithm we describe below even enables on-the-fly stiffness assignment during the deformation process, and it can thus be used flexibly to interactively control the resulting deformations. In addition, segmentation is used to select mesh vertices within particular image regions that should be fixed and to establish a rendering order of mesh elements by assigning object-specific depth values. 
         [0039]    Any segmentation algorithm can be used for each of the aforementioned tasks. Of these, non-binary segmentation algorithms are useful since the segmentation results yield a smooth transition between the segmented object and the background. For a stiffness assignment, the segmentation result can be mapped directly to stiffness using a transfer function. In this way, abrupt stiffness changes can be avoided in the simulation grid at no extra cost. 
         [0040]    The Random Walker algorithm is an example of an algorithm that falls into the category of non-binary segmentation algorithms. It is fast, easy to implement on the GPU and numerically stable. 
         [0041]    The Random Walker algorithm is started on an image that contains a number of seed pixels indicating the object to segment. Given a random walker starting at every other pixel, the probability that this walker reaches one of the seeded pixels is computed. The probability that a random walker travels into a particular direction is determined by the image structure. The change in pixel intensity is a measure for the probability by which a random walker crosses over to a neighboring pixel. Therefore, there is a high likelihood for a random walker to move inside the segmented object, but low likelihood to cross the object&#39;s boundary. By multiplying probabilities computed along the paths from pixels to seed points yields a probability distribution representing a non-binary segmentation. 
         [0042]    To use the Random Walker algorithm on color images we first convert RGB pixel values in the image to intensity values. Pixel values are first transformed to the Lab color space and the Euclidian length of the Lab vector length is used as intensity. Next, a function to express the probability is defined to map changes in image intensities to crossing weights. 
         [0043]    The principle idea is to express random walks by a system of linear equations instead of simulating the random walks itself. With the seed points as boundary conditions the problem can be posed as the solution of a sparse, symmetric, positive-definite system of linear equations. 
         [0044]    To make this solution fast, and thus to enable the use of the Random Walker in real-time applications, numerical GPU-solvers can be used. A GPU conjugate gradient method may be used that enables segmentation of high-resolution images within milliseconds. 
         [0045]    Referring now to  FIGS. 1A-D  and a user interface for a system and method for image deformation using physical models, a user loads an image to deform  FIG. 1A . By mouse clicking the image at an arbitrary point  FIG. 1B , the point follows the mouse movement as long as the mouse button is pressed  FIG. 1C . This allows dragging points/areas/objects to new places in the photograph  FIGS. 1B-D . The arrow  100  indicates the origin and target drag motion. In  FIG. 1D  note, how the dragged area remains stiff while the background deforms. 
         [0046]      FIG. 2  illustrates the grid of finite elements. 
         [0047]    A paint-and-fill interface may be used to assign stiffness, fixation, depth, etc. to an image. The interface allows painting these properties on top of the image using different brush sizes. As users typically prefer to assign properties on a per-object basis, the segmentation algorithm is built into the interface and can then be used to segment objects from a single mouse click. Upon segmentation, default or selected parameter values are assigned to respective image structures. 
         [0048]    Referring to  FIG. 3  and a method for image deformation; an input image  300  is discretized into a regular grid for the simulation/deformation engine  301 . Forces to grid vertices are applied upon the user dragging the grid  302 . The physically-based simulation engine updates the mesh deformation according to the applied forces  303 . The rendering engine warps the image according to the deformed mesh  304 . The wrapped image is output to, for example, a display device, a memory device, etc. 
         [0049]    Once all image properties are set the image is deformed using mouse drags. Therefore, the vertex is determined in the simulation grid closest to the mouse position. From the direction and strength of the mouse drag we derive a force vector to be applied to the vertex. By using, for example, the mouse wheel, the user can generate a radially expanded force field of arbitrary extend. It can be selected whether forces should decay smoothly with increasing distance to the center vertex or should be constant within the selected region. The direction of the force field is everywhere identical to the force applied to the center vertex. 
         [0050]    Deformations on a per-object basis can be achieved using on-the-fly segmentations for image deformations. Besides the assignment of properties to parts of an image in a pre-process, the Random Walker is employed as a tool for on-the-fly parameter assignment. In this way, the user can flexibly select objects and move them around while the surroundings deform accordingly. On-the-fly assignment starts once the user clicks the initial drag point. Substantially instantaneously, the segmentation algorithm considers the cell of the simulation grid that contains this point as a seed point for the Random Walker. The segmentation is then performed on the undeformed simulation grid, thereby assigning stiffness values to the segmented object. After the stiffness values are downloaded to the simulation engine, which updates the system matrices, the user starts dragging the picked object while the background deforms. Note that by applying soft stiffness to the picked object, local object deformations are possible. 
         [0051]    According to an embodiment of the present disclosure, a stiffness editor can be implemented wherein stiffness can be assigned to each finite element separately. This allows realistic deformations by using real-world tissue stiffness. 
         [0052]    A cut editor may be used to separate foreground objects from the background. Finite elements in the background are removed from the simulation grid. This way, artificial deformations without disturbing effect from the background can be achieved. 
         [0053]    A depth editor may be implemented which allows the user to assign depth values on a per pixel basis. Depth information is important as soon as the deformed image overlaps itself. The depth values determine what is in front and what is in the back. 
         [0054]    According to an embodiment of the present disclosure, animations can be created from image deformations by saving key frames of the force field using a key frame editor. The key frame playback interpolates the force fields and runs the deformation engine to get the warped image. 
         [0055]    It should be noted that embodiments of the present disclosure may be used in various applications for various images. For example, embodiments are not limited to a specific types of image like photographs, painting, medical images, sensor images, etc. 
         [0056]    Further, embodiments of the present disclosure can be applied to medical images, since the simulation engine supports the assignment of real-world stiffness properties on a per-pixel (and even sub-pixel) basis. Therefore, with the knowledge of the stiffness properties in a medical image, applying forces by mouse drags to a medical image results in a realistic behavior of organ deformations. The manual image registration is one application. 
         [0057]    It is to be understood that the present invention may be implemented in various forms of hardware, software, firmware, special purpose processors, or a combination thereof. In one embodiment, the present invention may be implemented in software as an application program tangibly embodied on a program storage device. The application program may be uploaded to, and executed by, a machine comprising any suitable architecture. 
         [0058]    Referring to  FIG. 4 , according to an embodiment of the present invention, a computer system  401  for deforming images using physical models comprise, inter alia, a central processing unit (CPU)  402 , a memory  403  and an input/output (I/O) interface  404 . The computer system  401  is generally coupled through the I/O interface  404  to a display  405  and various input devices  406  such as a mouse and keyboard. The support circuits can include circuits such as cache, power supplies, clock circuits, and a communications bus. The memory  403  can include random access memory (RAM), read only memory (ROM), disk drive, tape drive, etc., or a combination thereof. The present invention can be implemented as a routine  407  that is stored in memory  403  and executed by the CPU  402  to process a signal, e.g., a closed surface mesh, from the signal source  408 . As such, the computer system  401  is a general purpose computer system that becomes a specific purpose computer system when executing the routine  407  of the present invention. The computer system  401  may further include a GPU  409  for processing certain operations. 
         [0059]    The computer platform  401  also includes an operating system and micro instruction code. The various processes and functions described herein may either be part of the micro instruction code or part of the application program (or a combination thereof) which is executed via the operating system. In addition, various other peripheral devices may be connected to the computer platform such as an additional data storage device and a printing device. 
         [0060]    It is to be further understood that, because some of the constituent system components and method steps depicted in the accompanying figures may be implemented in software, the actual connections between the system components (or the process steps) may differ depending upon the manner in which the present invention is programmed. Given the teachings of the present invention provided herein, one of ordinary skill in the related art will be able to contemplate these and similar implementations or configurations of the present invention. 
         [0061]    Having described embodiments for a system and method for deforming images using physical models, it is noted that modifications and variations can be made by persons skilled in the art in light of the above teachings. It is therefore to be understood that changes may be made in the particular embodiments of the invention disclosed which are within the scope and spirit of the invention as defined by the appended claims. Having thus described the invention with the details and particularity required by the patent laws, what is claimed and desired protected by Letters Patent is set forth in the appended claims.