Facemorph.psm
Class SteerablePyramid

java.lang.Object
  extended by Facemorph.psm.SteerablePyramid

public class SteerablePyramid
extends java.lang.Object

Implementation of Steerable pyramid


Constructor Summary
SteerablePyramid()
           
 
Method Summary
 void buildPyramid(FloatImage fimg, java.util.ArrayList<Filter> filters, Filter lowpassFilter, int maxLev)
          Build a pyramid from and image
 FloatImage getLinearCombination(float[] weights, int level)
          Get a linear combination of different subbands in the same level
 FloatImage getLowpass()
          Get the lowpass component
 SteerablePyramid getReweightedPyramid(java.util.ArrayList<float[]> weights)
          Get a pyramid formed as a weighted linear combination of subbands
 FloatImage getSubband(int i)
          Get subband i
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SteerablePyramid

public SteerablePyramid()
Method Detail

buildPyramid

public void buildPyramid(FloatImage fimg,
                         java.util.ArrayList<Filter> filters,
                         Filter lowpassFilter,
                         int maxLev)
Build a pyramid from and image

Parameters:
fimg - the image
filters - the set of filters to use a each scale
lowpassFilter - the low pass filter to start a new pyramid level
maxLev - the maximum levels to build

getLinearCombination

public FloatImage getLinearCombination(float[] weights,
                                       int level)
                                throws java.lang.RuntimeException
Get a linear combination of different subbands in the same level

Parameters:
weights - the weight for each subband
level - the level to work at
Returns:
return the linear combination
Throws:
java.lang.RuntimeException

getReweightedPyramid

public SteerablePyramid getReweightedPyramid(java.util.ArrayList<float[]> weights)
Get a pyramid formed as a weighted linear combination of subbands

Parameters:
weights - the weights
Returns:
return the weighted combinations pyramid

getSubband

public FloatImage getSubband(int i)
Get subband i

Parameters:
i - the index
Returns:
return the subband i

getLowpass

public FloatImage getLowpass()
Get the lowpass component

Returns:
returns the lowpass component