java.lang.Object
imagingbook.common.geometry.mappings.linear.LinearMapping2D
imagingbook.common.geometry.mappings.linear.ProjectiveMapping2D
imagingbook.common.geometry.mappings.linear.AffineMapping2D
imagingbook.common.geometry.mappings.linear.Rotation2D
This class represents a pure 2D rotation about the coordinate origin (as a special case of affine mapping). It can be assumed that every instance of this class is indeed a rotation. See Secs. 21.1.3 and 21.3.1 of [1] for details.
[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).
-
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionRotation2D
(double alpha) Constructor.protected
Rotation2D
(double a00, double a01, double a10, double a11) Auxiliary constructor used internally for duplicating instances.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionconcat
(Rotation2D B) Concatenates this rotation (A) with another rotation (B) and returns a new rotation (C), such that C(x) = B(A(x)).Returns a copy of this mapping.Calculates and returns the inverse mapping.Methods inherited from class imagingbook.common.geometry.mappings.linear.AffineMapping2D
applyTo, concat, fromPoints, fromPoints, getJacobian, isAffine
Methods inherited from class imagingbook.common.geometry.mappings.linear.ProjectiveMapping2D
concat, main
Methods inherited from class imagingbook.common.geometry.mappings.linear.LinearMapping2D
concat, concatenate, getTransformationMatrix, normalize, toString
-
Constructor Details
-
Rotation2D
Constructor. Creates a 2D rotation by a given angle about the origin.- Parameters:
alpha
- rotation angle (in radians)
-
Rotation2D
Auxiliary constructor used internally for duplicating instances.- Parameters:
a00
- matrix element A_00a01
- matrix element A_01a10
- matrix element A_10a11
- matrix element A_11
-
Rotation2D
Constructor. Creates a newRotation2D
object from an existing instance.- Parameters:
m
- aRotation2D
instance
-
-
Method Details
-
concat
Concatenates this rotation (A) with another rotation (B) and returns a new rotation (C), such that C(x) = B(A(x)).- Parameters:
B
- the second rotation- Returns:
- the concatenated rotations
-
duplicate
Description copied from class:AffineMapping2D
Returns a copy of this mapping.- Overrides:
duplicate
in classAffineMapping2D
- Returns:
- a new affine mapping
-
getInverse
Description copied from class:AffineMapping2D
Calculates and returns the inverse mapping. Note that the inverse A' of a projective transformation matrix A is again a linear transformation but its a'2' element is generally not 1. Scaling A' to A'' = A' / a22' yields a projective transformation that reverses A. While A * A' = I, the result of A * A'' is a scaled identity matrix. Note that inverting an affine transformation always yields another affine transformation.- Specified by:
getInverse
in interfaceInversion
- Overrides:
getInverse
in classAffineMapping2D
- Returns:
- the inverse projective transformation
-