Facemorph.multifilter
Class FourierDecompose

java.lang.Object
  extended by Facemorph.multifilter.FourierDecompose

public class FourierDecompose
extends java.lang.Object

Decompose an image using Fourier based filtering with a filter bank


Constructor Summary
FourierDecompose(int w, int h, int l, double scaleFactor)
          Constructor builds filters of size wxh
 
Method Summary
 java.util.ArrayList<Complex[]> analyse(Complex[] data)
          Analyse the image as a Complex array and return the result as a set of Complex responses
 java.util.ArrayList<FloatImage> analyse(FloatImage fimg)
          Analyse an image using the filter bank
 java.util.ArrayList<FloatImage> analyseExhaustive(FloatImage fimg)
          Exhaustive search for best filter components Adds components until sum squared errors is > 30000 or 1000 iterations exceeded
 void imposeSymmetry(Complex[] response)
          Impose conjugate symmetry on the complex response
static void main(java.lang.String[] args)
          Main method used for testing
 FloatImage reconstruct(java.util.ArrayList<FloatImage> responses)
          Reconstruct fom a set of FloatImage responses
 Complex[] reconstructComplex(java.util.ArrayList<Complex[]> responses)
          Reconstruct in the Fourier domain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FourierDecompose

public FourierDecompose(int w,
                        int h,
                        int l,
                        double scaleFactor)
Constructor builds filters of size wxh

Parameters:
w - width
h - height
l - levels
scaleFactor - the scale change between pyramid levels
Method Detail

analyse

public java.util.ArrayList<FloatImage> analyse(FloatImage fimg)
Analyse an image using the filter bank

Parameters:
fimg - the image to analyse
Returns:
returns the filter responses

analyse

public java.util.ArrayList<Complex[]> analyse(Complex[] data)
Analyse the image as a Complex array and return the result as a set of Complex responses

Parameters:
data - the image (Fourier domain)
Returns:
returns the responses in the Fourier domain

imposeSymmetry

public void imposeSymmetry(Complex[] response)
Impose conjugate symmetry on the complex response

Parameters:
response -

reconstruct

public FloatImage reconstruct(java.util.ArrayList<FloatImage> responses)
Reconstruct fom a set of FloatImage responses

Parameters:
responses - the response to rebuild the image from
Returns:
returns the reconstructed image (spatial domain)

reconstructComplex

public Complex[] reconstructComplex(java.util.ArrayList<Complex[]> responses)
Reconstruct in the Fourier domain

Parameters:
responses - the FFT responses
Returns:
return the reconstruction in the Fourier domain

analyseExhaustive

public java.util.ArrayList<FloatImage> analyseExhaustive(FloatImage fimg)
Exhaustive search for best filter components Adds components until sum squared errors is > 30000 or 1000 iterations exceeded

Parameters:
fimg - the image to analyse
Returns:
returns the set of approximating response images

main

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

Parameters:
args - args[0] = name of file
Throws:
java.io.IOException