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.Scaling2D
This class represents a 2D scaling transformation (as a special case of affine transformation). 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns 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
-
Scaling2D
-
Scaling2D
Constructor. Creates a mapping that scales along the x- and y-axis by the associated factors.- Parameters:
sx
- the scale factor in x-directionsy
- the scale factor in y-direction
-
Scaling2D
Constructor. Creates a uniform scaling in x and y.- Parameters:
s
- the common scale factor
-
-
Method Details
-
getInverse
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:
- a new scaling transformation
-
duplicate
Returns a copy of this mapping.- Overrides:
duplicate
in classAffineMapping2D
- Returns:
- a new scaling transformation
-