net.grelf.grip
Class Warp

java.lang.Object
  extended by net.grelf.grip.Warp

public class Warp
extends java.lang.Object

Static methods for warping one image into another.


Method Summary
static void interactiveWarp(ImFrame imf1, ImFrame imf2)
          Warp the image in frame imf2 into the image in frame imf1, using the control points that have been set on each.
static java.awt.image.BufferedImage warp(java.awt.image.BufferedImage bim, int imNo, int middleImNo, java.util.List<MatchPair> matches, BlobMeas[][] lookup, int nBrightest)
          Warp the given image (bim) using the inter-image match information.
static void warp(java.awt.image.BufferedImage imOld, PointFloat[] oldPts, java.awt.image.BufferedImage imNew, PointFloat[] newPts)
          Warp imOld into separate image imNew, using second order polynomials.
static void warp(Image imageOld, PointFloat[] oldPts, Image imageNew, PointFloat[] newPts)
          Warp imOld into separate image imNew, using second order polynomials.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

warp

public static void warp(java.awt.image.BufferedImage imOld,
                        PointFloat[] oldPts,
                        java.awt.image.BufferedImage imNew,
                        PointFloat[] newPts)
Warp imOld into separate image imNew, using second order polynomials. NB: At least 9 pairs of control points should be defined.


warp

public static void warp(Image imageOld,
                        PointFloat[] oldPts,
                        Image imageNew,
                        PointFloat[] newPts)
Warp imOld into separate image imNew, using second order polynomials. NB: At least 9 pairs of control points should be defined.


warp

public static java.awt.image.BufferedImage warp(java.awt.image.BufferedImage bim,
                                                int imNo,
                                                int middleImNo,
                                                java.util.List<MatchPair> matches,
                                                BlobMeas[][] lookup,
                                                int nBrightest)
Warp the given image (bim) using the inter-image match information. Return a new image that has been warped. Return null if the control points are insufficient.


interactiveWarp

public static void interactiveWarp(ImFrame imf1,
                                   ImFrame imf2)
Warp the image in frame imf2 into the image in frame imf1, using the control points that have been set on each. First checks that the same number of control points has been set on both images. Then, for each control point pair, displays a dialogue containing a side-by-side comparison, allowing the user to adjust both positions by dragging. Then, if the user confirms, proceeds to do the warping, mapping the second set of control points onto the first. Afterwards the control point positions on both images are the same and the drawing mode is unchanged.