All Implemented Interfaces:
Inversion, Jacobian, Mapping2D, Cloneable

public class Scaling2D extends AffineMapping2D

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).

  • Constructor Details

    • Scaling2D

      public Scaling2D(Scaling2D sc)
    • Scaling2D

      public Scaling2D(double sx, double sy)
      Constructor. Creates a mapping that scales along the x- and y-axis by the associated factors.
      Parameters:
      sx - the scale factor in x-direction
      sy - the scale factor in y-direction
    • Scaling2D

      public Scaling2D(double s)
      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 interface Inversion
      Overrides:
      getInverse in class AffineMapping2D
      Returns:
      a new scaling transformation
    • duplicate

      public Scaling2D duplicate()
      Returns a copy of this mapping.
      Overrides:
      duplicate in class AffineMapping2D
      Returns:
      a new scaling transformation