public class AffineTransformBuilder extends ProjectiveTransformBuilder
[ x'] [ m00 m01 m02 ] [ x ] [ m00x + m01y + m02 ] [ y'] = [ m10 m11 m12 ] [ y ] = [ m10x + m11y + m12 ] [ 1 ] [ 0 0 1 ] [ 1 ] [ 1 ] x' = m * xIn the case that we have more identical points we can write it like this (in Matrix):
[ x'1 ] [ x1 y1 1 0 0 0 ] [ m00 ] [ x'2 ] [ x2 y2 1 0 0 0 ] [ m01 ] [ . ] [ . ] [ m02 ] [ . ] [ . ] * [ m10 ] [ x'n ] = [ xn yn 1 0 0 0 ] [ m11 ] [ y'1 ] [ 0 0 0 x1 y1 1 ] [ m12 ] [ y'2 ] [ 0 0 0 x2 y2 1 ] [ . ] [ . ] [ . ] [ . ] [ y'n ] [ 0 0 0 xn yn 1 ] x' = A*mUsing the least square method we get this result:
m = (ATA)-1 ATx'
A, P, X
mtFactory
Modifier | Constructor and Description |
---|---|
protected |
AffineTransformBuilder() |
|
AffineTransformBuilder(List<MappedPosition> vectors)
Creates AffineTransformBuilder for the set of properties.
|
Modifier and Type | Method and Description |
---|---|
protected void |
fillAMatrix()
Fills A matrix for m = (ATPA)-1 ATPx' equation
|
int |
getMinimumPointCount()
Returns the minimum number of points required by this builder, which is 3.
|
protected GeneralMatrix |
getProjectiveMatrix()
Returns the matrix for Projective transformation setup as Affine.
|
calculateLSM, computeMathTransform, fillPMatrix, fillXMatrix, getCoordinateSystemType, includeWeights
getDimension, getErrorStatistics, getMappedPositions, getMathTransform, getName, getSourceCRS, getSourcePoints, getTargetCRS, getTargetPoints, getTransformation, printPoints, setMappedPositions, setSourcePoints, setTargetPoints, toString
protected AffineTransformBuilder()
public AffineTransformBuilder(List<MappedPosition> vectors) throws IllegalArgumentException, MismatchedDimensionException, MismatchedReferenceSystemException
vectors
- list of MappedPositionIllegalArgumentException
MismatchedDimensionException
MismatchedReferenceSystemException
public int getMinimumPointCount()
getMinimumPointCount
in class ProjectiveTransformBuilder
protected GeneralMatrix getProjectiveMatrix()
[ m00 m01 m02 ] [ m10 m11 m12 ] [ 0 0 1 ]
getProjectiveMatrix
in class ProjectiveTransformBuilder
protected void fillAMatrix()
ProjectiveTransformBuilder
fillAMatrix
in class ProjectiveTransformBuilder
Copyright © 1996–2019 Geotools. All rights reserved.