| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectFacemorph.Warp
Facemorph.MultiscaleWarp
public class MultiscaleWarp
Implements a multi-scale interpolation algorithm
| Field Summary | |
|---|---|
static int | 
WARP_AFFINE_ONLY
Static constant for affine only  | 
static int | 
WARP_FULL_AFFINE
Static constant for full warp with affine component  | 
static int | 
WARP_FULL_RIGID
Static constant for full warp with rigid component  | 
static int | 
WARP_RIGID_ONLY
Static constant for rigid only  | 
| Fields inherited from class Facemorph.Warp | 
|---|
height, LINEAR, MULTISCALE, MULTISCALERB, TPS, width, xshift, yshift | 
| Constructor Summary | |
|---|---|
MultiscaleWarp(int w,
               int h)
Creates a multi-scale warping object of the specified (equal input and output) dimensions  | 
|
MultiscaleWarp(int w,
               int h,
               int tw,
               int th)
Creates a multi-scale warping object of the specified input and output dimensions  | 
|
| Method Summary | |
|---|---|
 void | 
calculateAffine(java.util.List<java.awt.geom.Point2D.Float> source,
                java.util.List<java.awt.geom.Point2D.Float> dest)
Calculate the affine components of the warp  | 
 void | 
calculateRigid(java.util.List<java.awt.geom.Point2D.Float> source,
               java.util.List<java.awt.geom.Point2D.Float> dest)
Calculate the rigid components of the warp  | 
 void | 
concatenate(MultiscaleWarp warp1,
            MultiscaleWarp warp2)
Concatenates 2 MultiscaleWarps  | 
 void | 
concatenate(Warp warp)
Concatenates warp with this  | 
 void | 
copy(BSplineQuadTree bwarp)
Copy a warp defined as a BSplineQuadTree  | 
 void | 
copy(MultiscaleWarp warp)
Copy the given warp  | 
 float[] | 
get(int x,
    int y)
return the value of the warping function at the specified position  | 
 float[] | 
getScaled(int x,
          int y,
          float scale)
return the value of the warping function at the specified position,scaled by the specified amount  | 
 boolean | 
interpolate(int n,
            java.util.List<java.awt.geom.Point2D.Float> source,
            java.util.List<java.awt.geom.Point2D.Float> dest,
            boolean borders)
Interpolates the given 2D values across the 2D space, by performing setup then calling interpolate()  | 
 boolean | 
interpolate(int n,
            java.awt.geom.Point2D.Float[] source,
            java.awt.geom.Point2D.Float[] dest,
            boolean borders)
Method to interpolate the warping function  | 
 boolean | 
interpolate(java.util.List<javax.vecmath.TexCoord2f> source,
            java.util.List<javax.vecmath.TexCoord2f> dest,
            boolean borders)
Interpolates using points in an ArrayList  | 
 boolean | 
interpolate(javax.vecmath.TexCoord2f[] source,
            javax.vecmath.TexCoord2f[] dest,
            boolean borders)
Interpolates using the texture coords (values between 0 and 1)  | 
 void | 
scaleWarp(float scaleFactor)
Scales a warp by the amount specified  | 
 void | 
set(int x,
    int y,
    float X,
    float Y)
Sets the value of this warp at the specified point  | 
 void | 
setScaled(MultiscaleWarp small)
Up-scale the small warp into this  | 
 void | 
setWarpType(int type)
Sets the type of warp  | 
 int | 
upsample(MultiscaleWarp small,
         float[] filter,
         int m)
Upsample (expand) the small warp into this  | 
| Methods inherited from class Facemorph.Warp | 
|---|
concatenate, convert, createWarp, getHeight, getWidth, interpolate, interpolate, interpolate, iterate, overlap, reconvert, sample, sample, stripPoints, warpFloatImage, warpImage, warpImage, warpImage | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final int WARP_FULL_AFFINE
public static final int WARP_FULL_RIGID
public static final int WARP_AFFINE_ONLY
public static final int WARP_RIGID_ONLY
| Constructor Detail | 
|---|
public MultiscaleWarp(int w,
                      int h)
w - The desired widthh - The desired height
public MultiscaleWarp(int w,
                      int h,
                      int tw,
                      int th)
w - The desired widthh - The desired heighttw - The width of the source imageth - The height of the source image| Method Detail | 
|---|
public void setWarpType(int type)
type - type should be one of WARP_FULL_AFFINE, WARP_FULL_RIGID, WARP_AFFINE_ONLY, WARP_RIGID_ONLYpublic void copy(MultiscaleWarp warp)
warp - the warp to copy
public void calculateAffine(java.util.List<java.awt.geom.Point2D.Float> source,
                            java.util.List<java.awt.geom.Point2D.Float> dest)
source - set of source pointsdest - set of target points
public void calculateRigid(java.util.List<java.awt.geom.Point2D.Float> source,
                           java.util.List<java.awt.geom.Point2D.Float> dest)
source - set of source pointsdest - set of target points
public boolean interpolate(int n,
                           java.util.List<java.awt.geom.Point2D.Float> source,
                           java.util.List<java.awt.geom.Point2D.Float> dest,
                           boolean borders)
n - The number of constraints to interpolatesource - The array of start pointsdest - The array of end pointsborders - Specifies whether to fix the points on the borders
public boolean interpolate(javax.vecmath.TexCoord2f[] source,
                           javax.vecmath.TexCoord2f[] dest,
                           boolean borders)
source - The source coordinatesdest - The destination coordinatesborders - Specifices if the borders should be fixed
public boolean interpolate(java.util.List<javax.vecmath.TexCoord2f> source,
                           java.util.List<javax.vecmath.TexCoord2f> dest,
                           boolean borders)
source - The list of source pointsdest - The list of target pointsborders - Specifies if the borders should be fixed
public int upsample(MultiscaleWarp small,
                    float[] filter,
                    int m)
small - the small warpfilter - the upsampling filterm - the mid-point of the filter
public void copy(BSplineQuadTree bwarp)
bwarp - the warp to copy
public float[] get(int x,
                   int y)
get in class Warpx - The x-coordinatey - The y-coordinate
public void set(int x,
                int y,
                float X,
                float Y)
set in class Warpx - The x-coordy - The y-coordX - The X valueY - The Y valuepublic void concatenate(Warp warp)
Warp
concatenate in class Warpwarp - the warp to concatenate
public void concatenate(MultiscaleWarp warp1,
                        MultiscaleWarp warp2)
warp1 - the first warpwarp2 - the second warp
public float[] getScaled(int x,
                         int y,
                         float scale)
scale - The amount to scale this warp byx - The x-coordinatey - The y-coordinate
public void setScaled(MultiscaleWarp small)
small - the small warp to upscalepublic void scaleWarp(float scaleFactor)
Warp
scaleWarp in class WarpscaleFactor - the scale factor to apply to this warp
public boolean interpolate(int n,
                           java.awt.geom.Point2D.Float[] source,
                           java.awt.geom.Point2D.Float[] dest,
                           boolean borders)
Warp
interpolate in class Warpn - The number of constraintssource - The start pointsdest - The target pointsborders - if true fix the borders
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||