Facemorph.mdl
Class TemplatePatchMDL

java.lang.Object
  extended by Facemorph.mdl.TemplatePatchMDL

public class TemplatePatchMDL
extends java.lang.Object

Template patch groupwise alignment (experimental)


Constructor Summary
TemplatePatchMDL(java.util.ArrayList<java.awt.image.BufferedImage> images, Template template, int patchsize, int windowSize)
          TemplatePatchMDL constructor
 
Method Summary
 TemplatePatchMDL getLowRes()
          Get a low res approximation to the problem
 java.awt.geom.Point2D.Float getPointUpdate(java.awt.geom.Point2D.Float sPt, java.awt.geom.Point2D.Float tPt, FloatImage source, FloatImage target, int patchSize, int windowSize)
          Search for the best match for a specific point
 java.util.ArrayList<Template> getTemplates()
          Get the template array
static void main(java.lang.String[] args)
          Main method is used for testing
 void optimise(int minwidth)
          Perform the optimisation (alignment)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplatePatchMDL

public TemplatePatchMDL(java.util.ArrayList<java.awt.image.BufferedImage> images,
                        Template template,
                        int patchsize,
                        int windowSize)
TemplatePatchMDL constructor

Parameters:
images - the images to align
template - the example template aligned to the first image
patchsize - the patch size to use
windowSize - the window size to use
Method Detail

getLowRes

public TemplatePatchMDL getLowRes()
Get a low res approximation to the problem

Returns:
return the lower resolution approximation

getTemplates

public java.util.ArrayList<Template> getTemplates()
Get the template array

Returns:
return the set of templates

optimise

public void optimise(int minwidth)
Perform the optimisation (alignment)

Parameters:
minwidth - the minimum width for the multiscale recursion

getPointUpdate

public java.awt.geom.Point2D.Float getPointUpdate(java.awt.geom.Point2D.Float sPt,
                                                  java.awt.geom.Point2D.Float tPt,
                                                  FloatImage source,
                                                  FloatImage target,
                                                  int patchSize,
                                                  int windowSize)
Search for the best match for a specific point

Parameters:
sPt - current location in source image
tPt - current location in target image
source - source image
target - target image
patchSize - the patch size
windowSize - the window size
Returns:
return the new location for the points

main

public static void main(java.lang.String[] args)
                 throws java.io.FileNotFoundException
Main method is used for testing

Parameters:
args - args[0] = the image-template list file, args[1] = the template to use
Throws:
java.io.FileNotFoundException