Facemorph
Class TPSWarp
java.lang.Object
Facemorph.Warp
Facemorph.TPSWarp
- All Implemented Interfaces:
- java.io.Serializable
public class TPSWarp
- extends Warp
Thin plate spline warping class
- See Also:
- Serialized Form
Constructor Summary |
TPSWarp()
Constructor for empty thin plate spline warp |
TPSWarp(int xsize,
int ysize)
Constructor for TPS warp of given size |
TPSWarp(int xsize,
int ysize,
int ow,
int oh)
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 |
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 widthysize
- the height
TPSWarp
public TPSWarp(int xsize,
int ysize,
int ow,
int oh)
- Constructor for TPS warp of given size
- Parameters:
xsize
- the widthysize
- the heightow
- the widthoh
- the height
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 constraintssp
- The start pointsdp
- The target pointsborders
- if true fix the borders
- Returns:
- true if the interpolation was successful