Facemorph.aam
Class TaylorSolver

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

public class TaylorSolver
extends java.lang.Object

Utillity class for solving the normalised cross correlation given the current synthetic image and the derivatives with respect to each model parameter.


Constructor Summary
TaylorSolver(double[] f, double[][] df)
          Creates a new instance of CAAMSolver
 
Method Summary
static double dotProduct(double[] a, double[] b)
          Calculates the dot product between two arrays of equal length
 double[] getUpdate(double[] g)
          get the update parameters for the given target data vector
 BigMat getV()
          Gets the matrix of principal components (derived from SVD of hessian matrix)
 double[] getWeights()
          Get the diagonal matrix of singular values
 double[] reconstruct(double[] update)
          Reconstruct from the weights update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaylorSolver

public TaylorSolver(double[] f,
                    double[][] df)
Creates a new instance of CAAMSolver

Parameters:
f - The current model vector
df - the derivatives of the current model
Method Detail

getV

public BigMat getV()
Gets the matrix of principal components (derived from SVD of hessian matrix)

Returns:
the matrix V

getWeights

public double[] getWeights()
Get the diagonal matrix of singular values

Returns:
the weights vector from SVD

getUpdate

public double[] getUpdate(double[] g)
get the update parameters for the given target data vector

Parameters:
g - vector containing the measured data
Returns:
return the array of update parameters

dotProduct

public static double dotProduct(double[] a,
                                double[] b)
Calculates the dot product between two arrays of equal length

Parameters:
a - first array
b - second array
Returns:
retuns the dot product of the two arrays

reconstruct

public double[] reconstruct(double[] update)
Reconstruct from the weights update

Parameters:
update - the update vector
Returns:
returns the reconstructed vector from the PCA model