Facemorph
Class LinearWarp
java.lang.Object
Facemorph.Warp
Facemorph.LinearWarp
- All Implemented Interfaces:
- java.io.Serializable
public class LinearWarp
- extends Warp
Performs triangulated linear interpolation for image warping
- See Also:
- Serialized Form
Constructor Summary |
LinearWarp()
Output image width
/
int twidth;
/**
output image height
/
int theight;
/*
/**
Construct an empty LinearWarp |
LinearWarp(int w,
int h,
int W,
int H,
boolean r)
Constructs a Linear warp with the input and output size specified |
Method Summary |
java.awt.Image |
drawTess(java.awt.Image img)
Draw the triangulation (tesselation) used for the warp on the supplied image |
boolean |
interpolate(int n,
java.awt.geom.Point2D.Float[] dest,
java.awt.geom.Point2D.Float[] source,
boolean borders)
Perform the interpolation |
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 |
LinearWarp
public LinearWarp()
- Output image width
/
int twidth;
/**
output image height
/
int theight;
/*
/**
Construct an empty LinearWarp
LinearWarp
public LinearWarp(int w,
int h,
int W,
int H,
boolean r)
- Constructs a Linear warp with the input and output size specified
- Parameters:
w
- input widthh
- input heightW
- output widthH
- output heightr
- triangulate on reverse template??
interpolate
public boolean interpolate(int n,
java.awt.geom.Point2D.Float[] dest,
java.awt.geom.Point2D.Float[] source,
boolean borders)
- Perform the interpolation
- Specified by:
interpolate
in class Warp
- Parameters:
n
- Number of input points to interpolatedest
- List of destination points to interpolatesource
- List of source points to interpolateborders
- Indicates if the borders should be pinned down
(using a set of points round the image edge)
- Returns:
- true if the interpolation was completed OK
drawTess
public java.awt.Image drawTess(java.awt.Image img)
- Draw the triangulation (tesselation) used for the warp on the supplied image
- Parameters:
img
- The image to draw on
- Returns:
- A copy of the image with the tesselation shown