Facemorph.mdl
Class GroupwiseImageRegistrationFile

java.lang.Object
  extended by Facemorph.Powell
      extended by Facemorph.mdl.GroupwiseImageRegistrationFile

public class GroupwiseImageRegistrationFile
extends Powell

Groupwise image registration using Powell's method


Field Summary
 
Fields inherited from class Facemorph.Powell
fittnessMemo, kNN, memo, TINY
 
Constructor Summary
GroupwiseImageRegistrationFile(java.util.ArrayList<java.lang.String> imageFiles, int pcount, java.lang.String baseDir)
          Constructor takes an array of images and a grid point resolution
 
Method Summary
 double func(double[] params)
          Func should be overrided to calculate the error given the parameters params
 double func(double[] params, boolean display)
          Error function evaluation with optional output (to terminal)
static void main(java.lang.String[] args)
          Main method for testing
 void onIteration(double[] params)
          onIteration is called once per complete itrations to show the best current guess.
 
Methods inherited from class Facemorph.Powell
linmin, optimiseGA, powell, powell, spsa, spsa2
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupwiseImageRegistrationFile

public GroupwiseImageRegistrationFile(java.util.ArrayList<java.lang.String> imageFiles,
                                      int pcount,
                                      java.lang.String baseDir)
                               throws java.io.IOException
Constructor takes an array of images and a grid point resolution

Parameters:
images - the images to try and align
pcount - the number of control points to use
Throws:
java.io.IOException
Method Detail

func

public double func(double[] params)
Description copied from class: Powell
Func should be overrided to calculate the error given the parameters params

Specified by:
func in class Powell
Parameters:
params - the parameters to evaluate
Returns:
returns the error

func

public double func(double[] params,
                   boolean display)
Error function evaluation with optional output (to terminal)

Parameters:
params - the parameters to evaluate
display - should the error be output
Returns:
return the evaluation of the function

onIteration

public void onIteration(double[] params)
Description copied from class: Powell
onIteration is called once per complete itrations to show the best current guess. It can be implemented with an empty body if not needed

Specified by:
onIteration in class Powell
Parameters:
params - the current params of the model

main

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

Parameters:
args - args[0] = image list file
Throws:
java.io.FileNotFoundException
java.io.IOException
java.lang.ClassNotFoundException