Module imagingbook.common
Class BilinearMapping2D
java.lang.Object
imagingbook.common.geometry.mappings.nonlinear.BilinearMapping2D
This class represents a bilinear transformation in 2D with 8 parameters a0, ..., a3, b0, ..., b3 of the form
x' = a0 * x + a1 * y + a2 * x * y + a3 y' = b0 * x + b1 * y + b2 * x * y + b3
Note that this is a non-linear transformation because of the mixed term x * y. See Secs. 21.1.5 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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBilinearMapping2D
(double a0, double a1, double a2, double a3, double b0, double b1, double b2, double b3) -
Method Summary
Modifier and TypeMethodDescriptionApplies this mapping to a single 2D point.static BilinearMapping2D
fromPoints
(Pnt2d[] P, Pnt2d[] Q) Calculates and returns the bilinear mapping M between two point sets P, Q, with 4 points each, such that q_i = M(p_i).toString()
-
Field Details
-
a0
-
a1
-
a2
-
a3
-
b0
-
b1
-
b2
-
b3
-
-
Constructor Details
-
BilinearMapping2D
public BilinearMapping2D(double a0, double a1, double a2, double a3, double b0, double b1, double b2, double b3)
-
-
Method Details
-
fromPoints
Calculates and returns the bilinear mapping M between two point sets P, Q, with 4 points each, such that q_i = M(p_i). The inverse mapping is obtained by simply swapping the two point sets.- Parameters:
P
- the first point sequenceQ
- the second point sequence- Returns:
- a new bilinear mapping
-
applyTo
Description copied from interface:Mapping2D
Applies this mapping to a single 2D point. -
toString
-