Facemorph.oesf
Class FilterSet

java.lang.Object
  extended by Facemorph.oesf.FilterSet

public class FilterSet
extends java.lang.Object

Represents a set of filters (for a particular viewpoint


Constructor Summary
FilterSet(java.util.ArrayList<Complex[]> filters, java.util.ArrayList<double[]> priors)
          Constructor for a FilterSet
FilterSet(int count)
          Constructor for a set of filters
FilterSet(java.lang.String file)
          Constructor for a set of filters
 
Method Summary
 void addFilter(Complex[] filt, double[] prior)
          Add a flter to the set
 Complex[] getFilter(int i)
          Get the ith filter
 java.util.ArrayList<double[]> getPriors()
          Get all the priors
 void initialisePriors(Template3D t3d, BigMat R, double[] T, double scale, java.util.ArrayList<double[]> priorsView0, java.util.ArrayList<java.lang.Boolean> visible)
          Initialise the priors
 void read(java.lang.String file)
          Read a filter set
 void updateResponses(FloatImage fimg)
          Update the responses to the filters fitlering this image
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterSet

public FilterSet(java.lang.String file)
          throws java.io.FileNotFoundException
Constructor for a set of filters

Parameters:
file - the filters set file to read
Throws:
java.io.FileNotFoundException

FilterSet

public FilterSet(int count)
Constructor for a set of filters

Parameters:
count - the number of filters in the set

FilterSet

public FilterSet(java.util.ArrayList<Complex[]> filters,
                 java.util.ArrayList<double[]> priors)
Constructor for a FilterSet

Parameters:
filters - the set of filters to use
priors - the priors, as the 5 parameters of a 2D Gaussian
Method Detail

read

public void read(java.lang.String file)
          throws java.io.FileNotFoundException
Read a filter set

Parameters:
file - the file to read from
Throws:
java.io.FileNotFoundException

updateResponses

public void updateResponses(FloatImage fimg)
Update the responses to the filters fitlering this image

Parameters:
fimg - the image to filter

getFilter

public Complex[] getFilter(int i)
Get the ith filter

Parameters:
i - the index of the filter in the set
Returns:
returns the filter (Fourier domain)

addFilter

public void addFilter(Complex[] filt,
                      double[] prior)
Add a flter to the set

Parameters:
filt - the Fourier domain filter to add
prior - the prior as the paramteres of a 2D Gaussian

getPriors

public java.util.ArrayList<double[]> getPriors()
Get all the priors

Returns:
returns the priors

initialisePriors

public void initialisePriors(Template3D t3d,
                             BigMat R,
                             double[] T,
                             double scale,
                             java.util.ArrayList<double[]> priorsView0,
                             java.util.ArrayList<java.lang.Boolean> visible)
Initialise the priors

Parameters:
t3d - the 3D template
R - the rotation matrix
T - the translation vector
scale - the sale
priorsView0 - the priors in view 0
visible - the visible set