miércoles, 6 de junio de 2012

Proyecto: Simulación de Cirugía Plástica basada en superficies de Bezier

1. Visión General
  • Problema a resolver
     “El 30% de los pacientes que recurren a su consultorio, lo hacen para realizarse una re-cirugía, con el objetivo de   modificar ciertas imperfecciones resultado de una intervención quirúrgica anterior”.

  •  Solución y objetivos
    Simular resultados que se pueden obtener en una cirugía plástica Estética (rinoplastia, liposucción, abdominoplastía,  aumento y/o elevación mamaria, etc.) , ayudando de esta manera a la decisión final de la persona interesada.   (paciente que desea realizarse una cirugía plástica).

2. Transformada Warping: Bases Teóricas
  • Transformada Warping: Definición
      Es una transformación geométrica genérica que modifica la relación espacial de los puntos en la imagen, variando desde una simple traslación o rotación de la imagen hasta deformaciones variantes en el espacio bastante complejas.
  • En resumen: 

Fig1.  W: Función de mapeo de imagen origen U, a imagen destino U'.


  3. Warping basado en superficies producto tensorial de Bezier
  •   Curvas de Bezier:
  • Superficies Producto Tensorial de Bezier:


  • Superficies generadas
Fig2. Deformación de aumento.

Fig3. Deformaciones  oblicuas.

Fig4. Superficie sobre imagen.


4. Resultados

  •  Resultados en simulación de cirugía plástica

Fig5. Simulación de Rinoplastia en mujeres.


Fig6. Simulación de Aumento de Medidas (Senos)


Fig7. Simulación de Reducción de Papada


Fig8. Simulación de Aumento de Masa Muscular.


Fig9. Simulación de Liposucción


Fig10. Simulación de Rinoplastía y Reducción de Papada, en varones


Fig11. Comparación con Deformación obtenida por el Software Face Touch Up.
(Reducción del ancho de la nariz)


  • Otros resultados que se pueden obtener: Énfasis de expresiones faciales

Fig12. expresión1.

Fig13. expresión2


5. Trabajos Futuros
  • Completar la simulación de los procedimientos de beflaroplastia (cirugía de los párpados) y el estiramiento facial.
  • Probar con otros tipos de superficies suaves.
  • Solucionar el problema de perder la calidad de la imagen cuando se hacen múltiples deformaciones en la una misma región.

---------------------------------------------------------------------------------------------------------------------------------------------
  • Video:



--------------------------------------------------------------------------------------------------------------------------------------------------------

Implementation of "Image Deformation Using Moving Least Squares"



  1. Moving Least Squares Deformation
  • Affine Deformations
          Preliminary results:
          Let p be a set of control points and q the deformed positions of the control points p.




Fig.1. Shows the unddeformed image. Where the blue poits  is a set p and red points is the set q.





Fig2. Undeformed image (upper left), deformed image (upper right) and surface deformation (bottom).




Fig.3. Deformed image (upper) and surface deformation (bottom).





Fig.4. Deformed image (upper) and surface deformation (bottom).





Fig.5. Deformed image (upper) and surface deformation (bottom).




Fig6. Undeformed image (upper left), deformed image (upper right) and surface deformation (bottom).



Fig.7. Deformed image (upper) and surface deformation (bottom).





Note:  
  • The preliminary results shown above are the implementation of the methods described in the paper: Image Deformation Using Moving Least Squares, Scoot Schaefer, Travis McPhail and Joe Warren.
  • Matlab was used for implementation.
  • This project currently under development. New updates soon ... !!


Algorithm for the enhancement the aesthetic appeal of human faces in digital images, based on the Marquardt's Phi Mask


  1. Important definitions
  • Beauty. Beauty has been defined as a combination of qualities that give pleasure to the senses or to the mind. It is a philosophical concept, the aspects of which are studied under the term aesthetics, derived from the Greek word for perception (aisthesis). Aesthetics, therefore, is the study of beauty and, its opposite, the ugly. It involves both the understanding and evaluation of beauty, proportions and symmetry.
  • Facial beauty. The assessment of facial beauty is immersed in subjectivity and therefore leans towards the world of art. Facial proportions and facial balance, however, can be measured and therefore fit somewhere between art and science.
  • Facial proportions and symmetry. The concept that 'ideal' proportions are the secret of beauty is perhaps the oldest idea regarding the nature of beauty. Throughout the ages, painters and sculptors have attempted to establish ideal proportions for the human form, however, possibly the most famous of all axioms about ideal proportions is that of the Golden Proportion, also named divine proportions.
  • Divine Proportion. This is a geometrical proportion in which a line AB is divided at a point C.in such a way that the ratio of AC to CB is equal to the ratio of AB to AC. Some elementary algebra shows that in this case the ratio of AC to CB is equal to the irrational number 1.618.

                                                     Fig.1. Golden Radio

    C divides the line segment AB according to the Golden Ratio and is represented by the symbol  (phi).
    More and more information is coming to light as to the existence and the significance of the divine proportion. It is all encompassing and it affects living and non-living entities.
Fig.2. Golden radio is everywhere in our lives.
    Divine proportion of the human body, specifically shows some of the vertical relationship of the face.
Fig.3.On the top the divine proportion in the human face, 
on the bottom two beautiful face showing divine proportion.


  • Golden Facial Mask. Dr. Stephen R. Marquardt developed Golden Facial Mask, also called Golden decagon mask and Marquardt phi Mask. This mask is based on the divine proportion, more specifically the golden decagon. Marquardt believes that this mask really describes the idealized form of the human face.

  •              Fig.4. Golden Decagon Mask (repose and smiling). It is copyrighted by Stephen Marquardt.


    • Fundamentals about Golden Facial Mask
      • Marquardt believes that the facial attractiveness, there does seem to be a universal perception of characteristics of the form or shape of the face that are found attractive, and this attractive-face concept seems to be not only universal within one culture, but universally cross-cultural, regardless of other parameters, including birth rank, age, sex, etc. 
      • Concepts of facial beauty have been thought to vary with time and among races, but our research shows that this is not particularly true. The mask’s correlation with attractive faces throughout history seems to be quite consistent. There are slight variances between the races with regard to the mask, but this variance is also consistent throughout time.
      • The mask really describes the idealized form of the face. The ideal size of the face is approximately 1/7 to 1/8 of body height, which has been known since the first Greek sculptors presented this concept, and has been used ever since. On the other hand, there has never been a clear understanding or any quantification of the ideal shape or form of the face or its components, including the nose, eyes, lips, etc. I believe these masks are based on the first concept that truly mathematically quantifies the idealized face and its frontal and lateral views, both resting and smiling.
    • Making the mask. The simplest configuration that describes the Golden Ratio in two dimensions is an acute Golden Triangle (fig. a) with sides of 1.618 and a base of 1, or an obtuse Golden Triangle (fig. b) with a base of 1.618 and sides of 1. Together these elements form a Golden regular pentagon (fig. c), and the regular pentagon itself, if duplicated, inverted , and superimposed on itself, forms the Golden Decagon (fig. d).



    •                      
                                 Fig.5. Golden elements that formed the golden facial mask.
      Marquardt goes into greater detail on his website: http://www.beautyanalysis.com/


    2. Overwiew: Algorithm for the enhancement the aesthetic appeal of human faces
    The main idea is that given a human face image, the algorithm should deform it in order to approximate as much as possible toward the Marquardt Phi Mask, automatically. 

Fig.6. Overview our algorithm.


  •  Identifying face.  Given an image identify the face by using robust algorithms suggested in the state-of-the-art.
  • Extracting feature points. Identify a set of facial landmarks. To solve this task,  I'm experimenting with two algorithms in the state-of-the-art such as:  Active shape models (ASM) and Bayesian Tangent Shape Model (BTSM).
  • Deformation image acoording Marquardt’s phi Mask. Automatically deforming the image towards the Mask aided by, the obtained, landmarks (used as control points). In order to solve this task I’m experimenting with several existing algorithms in the state-of-the-art such as, 2D-Free Form Deformation (2D-FFD), Multilevel Free-Form Deformation (MFFD) and Image Deformation Using Moving Least Squares.



Note:  
  • This project currently under development. New updates soon ... !!
  • Many of images and information about beauty and aesthetics were obtained from: 
    • Facial Aesthetics: Concepts and canons, Farhad B Naini and Daljit S Gill.
    • Facial Beauty-Establishing a Universal Standard, Yosh Jefferson.
    • Jco Interviews. Dr Stephen R. Marquardt on the Golden Decagon and Human Facial Beauty
    • Data-Driven Enhancement of Facial Attractiveness, Daniel Cohen-Or et al.