T
- the pixel typeI
- the actual image of the concrete subclasspublic class PiecewiseMeshWarp<T,I extends Image<T,I>> extends Object implements ImageProcessor<I>
Constructor and Description |
---|
PiecewiseMeshWarp(List<Pair<Shape>> matchingRegions)
Construct the warp with a list of matching shapes (which must be either
quads or triangles).
|
Modifier and Type | Method and Description |
---|---|
Shape |
getMatchingShape(Point2d p)
Get the shape in the observation space for a point in the canonical
space.
|
int |
getMatchingShapeIndex(Point2d p)
Get the shape pair index for a point in the canonical space.
|
protected Jama.Matrix |
getTransform(Point2d p) |
protected Jama.Matrix |
getTransform3(List<Pair<Point2d>> pts) |
protected Jama.Matrix |
getTransform4(List<Pair<Point2d>> pts) |
protected void |
initTransforms() |
protected List<Pair<Point2d>> |
polyMatchToPointsMatch(Polygon pa,
Polygon pb) |
void |
processImage(I image)
Process an image.
|
I |
transform(I image,
int width,
int height)
Transform the content of the input image into an output image of the
given dimensions.
|
public PiecewiseMeshWarp(List<Pair<Shape>> matchingRegions)
matchingRegions
- the matching shapesprotected final Jama.Matrix getTransform(Point2d p)
public Shape getMatchingShape(Point2d p)
p
- point in the canonical space.public int getMatchingShapeIndex(Point2d p)
p
- the point in canonical space.protected void initTransforms()
protected Jama.Matrix getTransform4(List<Pair<Point2d>> pts)
protected Jama.Matrix getTransform3(List<Pair<Point2d>> pts)
public void processImage(I image)
ImageProcessor
Image.internalAssign(Image)
.processImage
in interface ImageProcessor<I extends Image<T,I>>
image
- The image to process in place.