public class ProcrustesAlignment extends Object
This class is particularly useful in shape matching and analysis tasks where the only permitted deformation modes are uniform scaling, rotation, and translation. It is commonly used in various fields such as computer vision, image processing, pattern recognition, and bioinformatics.
Modifier and Type | Method and Description |
---|---|
static double[] |
transform(org.locationtech.jts.geom.Polygon sourcePolygon,
org.locationtech.jts.geom.Polygon transformPolygon)
Performs ProcrustesAlignment Analysis to align two polygons.
|
public static double[] transform(org.locationtech.jts.geom.Polygon sourcePolygon, org.locationtech.jts.geom.Polygon transformPolygon)
Finds the optimal scaling, translation and rotation to best align
transformPolygon
with respect to sourcePolygon
.
Note: the polygons should have the same number of vertices.
sourcePolygon
- the first polygontransformPolygon
- the polygon to transform/alignCopyright © 2023. All rights reserved.