Facemorph.aam
Class MultiscaleOpenGLAAM

java.lang.Object
  extended by Facemorph.aam.MultiscaleOpenGLAAM

public class MultiscaleOpenGLAAM
extends java.lang.Object

Multiscale AAM with Opengl warping


Constructor Summary
MultiscaleOpenGLAAM(Mask mask, ASM asm, PCI pci, int type)
          Creates a new instance of MultiscaleAAM
MultiscaleOpenGLAAM(Mask mask, ASM asm, PCI pci, int type, javax.media.opengl.GLAutoDrawable canvas)
          Creates a new instance of MultiscaleAAM
 
Method Summary
 Template fitAAM(java.awt.Image subject, Template template)
          Fit the AAM to an image
 Template fitAAM(java.awt.Image subject, Template template, int maxIts, int maxLoops, int start)
          Fit the AAM to an image
static void main(java.lang.String[] args)
          Main method for testing
 void setGLAutoDrawable(javax.media.opengl.GLAutoDrawable drawable)
          Set the opengl context
 void test(java.lang.String imageList, java.lang.String resultsFile, java.lang.String outDir)
          Test this AAM
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiscaleOpenGLAAM

public MultiscaleOpenGLAAM(Mask mask,
                           ASM asm,
                           PCI pci,
                           int type)
Creates a new instance of MultiscaleAAM

Parameters:
mask - the mask to use
asm - the PCA shape model to use
pci - the image PCA data to use
type - the type of AAM algorithm to use

MultiscaleOpenGLAAM

public MultiscaleOpenGLAAM(Mask mask,
                           ASM asm,
                           PCI pci,
                           int type,
                           javax.media.opengl.GLAutoDrawable canvas)
Creates a new instance of MultiscaleAAM

Parameters:
mask - the mask to use
asm - the PCA shape model to use
pci - the image PCA data to use
type - the type of AAM algorithm to use
canvas - the opengl canvas to use
Method Detail

setGLAutoDrawable

public void setGLAutoDrawable(javax.media.opengl.GLAutoDrawable drawable)
Set the opengl context

Parameters:
drawable - the opengl context to use

fitAAM

public Template fitAAM(java.awt.Image subject,
                       Template template)
Fit the AAM to an image

Parameters:
subject - the image to fit to
template - the initial template
Returns:
returns the fitted template

fitAAM

public Template fitAAM(java.awt.Image subject,
                       Template template,
                       int maxIts,
                       int maxLoops,
                       int start)
Fit the AAM to an image

Parameters:
subject - the image to fit to
template - the initial template
maxIts - the maximum number of iterations per loop
maxLoops - the max number of loops per level
start - the start output counter (for debugging output)
Returns:
returns the fitted template

main

public static void main(java.lang.String[] args)
Main method for testing

Parameters:
args - the input args

test

public void test(java.lang.String imageList,
                 java.lang.String resultsFile,
                 java.lang.String outDir)
Test this AAM

Parameters:
imageList - list of images to test on
resultsFile - the output results file
outDir - the output folder