Facemorph
Class TPSWarp

java.lang.Object
  extended by Facemorph.Warp
      extended by Facemorph.TPSWarp
All Implemented Interfaces:
java.io.Serializable

public class TPSWarp
extends Warp

Thin plate spline warping class

See Also:
Serialized Form

Field Summary
 
Fields inherited from class Facemorph.Warp
height, LINEAR, MULTISCALE, MULTISCALERB, TPS, width, xshift, yshift
 
Constructor Summary
TPSWarp()
          Constructor for empty thin plate spline warp
TPSWarp(int xsize, int ysize)
          Constructor for TPS warp of given size
 
Method Summary
 boolean interpolate(int n, java.awt.geom.Point2D.Float[] sp, java.awt.geom.Point2D.Float[] dp, boolean borders)
          Method to interpolate the warping function
 
Methods inherited from class Facemorph.Warp
concatenate, concatenate, convert, createWarp, get, getHeight, getWidth, interpolate, interpolate, interpolate, iterate, overlap, reconvert, sample, sample, scaleWarp, set, stripPoints, warpFloatImage, warpImage, warpImage, warpImage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TPSWarp

public TPSWarp()
Constructor for empty thin plate spline warp


TPSWarp

public TPSWarp(int xsize,
               int ysize)
Constructor for TPS warp of given size

Parameters:
xsize - the width
ysize - the height
Method Detail

interpolate

public boolean interpolate(int n,
                           java.awt.geom.Point2D.Float[] sp,
                           java.awt.geom.Point2D.Float[] dp,
                           boolean borders)
Description copied from class: Warp
Method to interpolate the warping function

Specified by:
interpolate in class Warp
Parameters:
n - The number of constraints
sp - The start points
dp - The target points
borders - if true fix the borders
Returns:
true if the interpolation was successful