Input
Annotated Parallel Lines
Affine-Rectified Image
Lines 1 and 2 | Lines 3 and 4 | |
---|---|---|
Before | 0.9375299 | 0.9999769 |
After | 0.99999999 | 1.0 |
Input
Annotated Lines on Input
Annotated Lines on Affine-Image
Metric-Rectified Image
Lines 1 and 2 | Lines 3 and 4 | |
---|---|---|
Before | -0.004750 | -0.062938 |
After | 4.952e-08 | -4.234e-08 |
Normal Image
Perspective Image
Annotated corners in Perspective Image
Warped and Overlaid Image
A
in computeH(x1, x2)
: Each pair
of corresponding points (x, y) from x1
and (u, v) from
x2
contributed two equations to the matrix:
[u, v, 1, 0, 0, 0, -x * u, -x * v, -x]
[0, 0, 0, u, v, 1, -y * u, -y * v, -y]
H
.np.max(points)
.
H
: Adjusted H
back to the original
coordinate system using the equation:
Hdenormalized = T-1 H T
T
is the normalization transformation matrix.
We can overlay PNGs with desired opacities to get 3D watermarks